net/i40e: keep promisc on if allmulticast is enabled

Message ID 20181016032737.28869-1-huaibin.wang@6wind.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series net/i40e: keep promisc on if allmulticast is enabled |

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch warning coding style issues

Commit Message

Huaibin Wang Oct. 16, 2018, 3:27 a.m. UTC
  From: huaibin Wang <huaibin.wang@6wind.com>

Promisc should not be disabled if the all multicast mode is enabled.
Patch keeps the promiscuous on if all multicast mode is on, this
behavior is also consistant with the implementation done on ixgbe
pmd.

Signed-off-by: huaibin Wang <huaibin.wang@6wind.com>
Signed-off-by: Laurent Hardy <laurent.hardy@6wind.com>
---
Cc: Beilei Xing <beilei.xing@intel.com>
Cc: Qi Zhang <qi.z.zhang@intel.com>

 drivers/net/i40e/i40e_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f7a685c8c..6c503debc 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2587,6 +2587,10 @@  i40e_dev_promiscuous_disable(struct rte_eth_dev *dev)
 	if (status != I40E_SUCCESS)
 		PMD_DRV_LOG(ERR, "Failed to disable unicast promiscuous");
 
+	/* must remain in all_multicast mode */
+	if (dev->data->all_multicast == 1)
+		return;
+
 	status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid,
 							false, NULL);
 	if (status != I40E_SUCCESS)