[4/8] net/bnxt: fix to honor value passed for truflow devargs
diff mbox series

Message ID 20200922070632.17706-5-somnath.kotur@broadcom.com
State Accepted
Delegated to: Ajit Khaparde
Headers show
Series
  • bnxt patches
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Somnath Kotur Sept. 22, 2020, 7:06 a.m. UTC
Set the TRUFLOW Enable bit in bp->flags only if the value passed in
devargs was 1.

Fixes: 313ac35ac701 ("net/bnxt: support ULP session manager init")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 05e9a6a..db2f0dd 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -5579,9 +5579,13 @@  bnxt_parse_devarg_truflow(__rte_unused const char *key,
 		return -EINVAL;
 	}
 
-	bp->flags |= BNXT_FLAG_TRUFLOW_EN;
-	if (BNXT_TRUFLOW_EN(bp))
+	if (truflow) {
+		bp->flags |= BNXT_FLAG_TRUFLOW_EN;
 		PMD_DRV_LOG(INFO, "Host-based truflow feature enabled.\n");
+	} else {
+		bp->flags &= ~BNXT_FLAG_TRUFLOW_EN;
+		PMD_DRV_LOG(INFO, "Host-based truflow feature disabled.\n");
+	}
 
 	return 0;
 }