DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] Add i40e Promiscuous disable in i40evf_dev_stop
@ 2018-03-15  5:14 Rosen Xu
  2018-04-17  3:02 ` [dpdk-dev] [PATCH v3] drivers/net/i40e: fix missing promiscuous disable at device disable Rosen Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Rosen Xu @ 2018-03-15  5:14 UTC (permalink / raw)
  To: beilei.xing; +Cc: dev

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index fd003fe..f395b02 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2051,6 +2051,8 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev)
 
 	if (hw->adapter_stopped == 1)
 		return;
+	i40evf_dev_promiscuous_disable(dev);
+	i40evf_dev_allmulticast_disable(dev);
 	i40evf_stop_queues(dev);
 	i40evf_disable_queues_intr(dev);
 	i40e_dev_clear_queues(dev);
-- 
1.8.3.1

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

* [dpdk-dev] [PATCH v3] drivers/net/i40e: fix missing promiscuous disable at device disable
  2018-03-15  5:14 [dpdk-dev] [PATCH] Add i40e Promiscuous disable in i40evf_dev_stop Rosen Xu
@ 2018-04-17  3:02 ` Rosen Xu
  2018-04-17 13:31   ` Zhang, Qi Z
  2018-04-18  8:11 ` [dpdk-dev] [PATCH v4] " Rosen Xu
  2018-04-28 11:38 ` [dpdk-dev] [PATCH v5] net/i40e: fix disabling promiscuous mode Rosen Xu
  2 siblings, 1 reply; 7+ messages in thread
From: Rosen Xu @ 2018-04-17  3:02 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, helin.zhang, qi.z.zhang, jingjing.wu

v3 updates:
===========
 - Move modification from device close to device disable
 - i40evf_reset_vf() will cause kernel driver enable all vlan promiscuous,
   so unicast/multicast promiscuous disable should set before reset.

v2 updates:
===========
 - Add more comments

In scenario of Kernel Driver runs on PF and PMD runs on VF, PMD exit
doesn't disable promiscuous mode, this will cause vlan filter set by
Kernel Driver will not take effect.

This patch will fix it, add promiscuous disable at device disable.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 031c706..40012b0 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2288,6 +2288,8 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev)
 
 	i40evf_dev_stop(dev);
 	i40e_dev_free_queues(dev);
+	i40evf_dev_promiscuous_disable(dev);
+	i40evf_dev_allmulticast_disable(dev);
 	i40evf_reset_vf(hw);
 	i40e_shutdown_adminq(hw);
 	/* disable uio intr before callback unregister */
-- 
1.8.3.1

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

* Re: [dpdk-dev] [PATCH v3] drivers/net/i40e: fix missing promiscuous disable at device disable
  2018-04-17  3:02 ` [dpdk-dev] [PATCH v3] drivers/net/i40e: fix missing promiscuous disable at device disable Rosen Xu
@ 2018-04-17 13:31   ` Zhang, Qi Z
  0 siblings, 0 replies; 7+ messages in thread
From: Zhang, Qi Z @ 2018-04-17 13:31 UTC (permalink / raw)
  To: Xu, Rosen, dev; +Cc: Xing, Beilei, Zhang, Helin, Wu, Jingjing

Hi Rosen:

> -----Original Message-----
> From: Xu, Rosen
> Sent: Tuesday, April 17, 2018 11:03 AM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Helin
> <helin.zhang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>
> Subject: [PATCH v3] drivers/net/i40e: fix missing promiscuous disable at
> device disable
> 
> v3 updates:
> ===========
>  - Move modification from device close to device disable
>  - i40evf_reset_vf() will cause kernel driver enable all vlan promiscuous,
>    so unicast/multicast promiscuous disable should set before reset.
> 
> v2 updates:
> ===========
>  - Add more comments

Version log can be added after ---, so it will not be included by commit log.

> 
> In scenario of Kernel Driver runs on PF and PMD runs on VF, PMD exit
> doesn't disable promiscuous mode, this will cause vlan filter set by Kernel
> Driver will not take effect.
> 
> This patch will fix it, add promiscuous disable at device disable.
> 
> Signed-off-by: Rosen Xu <rosen.xu@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev_vf.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
> b/drivers/net/i40e/i40e_ethdev_vf.c
> index 031c706..40012b0 100644
> --- a/drivers/net/i40e/i40e_ethdev_vf.c
> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -2288,6 +2288,8 @@ static int eth_i40evf_pci_remove(struct
> rte_pci_device *pci_dev)
> 
>  	i40evf_dev_stop(dev);
>  	i40e_dev_free_queues(dev);

I think it's better to add some comment here, 
since this is a workaround solution and it is not the normal way
we disable promiscuous mode, people need to be noticed here. 

Regards
Qi

> +	i40evf_dev_promiscuous_disable(dev);
> +	i40evf_dev_allmulticast_disable(dev);
>  	i40evf_reset_vf(hw);
>  	i40e_shutdown_adminq(hw);
>  	/* disable uio intr before callback unregister */
> --
> 1.8.3.1

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

* [dpdk-dev] [PATCH v4] drivers/net/i40e: fix missing promiscuous disable at device disable
  2018-03-15  5:14 [dpdk-dev] [PATCH] Add i40e Promiscuous disable in i40evf_dev_stop Rosen Xu
  2018-04-17  3:02 ` [dpdk-dev] [PATCH v3] drivers/net/i40e: fix missing promiscuous disable at device disable Rosen Xu
