Skip to content

Commit 50f011b

Browse files
Michael Chandavem330
authored andcommitted
bnxt_en: Update RSS setup and GRO-HW logic according to the latest spec.
Set the default hash mode flag in HWRM_VNIC_RSS_CFG to signal to the firmware that the driver is compliant with the latest spec. With that, the firmware can return expanded RSS profile IDs that the driver checks to setup the proper gso_type for GRO-HW packets. But instead of checking for the new profile IDs, we check the IP_TYPE flag in TPA_START which is more straight forward than checking a list of profile IDs. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent bf82736 commit 50f011b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ static void bnxt_tpa_start(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,
11151115
tpa_info->hash_type = PKT_HASH_TYPE_L4;
11161116
tpa_info->gso_type = SKB_GSO_TCPV4;
11171117
/* RSS profiles 1 and 3 with extract code 0 for inner 4-tuple */
1118-
if (hash_type == 3)
1118+
if (hash_type == 3 || TPA_START_IS_IPV6(tpa_start1))
11191119
tpa_info->gso_type = SKB_GSO_TCPV6;
11201120
tpa_info->rss_hash =
11211121
le32_to_cpu(tpa_start->rx_tpa_start_cmp_rss_hash);
@@ -3981,6 +3981,7 @@ static int bnxt_hwrm_vnic_set_rss(struct bnxt *bp, u16 vnic_id, bool set_rss)
39813981
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_RSS_CFG, -1, -1);
39823982
if (set_rss) {
39833983
req.hash_type = cpu_to_le32(bp->rss_hash_cfg);
3984+
req.hash_mode_flags = VNIC_RSS_CFG_REQ_HASH_MODE_FLAGS_DEFAULT;
39843985
if (vnic->flags & BNXT_VNIC_RSS_FLAG) {
39853986
if (BNXT_CHIP_TYPE_NITRO_A0(bp))
39863987
max_rings = bp->rx_nr_rings - 1;

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@ struct rx_tpa_start_cmp_ext {
326326
((le32_to_cpu((rx_tpa_start)->rx_tpa_start_cmp_cfa_code_v2) & \
327327
RX_TPA_START_CMP_CFA_CODE) >> RX_TPA_START_CMPL_CFA_CODE_SHIFT)
328328

329+
#define TPA_START_IS_IPV6(rx_tpa_start) \
330+
(!!((rx_tpa_start)->rx_tpa_start_cmp_flags2 & \
331+
cpu_to_le32(RX_TPA_START_CMP_FLAGS2_IP_TYPE)))
332+
329333
struct rx_tpa_end_cmp {
330334
__le32 rx_tpa_end_cmp_len_flags_type;
331335
#define RX_TPA_END_CMP_TYPE (0x3f << 0)

0 commit comments

Comments
 (0)