Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'bnxt_en-bug-fixes'

Michael Chan says:

====================
bnxt_en: Bug fixes

There are 2 bug fixes in this series. This first one fixes the issue
of setting the gso_type incorrectly for HW GRO packets on 5750X (Thor)
chips. This can cause HW GRO packets to be dropped by the stack if
they are re-segmented. The second one fixes a potential division by
zero crash when dumping FW log coredump.
====================

Link: https://patch.msgid.link/20241204215918.1692597-1-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+11 -10
+8 -10
drivers/net/ethernet/broadcom/bnxt/bnxt.c
··· 1531 1531 if (TPA_START_IS_IPV6(tpa_start1)) 1532 1532 tpa_info->gso_type = SKB_GSO_TCPV6; 1533 1533 /* RSS profiles 1 and 3 with extract code 0 for inner 4-tuple */ 1534 - else if (cmp_type == CMP_TYPE_RX_L2_TPA_START_CMP && 1534 + else if (!BNXT_CHIP_P4_PLUS(bp) && 1535 1535 TPA_START_HASH_TYPE(tpa_start) == 3) 1536 1536 tpa_info->gso_type = SKB_GSO_TCPV6; 1537 1537 tpa_info->rss_hash = ··· 2226 2226 if (cmp_type == CMP_TYPE_RX_L2_V3_CMP) { 2227 2227 type = bnxt_rss_ext_op(bp, rxcmp); 2228 2228 } else { 2229 - u32 hash_type = RX_CMP_HASH_TYPE(rxcmp); 2229 + u32 itypes = RX_CMP_ITYPES(rxcmp); 2230 2230 2231 - /* RSS profiles 1 and 3 with extract code 0 for inner 2232 - * 4-tuple 2233 - */ 2234 - if (hash_type != 1 && hash_type != 3) 2235 - type = PKT_HASH_TYPE_L3; 2236 - else 2231 + if (itypes == RX_CMP_FLAGS_ITYPE_TCP || 2232 + itypes == RX_CMP_FLAGS_ITYPE_UDP) 2237 2233 type = PKT_HASH_TYPE_L4; 2234 + else 2235 + type = PKT_HASH_TYPE_L3; 2238 2236 } 2239 2237 skb_set_hash(skb, le32_to_cpu(rxcmp->rx_cmp_rss_hash), type); 2240 2238 } ··· 8365 8367 struct bnxt_ctx_mem_type *ctxm = &ctx->ctx_arr[type]; 8366 8368 int n = 1; 8367 8369 8368 - if (!ctxm->max_entries) 8370 + if (!ctxm->max_entries || ctxm->pg_info) 8369 8371 continue; 8370 8372 8371 8373 if (ctxm->instance_bmap) ··· 8969 8971 continue; 8970 8972 } 8971 8973 bnxt_bs_trace_init(bp, ctxm); 8972 - last_type = type; 8973 8974 } 8975 + last_type = type; 8974 8976 } 8975 8977 8976 8978 if (last_type == BNXT_CTX_INV) {
+3
drivers/net/ethernet/broadcom/bnxt/bnxt.h
··· 267 267 (((le32_to_cpu((rxcmp)->rx_cmp_misc_v1) & RX_CMP_RSS_HASH_TYPE) >>\ 268 268 RX_CMP_RSS_HASH_TYPE_SHIFT) & RSS_PROFILE_ID_MASK) 269 269 270 + #define RX_CMP_ITYPES(rxcmp) \ 271 + (le32_to_cpu((rxcmp)->rx_cmp_len_flags_type) & RX_CMP_FLAGS_ITYPES_MASK) 272 + 270 273 #define RX_CMP_V3_HASH_TYPE_LEGACY(rxcmp) \ 271 274 ((le32_to_cpu((rxcmp)->rx_cmp_misc_v1) & RX_CMP_V3_RSS_EXT_OP_LEGACY) >>\ 272 275 RX_CMP_V3_RSS_EXT_OP_LEGACY_SHIFT)