From: Somnath Kotur Date: Tue, 22 Sep 2020 07:06:28 +0000 (+0530) Subject: net/bnxt: fix TruFlow devarg handling X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a7cea858eba82982aa47862cd987be030e748611;p=dpdk.git net/bnxt: fix TruFlow devarg handling Set the TRUFLOW Enable bit in bp->flags only if the value passed in devargs was 1. Otherwise set it to 0. Fixes: 313ac35ac701 ("net/bnxt: support ULP session manager init") Cc: stable@dpdk.org Signed-off-by: Somnath Kotur Reviewed-by: Venkat Duvvuru Reviewed-by: Mike Baucom Reviewed-by: Ajit Khaparde --- diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index e0afaac694..b42c6a09b5 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -5581,9 +5581,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; }