net/bnxt: fix seg fault on Thor

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

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Functional success Functional Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot success github build: passed
ci/intel-Testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Ajit Khaparde July 30, 2021, 9:15 p.m. UTC
  In a few cases with Thor device, PMD can segfault when VF
representors are specified. Temporarily fix it by preventing
VF reps for Thor device. This will be addressed in next release.

Fixes: 3fe124d2536c ("net/bnxt: support Thor platform")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Ajit Khaparde July 30, 2021, 10:27 p.m. UTC | #1
On Fri, Jul 30, 2021 at 2:15 PM Ajit Khaparde
<ajit.khaparde@broadcom.com> wrote:
>
> In a few cases with Thor device, PMD can segfault when VF
> representors are specified. Temporarily fix it by preventing
> VF reps for Thor device. This will be addressed in next release.
>
> Fixes: 3fe124d2536c ("net/bnxt: support Thor platform")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

Updated the commit headline to
"net/bnxt: disable VF representors on Thor"
Merged to dpdk-next-net-brcm.

> ---
>  drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
> index fa2148ead7..dbf85e4eda 100644
> --- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
> +++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
> @@ -815,6 +815,11 @@ ulp_ctx_init(struct bnxt *bp,
>                 goto error_deinit;
>         }
>
> +       if (devid == BNXT_ULP_DEVICE_ID_THOR) {
> +               ulp_data->ulp_flags &= ~BNXT_ULP_VF_REP_ENABLED;
> +               BNXT_TF_DBG(ERR, "Enabled non-VFR mode\n");
> +       }
> +
>         /*
>          * Shared session must be created before first regular session but after
>          * the ulp_ctx is valid.
> --
> 2.21.1 (Apple Git-122.3)
>
  

Patch

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index fa2148ead7..dbf85e4eda 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -815,6 +815,11 @@  ulp_ctx_init(struct bnxt *bp,
 		goto error_deinit;
 	}
 
+	if (devid == BNXT_ULP_DEVICE_ID_THOR) {
+		ulp_data->ulp_flags &= ~BNXT_ULP_VF_REP_ENABLED;
+		BNXT_TF_DBG(ERR, "Enabled non-VFR mode\n");
+	}
+
 	/*
 	 * Shared session must be created before first regular session but after
 	 * the ulp_ctx is valid.