@ 2018-04-18  8:11 ` Rosen Xu
  2018-04-18 12:01   ` Zhang, Qi Z
  2018-04-28 11:38 ` [dpdk-dev] [PATCH v5] net/i40e: fix disabling promiscuous mode Rosen Xu
  2 siblings, 1 reply; 7+ messages in thread
From: Rosen Xu @ 2018-04-18  8:11 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, helin.zhang, qi.z.zhang, jingjing.wu

v4 updates:
===========
 - Add some comments for this patch

v3 updates:
===========
 - Move modification from device close to device disable
 - i40evf_reset_vf() will cause kernel driver enable all vlan promiscuous,
   so unicast/multicast promiscuous disable should set before reset.

v2 updates:
===========
 - Add more comments

In scenario of Kernel Driver runs on PF and PMD runs on VF, PMD exit
doesn't disable promiscuous mode, this will cause vlan filter set by
Kernel Driver will not take effect.

This patch will fix it, add promiscuous disable at device disable.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 031c706..91fbf6c 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2288,6 +2288,14 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev)
 
 	i40evf_dev_stop(dev);
 	i40e_dev_free_queues(dev);
+	/*
+	 * disable promiscuous mode before reset vf
+	 * it is a workaround solution when work with kernel driver
+	 * and it is not the normal way
+	 */
+	i40evf_dev_promiscuous_disable(dev);
+	i40evf_dev_allmulticast_disable(dev);
+
 	i40evf_reset_vf(hw);
 	i40e_shutdown_adminq(hw);
 	/* disable uio intr before callback unregister */
-- 
1.8.3.1

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

* Re: [dpdk-dev] [PATCH v4] drivers/net/i40e: fix missing promiscuous disable at device disable
  2018-04-18  8:11 ` [dpdk-dev] [PATCH v4] " Rosen Xu
