net/bnxt: fix segmentation fault

Message ID 20241120170058.18742-1-ajit.khaparde@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ajit Khaparde
Headers
Series net/bnxt: fix segmentation fault |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS RETEST #1
ci/iol-compile-arm64-testing success Testing PASS RETEST #1
ci/iol-mellanox-Performance success Performance Testing PASS RETEST #1
ci/iol-marvell-Functional success Functional Testing PASS RETEST #1
ci/iol-sample-apps-testing success Testing PASS RETEST #1
ci/iol-intel-Functional success Functional Testing PASS RETEST #1
ci/iol-intel-Performance success Performance Testing PASS RETEST #1

Commit Message

Ajit Khaparde Nov. 20, 2024, 5 p.m. UTC
From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

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")
Cc: stable@dpdk.org

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Patrick Robb Nov. 20, 2024, 9:14 p.m. UTC | #1
Recheck-request: iol-intel-Performance
  
Ajit Khaparde Nov. 20, 2024, 9:15 p.m. UTC | #2
On Wed, Nov 20, 2024 at 9:01 AM Ajit Khaparde
<ajit.khaparde@broadcom.com> wrote:
>
> From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
>
> 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.
>
> Fixes: 65d2b0557ba3 ("net/bnxt: support Rx completion v3")
> Cc: stable@dpdk.org
>
> Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
> Reviewed-by: Jay Ding <jay.ding@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

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


> ---
>  drivers/net/bnxt/bnxt_rxr.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
> index 5e5496964f..7357ca4427 100644
> --- a/drivers/net/bnxt/bnxt_rxr.h
> +++ b/drivers/net/bnxt/bnxt_rxr.h
> @@ -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)
>
  

Patch

diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 5e5496964f..7357ca4427 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -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_ */