Skip to contentSkip to conversation

net/i40e: keep promisc on if allmulticast is enabled

PATCH New Huaibin Wang 2 participants 3 messages Oct 16, 2018 – Oct 19, 2018 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/i40e: keep promisc on if allmulticast is enabled

From: huaibin Wang <[email protected]>

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.

---
Cc: Beilei Xing <[email protected]>
Cc: Qi Zhang <[email protected]>

 drivers/net/i40e/i40e_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/i40e/i40e_ethdev.c +4 -0
index f7a685c8c..6c503debc 100644
@@ -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)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 net/i40e: keep promisc on if allmulticast is enabled

From: huaibin Wang <[email protected]>

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 consistent with the implementation done on ixgbe pmd.

---
Cc: Beilei Xing <[email protected]>
Cc: Qi Zhang <[email protected]>

 drivers/net/i40e/i40e_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/i40e/i40e_ethdev.c +4 -0
index f7a685c8c..6c503debc 100644
@@ -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)
Signature · 1 line
2.11.0
Acked-by on v1 1/1 Applied
#2 lore raw
Quoted 11 lines

-----Original Message-----
From: Huaibin Wang [mailto:[email protected]]
Sent: Friday, October 19, 2018 2:45 AM
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>; huaibin Wang <[email protected]>; Laurent Hardy <[email protected]>
Subject: [PATCH] net/i40e: keep promisc on if allmulticast is enabled

Quoted 8 lines

From: huaibin Wang <[email protected]>

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 consistent with the implementation done on ixgbe pmd.

Applied to dpdk-next-net-intel.
Cc: [email protected] is added.

Thanks
Qi

Quoted 25 lines

---
Cc: Beilei Xing <[email protected]>
Cc: Qi Zhang <[email protected]>

 drivers/net/i40e/i40e_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/i40e/i40e_ethdev.c +4 -0
index f7a685c8c..6c503debc 100644
@@ -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)
--
2.11.0