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.ko...@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvv...@broadcom.com>
Reviewed-by: Michael Baucom <michael.bau...@broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khapa...@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

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;
 }
-- 
2.7.4

Reply via email to