[dpdk-stable] [DPDK 2/2] net/ice: fix promiscuous mode
Wang Ying A
ying.a.wang at intel.com
Fri Apr 12 06:57:18 CEST 2019
When device promiscuous mode has already been enabled,
"set promisc all on" in testpmd command line should
give the user a hint not a error print. This patch
fixes the issue.
Fixes: c945e4bf9063 ("net/ice: support promiscuous mode")
Cc: stable at dpdk.org
Signed-off-by: Wang Ying A <ying.a.wang at intel.com>
---
drivers/net/ice/ice_ethdev.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 72831bb..198da86 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2760,7 +2760,12 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
status = ice_set_vsi_promisc(hw, vsi->idx, pmask, 0);
if (status != ICE_SUCCESS)
- PMD_DRV_LOG(ERR, "Failed to enable promisc, err=%d", status);
+ {
+ if(status == ICE_ERR_ALREADY_EXISTS)
+ PMD_DRV_LOG(INFO, "Promiscuous mode has already been enabled");
+ else
+ PMD_DRV_LOG(ERR, "Failed to enable promisc, err=%d", status);
+ }
}
static void
--
1.8.3.1
More information about the stable
mailing list