From: Ying A Wang Date: Wed, 17 Apr 2019 01:47:52 +0000 (+0800) Subject: net/ice: fix promiscuous mode X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ec8e7598bbf4924a932ac1ed168cf723468448d4;p=dpdk.git 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 --- 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); }