Skip to contentSkip to conversation

net/bnxt: fix segmentation fault

PATCH In review Ajit Khaparde 2 participants 3 messages Nov 20, 2024 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bnxt: fix segmentation fault

From: Kishore Padmanabha <[email protected]>

The mbuf offload flags were not reset before the flags were populated with the received packet details. This causes certain applications to act differently on the offload flags. That can cause applaction to assert at many locations.

Fixes 65d2b0557ba3 ("net/bnxt: support Rx completion v3")
---
 drivers/net/bnxt/bnxt_rxr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/bnxt_rxr.h +1 -1
index 5e5496964f..7357ca4427 100644
@@ -535,6 +535,6 @@ bnxt_parse_csum_v3(struct rte_mbuf *mbuf, struct rx_pkt_cmpl_hi *rxcmp1)
 	uint16_t error_v2 = rte_le_to_cpu_16(v3_cmp->errors_v2);
 	uint32_t flags2 = rte_le_to_cpu_32(v3_cmp->flags2);
 
-	mbuf->ol_flags |= bnxt_parse_csum_fields_v3(flags2, error_v2);
+	mbuf->ol_flags = bnxt_parse_csum_fields_v3(flags2, error_v2);
 }
 #endif /*  _BNXT_RXR_H_ */
Signature · 1 line
2.39.5 (Apple Git-154)
#1 lore raw
Quoted 8 lines · Ajit Khaparde

From: Kishore Padmanabha <[email protected]>

The mbuf offload flags were not reset before the flags were populated with the received packet details. This causes certain applications to act differently on the offload flags. That can cause application to assert at many locations.

Quoted 6 lines
Fixes 65d2b0557ba3 ("net/bnxt: support Rx completion v3")

Fixed up a typo and merged into dpdk-next-net-brcm. Thanks

Quoted 19 lines
---
 drivers/net/bnxt/bnxt_rxr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/bnxt_rxr.h +1 -2
index 5e5496964f..7357ca4427 100644
@@ -535,6 +535,6 @@ bnxt_parse_csum_v3(struct rte_mbuf *mbuf, struct rx_pkt_cmpl_hi *rxcmp1)
        uint16_t error_v2 = rte_le_to_cpu_16(v3_cmp->errors_v2);
        uint32_t flags2 = rte_le_to_cpu_32(v3_cmp->flags2);
 
-       mbuf->ol_flags |= bnxt_parse_csum_fields_v3(flags2, error_v2);
+       mbuf->ol_flags = bnxt_parse_csum_fields_v3(flags2, error_v2);
 }
 #endif /*  _BNXT_RXR_H_ */
--

2.39.5 (Apple Git-154)