@ 2018-04-18 12:01   ` Zhang, Qi Z
  0 siblings, 0 replies; 7+ messages in thread
From: Zhang, Qi Z @ 2018-04-18 12:01 UTC (permalink / raw)
  To: Xu, Rosen, dev; +Cc: Xing, Beilei, Zhang, Helin, Wu, Jingjing



> -----Original Message-----
> From: Xu, Rosen
> Sent: Wednesday, April 18, 2018 4:12 PM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Helin
> <helin.zhang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>
> Subject: [PATCH v4] drivers/net/i40e: fix missing promiscuous disable at
> device disable
> 
> v4 updates:
> ===========
>  - Add some comments for this patch
> 
> v3 updates:
> ===========
>  - Move modification from device close to device disable
>  - i40evf_reset_vf() will cause kernel driver enable all vlan promiscuous,
>    so unicast/multicast promiscuous disable should set before reset.
> 
> v2 updates:
> ===========
>  - Add more comments
> 
> In scenario of Kernel Driver runs on PF and PMD runs on VF, PMD exit
> doesn't disable promiscuous mode, this will cause vlan filter set by Kernel
> Driver will not take effect.
> 
> This patch will fix it, add promiscuous disable at device disable.
> 
> Signed-off-by: Rosen Xu <rosen.xu@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Change log need be removed when apply

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

* [dpdk-dev] [PATCH v5] net/i40e: fix disabling promiscuous mode
  2018-03-15  5:14 [dpdk-dev] [PATCH] Add i40e Promiscuous disable in i40evf_dev_stop Rosen Xu
  2018-04-17  3:02 ` [dpdk-dev] [PATCH v3] drivers/net/i40e: fix missing promiscuous disable at device disable Rosen Xu
  2018-04-18  8:11 ` [dpdk-dev] [PATCH v4] " Rosen Xu
@ 2018-04-28 11:38 ` Rosen Xu
  2018-05-08  1:47   ` Zhang, Helin
  2 siblings, 1 reply; 7+ messages in thread
From: Rosen Xu @ 2018-04-28 11:38 UTC (permalink / raw)
  To: dev; +Cc: helin.zhang, qi.z.zhang, jingjing.wu, stable

v5 updates:
===========
 - Modificate some comments for this patch

v4 updates:
===========
 - Add some comments for this patch

v3 updates:
===========
 - Move modification from device close to device disable
 - i40evf_reset_vf() will cause kernel driver enable all vlan promiscuous,
   so unicast/multicast promiscuous disable should set before reset.

v2 updates:
===========
 - Add more comments

In scenario of Kernel Driver runs on PF and PMD runs on VF, PMD exit
doesn't disable promiscuous mode, this will cause vlan filter set by
Kernel Driver will not take effect.

This patch will fix it, add promiscuous disable at device disable.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 48e7ac2..b8977a6 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2288,6 +2288,14 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev)
 
 	i40evf_dev_stop(dev);
 	i40e_dev_free_queues(dev);
+	/*
+	 * disable promiscuous mode before reset vf
+	 * it fixes missing disable promiscuous mode
+	 * when work with kernel dirver bug issue
+	 */
+	i40evf_dev_promiscuous_disable(dev);
+	i40evf_dev_allmulticast_disable(dev);
+
 	i40evf_reset_vf(hw);
 	i40e_shutdown_adminq(hw);
 	/* disable uio intr before callback unregister */
-- 
1.8.3.1

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

* Re: [dpdk-dev] [PATCH v5] net/i40e: fix disabling promiscuous mode
  2018-04-28 11:38 ` [dpdk-dev] [PATCH v5] net/i40e: fix disabling promiscuous mode Rosen Xu
@ 2018-05-08  1:47   ` Zhang, Helin
  0 siblings, 0 replies; 7+ messages in thread
From: Zhang, Helin @ 2018-05-08  1:47 UTC (permalink / raw)
  To: Xu, Rosen, dev; +Cc: Zhang, Qi Z, Wu, Jingjing



> -----Original Message-----
> From: Xu, Rosen
> Sent: Saturday, April 28, 2018 7:39 PM
> To: dev@dpdk.org
> Cc: Zhang, Helin; Zhang, Qi Z; Wu, Jingjing; stable@dpdk.org
> Subject: [PATCH v5] net/i40e: fix disabling promiscuous mode
> 
> v5 updates:
> ===========
>  - Modificate some comments for this patch
> 
> v4 updates:
> ===========
>  - Add some comments for this patch
> 
> v3 updates:
> ===========
>  - Move modification from device close to device disable
>  - i40evf_reset_vf() will cause kernel driver enable all vlan promiscuous,
>    so unicast/multicast promiscuous disable should set before reset.
> 
> v2 updates:
> ===========
>  - Add more comments
> 
> In scenario of Kernel Driver runs on PF and PMD runs on VF, PMD exit doesn't
> disable promiscuous mode, this will cause vlan filter set by Kernel Driver will
> not take effect.
> 
> This patch will fix it, add promiscuous disable at device disable.
> 
> Fixes: 4861cde46116 ("i40e: new poll mode driver")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Rosen Xu <rosen.xu@intel.com>
> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel, thanks!

Helin

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

end of thread, other threads:[~2018-05-08  1:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-15  5:14 [dpdk-dev] [PATCH] Add i40e Promiscuous disable in i40evf_dev_stop Rosen Xu
2018-04-17  3:02 ` [dpdk-dev] [PATCH v3] drivers/net/i40e: fix missing promiscuous disable at device disable Rosen Xu
2018-04-17 13:31   ` Zhang, Qi Z
2018-04-18  8:11 ` [dpdk-dev] [PATCH v4] " Rosen Xu
2018-04-18 12:01   ` Zhang, Qi Z
2018-04-28 11:38 ` [dpdk-dev] [PATCH v5] net/i40e: fix disabling promiscuous mode Rosen Xu
2018-05-08  1:47   ` Zhang, Helin

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).