DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] i40e: Enable multicast promiscuous mode when promiscuous mode enabled for i40e driver
@ 2014-08-15  1:47 Heng Ding
  2014-08-15  1:49 ` Zhang, Helin
  0 siblings, 1 reply; 3+ messages in thread
From: Heng Ding @ 2014-08-15  1:47 UTC (permalink / raw)
  To: dev

From: Ding Heng <hengx.ding@intel.com>

IPv6 will run NDP with multicast packets, but multicast packets will be
filtered by i40e driver by default. So we need to enable multicast when
promiscuous mode is on, or IPv6 will fail on these cards when running
testpmd and kni app.

Signed-off-by: Ding Heng <hengx.ding@intel.com>
---
 lib/librte_pmd_i40e/i40e_ethdev.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
index 9ed31b5..539dae5 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev.c
@@ -755,6 +755,12 @@ i40e_dev_promiscuous_enable(struct rte_eth_dev *dev)
 							true, NULL);
 	if (status != I40E_SUCCESS)
 		PMD_DRV_LOG(ERR, "Failed to enable unicast promiscuous\n");
+
+	status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid,
+							TRUE, NULL);
+	if (status != I40E_SUCCESS)
+		PMD_DRV_LOG(ERR, "Failed to enable multicast promiscuous\n");
+
 }
 
 static void
@@ -769,6 +775,11 @@ i40e_dev_promiscuous_disable(struct rte_eth_dev *dev)
 							false, NULL);
 	if (status != I40E_SUCCESS)
 		PMD_DRV_LOG(ERR, "Failed to disable unicast promiscuous\n");
+
+	status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid,
+							false, NULL);
+	if (status != I40E_SUCCESS)
+		PMD_DRV_LOG(ERR, "Failed to disable multicast promiscuous\n");
 }
 
 static void
@@ -792,6 +803,9 @@ i40e_dev_allmulticast_disable(struct rte_eth_dev *dev)
 	struct i40e_vsi *vsi = pf->main_vsi;
 	int ret;
 
+	if (dev->data->promiscuous == 1)
+		return; /* must remain in all_multicast mode */
+
 	ret = i40e_aq_set_vsi_multicast_promiscuous(hw,
 				vsi->seid, FALSE, NULL);
 	if (ret != I40E_SUCCESS)
-- 
1.9.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] i40e: Enable multicast promiscuous mode when promiscuous mode enabled for i40e driver
  2014-08-15  1:47 [dpdk-dev] [PATCH] i40e: Enable multicast promiscuous mode when promiscuous mode enabled for i40e driver Heng Ding
@ 2014-08-15  1:49 ` Zhang, Helin
  2014-08-25 14:13   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Helin @ 2014-08-15  1:49 UTC (permalink / raw)
  To: Ding, HengX; +Cc: dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Heng Ding
> Sent: Friday, August 15, 2014 9:48 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] i40e: Enable multicast promiscuous mode when
> promiscuous mode enabled for i40e driver
> 
> From: Ding Heng <hengx.ding@intel.com>
> 
> IPv6 will run NDP with multicast packets, but multicast packets will be filtered
> by i40e driver by default. So we need to enable multicast when promiscuous
> mode is on, or IPv6 will fail on these cards when running testpmd and kni app.
> 
> Signed-off-by: Ding Heng <hengx.ding@intel.com>
> ---
>  lib/librte_pmd_i40e/i40e_ethdev.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c
> b/lib/librte_pmd_i40e/i40e_ethdev.c
> index 9ed31b5..539dae5 100644
> --- a/lib/librte_pmd_i40e/i40e_ethdev.c
> +++ b/lib/librte_pmd_i40e/i40e_ethdev.c
> @@ -755,6 +755,12 @@ i40e_dev_promiscuous_enable(struct rte_eth_dev
> *dev)
>  							true, NULL);
>  	if (status != I40E_SUCCESS)
>  		PMD_DRV_LOG(ERR, "Failed to enable unicast promiscuous\n");
> +
> +	status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid,
> +							TRUE, NULL);
> +	if (status != I40E_SUCCESS)
> +		PMD_DRV_LOG(ERR, "Failed to enable multicast promiscuous\n");
> +
>  }
> 
>  static void
> @@ -769,6 +775,11 @@ i40e_dev_promiscuous_disable(struct rte_eth_dev
> *dev)
>  							false, NULL);
>  	if (status != I40E_SUCCESS)
>  		PMD_DRV_LOG(ERR, "Failed to disable unicast promiscuous\n");
> +
> +	status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid,
> +							false, NULL);
> +	if (status != I40E_SUCCESS)
> +		PMD_DRV_LOG(ERR, "Failed to disable multicast promiscuous\n");
>  }
> 
>  static void
> @@ -792,6 +803,9 @@ i40e_dev_allmulticast_disable(struct rte_eth_dev
> *dev)
>  	struct i40e_vsi *vsi = pf->main_vsi;
>  	int ret;
> 
> +	if (dev->data->promiscuous == 1)
> +		return; /* must remain in all_multicast mode */
> +
>  	ret = i40e_aq_set_vsi_multicast_promiscuous(hw,
>  				vsi->seid, FALSE, NULL);
>  	if (ret != I40E_SUCCESS)
> --
> 1.9.3

Reviewed-by: Helin Zhang <helin.zhang@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] i40e: Enable multicast promiscuous mode when promiscuous mode enabled for i40e driver
  2014-08-15  1:49 ` Zhang, Helin
@ 2014-08-25 14:13   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2014-08-25 14:13 UTC (permalink / raw)
  To: Ding, HengX; +Cc: dev

> > IPv6 will run NDP with multicast packets, but multicast packets will be filtered
> > by i40e driver by default. So we need to enable multicast when promiscuous
> > mode is on, or IPv6 will fail on these cards when running testpmd and kni app.
> > 
> > Signed-off-by: Ding Heng <hengx.ding@intel.com>
> 
> Reviewed-by: Helin Zhang <helin.zhang@intel.com>

Applied for version 1.7.1.

Thanks
-- 
Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-25 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-15  1:47 [dpdk-dev] [PATCH] i40e: Enable multicast promiscuous mode when promiscuous mode enabled for i40e driver Heng Ding
2014-08-15  1:49 ` Zhang, Helin
2014-08-25 14:13   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).