From ec8e7598bbf4924a932ac1ed168cf723468448d4 Mon Sep 17 00:00:00 2001 From: Ying A Wang Date: Wed, 17 Apr 2019 09:47:52 +0800 Subject: [PATCH] net/ice: fix promiscuous mode When device promiscuous mode has already been enabled, should not return error if user re-enable it. Fixes: c945e4bf9063 ("net/ice: support promiscuous mode") Cc: stable@dpdk.org Signed-off-by: Ying A Wang Acked-by: Qiming Yang --- drivers/net/ice/ice_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 5b26663b6c..1f06a2c807 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2775,7 +2775,9 @@ ice_promisc_enable(struct rte_eth_dev *dev) ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX; status = ice_set_vsi_promisc(hw, vsi->idx, pmask, 0); - if (status != ICE_SUCCESS) + if (status == ICE_ERR_ALREADY_EXISTS) + PMD_DRV_LOG(DEBUG, "Promisc mode has already been enabled"); + else if (status != ICE_SUCCESS) PMD_DRV_LOG(ERR, "Failed to enable promisc, err=%d", status); } -- 2.20.1