DPDK patches and discussions
 help / color / mirror / Atom feed
* RE: [PATCH] net/i40e: restore disable double VLAN by default
  2022-07-07 10:47 [PATCH] net/i40e: restore disable double VLAN by default Kevin Liu
@ 2022-07-07  5:49 ` Jiang, YuX
  2022-07-07  6:15 ` Han, YingyaX
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Jiang, YuX @ 2022-07-07  5:49 UTC (permalink / raw)
  To: Liu, KevinX, dev; +Cc: Xing, Beilei, Zhang, Yuying, Yang, SteveX, Liu, KevinX

> -----Original Message-----
> From: Kevin Liu <kevinx.liu@intel.com>
> Sent: Thursday, July 7, 2022 6:48 PM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Yuying
> <yuying.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Liu,
> KevinX <kevinx.liu@intel.com>
> Subject: [PATCH] net/i40e: restore disable double VLAN by default
> 
> Restore disable double VLAN by default.
> 
> Fixes: ae97b8b89826 ("net/i40e: fix error disable double VLAN")
> Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
> ---
Tested-by: Yu Jiang <YuX.Jiang@intel.com>

Best regards,
Yu Jiang

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

* RE: [PATCH] net/i40e: restore disable double VLAN by default
  2022-07-07 10:47 [PATCH] net/i40e: restore disable double VLAN by default Kevin Liu
  2022-07-07  5:49 ` Jiang, YuX
@ 2022-07-07  6:15 ` Han, YingyaX
  2022-07-07  6:54 ` Yang, Qiming
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Han, YingyaX @ 2022-07-07  6:15 UTC (permalink / raw)
  To: Liu, KevinX, dev; +Cc: Xing, Beilei, Zhang, Yuying, Yang, SteveX, Liu, KevinX


> -----Original Message-----
> From: Kevin Liu <kevinx.liu@intel.com>
> Sent: Thursday, July 7, 2022 6:48 PM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Yuying
> <yuying.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Liu, KevinX
> <kevinx.liu@intel.com>
> Subject: [PATCH] net/i40e: restore disable double VLAN by default
> 
> Restore disable double VLAN by default.
> 
> Fixes: ae97b8b89826 ("net/i40e: fix error disable double VLAN")
> Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
> ---
Tested-by: Yingya Han<yingyax.han@intel.com>

Best regards,
Yingya

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

* RE: [PATCH] net/i40e: restore disable double VLAN by default
  2022-07-07 10:47 [PATCH] net/i40e: restore disable double VLAN by default Kevin Liu
  2022-07-07  5:49 ` Jiang, YuX
  2022-07-07  6:15 ` Han, YingyaX
@ 2022-07-07  6:54 ` Yang, Qiming
  2022-07-07  6:59   ` Liu, KevinX
  2022-07-07 15:22 ` [PATCH v2] " Kevin Liu
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Yang, Qiming @ 2022-07-07  6:54 UTC (permalink / raw)
  To: Liu, KevinX, dev; +Cc: Xing, Beilei, Zhang, Yuying, Yang, SteveX, Liu, KevinX

Hi,

> -----Original Message-----
> From: Kevin Liu <kevinx.liu@intel.com>
> Sent: Thursday, July 7, 2022 18:48
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Yuying
> <yuying.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Liu, KevinX
> <kevinx.liu@intel.com>
> Subject: [PATCH] net/i40e: restore disable double VLAN by default
> 
> Restore disable double VLAN by default.

Please add detail reason, like will caused performance drop issue.
> 
> Fixes: ae97b8b89826 ("net/i40e: fix error disable double VLAN")
> Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
> ---
>  doc/guides/nics/i40e.rst       |  6 +++---
>  drivers/net/i40e/i40e_ethdev.c | 12 ------------
>  2 files changed, 3 insertions(+), 15 deletions(-)
> 
> diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst index
> 85fdc4944d..f61c327726 100644
> --- a/doc/guides/nics/i40e.rst
> +++ b/doc/guides/nics/i40e.rst
> @@ -969,10 +969,10 @@ it will fail and return the info "Conflict with the first
> rule's input set",  which means the current rule's input set conflicts with the first
> rule's.
>  Remove the first rule if want to change the input set of the PCTYPE.
> 
> -Disable QinQ is not supported when FW >= 8.4 -
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +To use VLAN functions, need to enable QinQ when FW >= 8.4

Not only this issue, you should cover all the issue we know.

Vlan related feature miss when FW>=8.4
~~~~~~~~~~~~~
If upgrade FW to version 8.4 and higher, some vlan related issue exist:
1.vlan tci input set not work
2.tpid set fail
3.need enable qinq before use vlan filter
4.outer vlan strip fail

> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> -If upgrade FW to version 8.4 and higher, enable QinQ by default and disable
> QinQ is not supported.
> +If upgrade FW to version 8.4 and higher, when using VLAN functions, need to
> enable QinQ.
> 
> 
>  Example of getting best performance with l3fwd example diff --git
> a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index
> 684e095026..117dd85c11 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -4027,12 +4027,6 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int
> mask)
>  	}
> 
>  	if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
> -		/* Double VLAN not allowed to be disabled.*/
> -		if (pf->fw8_3gt && !(rxmode->offloads &
> RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)) {
> -			PMD_DRV_LOG(WARNING,
> -				"Disable double VLAN is not allowed after
> firmwarev8.3!");
> -			return 0;
> -		}
>  		i = 0;
>  		num = vsi->mac_num;
>  		mac_filter = rte_zmalloc("mac_filter_info_data",
> @@ -6296,7 +6290,6 @@ int i40e_vsi_cfg_inner_vlan_stripping(struct i40e_vsi
> *vsi, bool on)  static int  i40e_dev_init_vlan(struct rte_eth_dev *dev)  {
> -	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data-
> >dev_private);
>  	struct rte_eth_dev_data *data = dev->data;
>  	int ret;
>  	int mask = 0;
> @@ -6307,11 +6300,6 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev)
>  	       RTE_ETH_VLAN_FILTER_MASK |
>  	       RTE_ETH_VLAN_EXTEND_MASK;
> 
> -	/* Double VLAN be enabled by default.*/
> -	if (pf->fw8_3gt) {
> -		struct rte_eth_rxmode *rxmode = &dev->data-
> >dev_conf.rxmode;
> -		rxmode->offloads |= RTE_ETH_RX_OFFLOAD_VLAN_EXTEND;
> -	}
>  	ret = i40e_vlan_offload_set(dev, mask);
>  	if (ret) {
>  		PMD_DRV_LOG(INFO, "Failed to update vlan offload");
> --
> 2.34.1


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

* RE: [PATCH] net/i40e: restore disable double VLAN by default
  2022-07-07  6:54 ` Yang, Qiming
@ 2022-07-07  6:59   ` Liu, KevinX
  0 siblings, 0 replies; 12+ messages in thread
From: Liu, KevinX @ 2022-07-07  6:59 UTC (permalink / raw)
  To: Yang, Qiming, dev; +Cc: Xing, Beilei, Zhang, Yuying, Yang, SteveX

Ok, I'll tidy it up again.

> -----Original Message-----
> From: Yang, Qiming <qiming.yang@intel.com>
> Sent: 2022年7月7日 14:55
> To: Liu, KevinX <kevinx.liu@intel.com>; dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Yuying
> <yuying.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Liu,
> KevinX <kevinx.liu@intel.com>
> Subject: RE: [PATCH] net/i40e: restore disable double VLAN by default
> 
> Hi,
> 
> > -----Original Message-----
> > From: Kevin Liu <kevinx.liu@intel.com>
> > Sent: Thursday, July 7, 2022 18:48
> > To: dev@dpdk.org
> > Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Yuying
> > <yuying.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Liu,
> > KevinX <kevinx.liu@intel.com>
> > Subject: [PATCH] net/i40e: restore disable double VLAN by default
> >
> > Restore disable double VLAN by default.
> 
> Please add detail reason, like will caused performance drop issue.
> >
> > Fixes: ae97b8b89826 ("net/i40e: fix error disable double VLAN")
> > Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
> > ---
> >  doc/guides/nics/i40e.rst       |  6 +++---
> >  drivers/net/i40e/i40e_ethdev.c | 12 ------------
> >  2 files changed, 3 insertions(+), 15 deletions(-)
> >
> > diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst index
> > 85fdc4944d..f61c327726 100644
> > --- a/doc/guides/nics/i40e.rst
> > +++ b/doc/guides/nics/i40e.rst
> > @@ -969,10 +969,10 @@ it will fail and return the info "Conflict with
> > the first rule's input set",  which means the current rule's input set
> > conflicts with the first rule's.
> >  Remove the first rule if want to change the input set of the PCTYPE.
> >
> > -Disable QinQ is not supported when FW >= 8.4 -
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > +To use VLAN functions, need to enable QinQ when FW >= 8.4
> 
> Not only this issue, you should cover all the issue we know.
> 
> Vlan related feature miss when FW>=8.4
> ~~~~~~~~~~~~~
> If upgrade FW to version 8.4 and higher, some vlan related issue exist:
> 1.vlan tci input set not work
> 2.tpid set fail
> 3.need enable qinq before use vlan filter 4.outer vlan strip fail
> 
> >
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > -If upgrade FW to version 8.4 and higher, enable QinQ by default and
> > disable QinQ is not supported.
> > +If upgrade FW to version 8.4 and higher, when using VLAN functions,
> > +need to
> > enable QinQ.
> >
> >
> >  Example of getting best performance with l3fwd example diff --git
> > a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> > index
> > 684e095026..117dd85c11 100644
> > --- a/drivers/net/i40e/i40e_ethdev.c
> > +++ b/drivers/net/i40e/i40e_ethdev.c
> > @@ -4027,12 +4027,6 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev,
> > int
> > mask)
> >  	}
> >
> >  	if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
> > -		/* Double VLAN not allowed to be disabled.*/
> > -		if (pf->fw8_3gt && !(rxmode->offloads &
> > RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)) {
> > -			PMD_DRV_LOG(WARNING,
> > -				"Disable double VLAN is not allowed after
> > firmwarev8.3!");
> > -			return 0;
> > -		}
> >  		i = 0;
> >  		num = vsi->mac_num;
> >  		mac_filter = rte_zmalloc("mac_filter_info_data",
> > @@ -6296,7 +6290,6 @@ int i40e_vsi_cfg_inner_vlan_stripping(struct
> > i40e_vsi *vsi, bool on)  static int  i40e_dev_init_vlan(struct rte_eth_dev
> *dev)  {
> > -	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data-
> > >dev_private);
> >  	struct rte_eth_dev_data *data = dev->data;
> >  	int ret;
> >  	int mask = 0;
> > @@ -6307,11 +6300,6 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev)
> >  	       RTE_ETH_VLAN_FILTER_MASK |
> >  	       RTE_ETH_VLAN_EXTEND_MASK;
> >
> > -	/* Double VLAN be enabled by default.*/
> > -	if (pf->fw8_3gt) {
> > -		struct rte_eth_rxmode *rxmode = &dev->data-
> > >dev_conf.rxmode;
> > -		rxmode->offloads |= RTE_ETH_RX_OFFLOAD_VLAN_EXTEND;
> > -	}
> >  	ret = i40e_vlan_offload_set(dev, mask);
> >  	if (ret) {
> >  		PMD_DRV_LOG(INFO, "Failed to update vlan offload");
> > --
> > 2.34.1


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

* RE: [PATCH v3] net/i40e: restore disable double VLAN by default
  2022-07-07 16:26 ` [PATCH v3] " Kevin Liu
@ 2022-07-07  8:59   ` Xing, Beilei
  0 siblings, 0 replies; 12+ messages in thread
From: Xing, Beilei @ 2022-07-07  8:59 UTC (permalink / raw)
  To: Liu, KevinX, dev; +Cc: Zhang, Yuying, Yang, SteveX



> -----Original Message-----
> From: Liu, KevinX <kevinx.liu@intel.com>
> Sent: Friday, July 8, 2022 12:26 AM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Yuying
> <yuying.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Liu, KevinX
> <kevinx.liu@intel.com>
> Subject: [PATCH v3] net/i40e: restore disable double VLAN by default
> 
> Previously, QinQ is enabled by default and can't be disabled, but there'll be
> performance drop if QinQ is enabled.
> 
> So, disable QinQ by default.
> 
> Fixes: ae97b8b89826 ("net/i40e: fix error disable double VLAN")
> Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
> 
> ---
> v2: update doc and refine commit log
> ---
> v3: refine commit log
> ---
>  doc/guides/nics/i40e.rst       | 11 +++++++----
>  drivers/net/i40e/i40e_ethdev.c | 12 ------------
>  2 files changed, 7 insertions(+), 16 deletions(-)
> 
> diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst index
> 85fdc4944d..75ff40aa59 100644
> --- a/doc/guides/nics/i40e.rst
> +++ b/doc/guides/nics/i40e.rst
> @@ -969,11 +969,14 @@ it will fail and return the info "Conflict with the first
> rule's input set",  which means the current rule's input set conflicts with the first
> rule's.
>  Remove the first rule if want to change the input set of the PCTYPE.
> 
> -Disable QinQ is not supported when FW >= 8.4 -
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> -
> -If upgrade FW to version 8.4 and higher, enable QinQ by default and disable
> QinQ is not supported.
> +Vlan related feature miss when FW >= 8.4
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> +If upgrade FW to version 8.4 and higher, some vlan related issue exist:
> +1. vlan tci input set not work
> +2. tpid set fail
> +3. need enable qinq before use vlan filter 4. outer vlan strip fail
 
Vlan related features miss when FW >=8.4
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If FW version >= 8.4, there'll be some Vlan related issues:
1. TCI input set for QinQ  is invalid.
2. Fail to configure TPID for QinQ.
3. Need to enable QinQ before enabling Vlan filter.
4. Fail to strip outer Vlan.

> 
>  Example of getting best performance with l3fwd example
>  ------------------------------------------------------
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 684e095026..117dd85c11 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -4027,12 +4027,6 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int
> mask)
>  	}
> 
>  	if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
> -		/* Double VLAN not allowed to be disabled.*/
> -		if (pf->fw8_3gt && !(rxmode->offloads &
> RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)) {
> -			PMD_DRV_LOG(WARNING,
> -				"Disable double VLAN is not allowed after
> firmwarev8.3!");
> -			return 0;
> -		}
>  		i = 0;
>  		num = vsi->mac_num;
>  		mac_filter = rte_zmalloc("mac_filter_info_data",
> @@ -6296,7 +6290,6 @@ int i40e_vsi_cfg_inner_vlan_stripping(struct i40e_vsi
> *vsi, bool on)  static int  i40e_dev_init_vlan(struct rte_eth_dev *dev)  {
> -	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data-
> >dev_private);
>  	struct rte_eth_dev_data *data = dev->data;
>  	int ret;
>  	int mask = 0;
> @@ -6307,11 +6300,6 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev)
>  	       RTE_ETH_VLAN_FILTER_MASK |
>  	       RTE_ETH_VLAN_EXTEND_MASK;
> 
> -	/* Double VLAN be enabled by default.*/
> -	if (pf->fw8_3gt) {
> -		struct rte_eth_rxmode *rxmode = &dev->data-
> >dev_conf.rxmode;
> -		rxmode->offloads |= RTE_ETH_RX_OFFLOAD_VLAN_EXTEND;
> -	}
>  	ret = i40e_vlan_offload_set(dev, mask);
>  	if (ret) {
>  		PMD_DRV_LOG(INFO, "Failed to update vlan offload");
> --
> 2.34.1


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

* [PATCH] net/i40e: restore disable double VLAN by default
@ 2022-07-07 10:47 Kevin Liu
  2022-07-07  5:49 ` Jiang, YuX
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Kevin Liu @ 2022-07-07 10:47 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, Yuying.Zhang, stevex.yang, Kevin Liu

Restore disable double VLAN by default.

Fixes: ae97b8b89826 ("net/i40e: fix error disable double VLAN")
Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
---
 doc/guides/nics/i40e.rst       |  6 +++---
 drivers/net/i40e/i40e_ethdev.c | 12 ------------
 2 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index 85fdc4944d..f61c327726 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -969,10 +969,10 @@ it will fail and return the info "Conflict with the first rule's input set",
 which means the current rule's input set conflicts with the first rule's.
 Remove the first rule if want to change the input set of the PCTYPE.
 
-Disable QinQ is not supported when FW >= 8.4
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+To use VLAN functions, need to enable QinQ when FW >= 8.4
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-If upgrade FW to version 8.4 and higher, enable QinQ by default and disable QinQ is not supported.
+If upgrade FW to version 8.4 and higher, when using VLAN functions, need to enable QinQ.
 
 
 Example of getting best performance with l3fwd example
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 684e095026..117dd85c11 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4027,12 +4027,6 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 	}
 
 	if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
-		/* Double VLAN not allowed to be disabled.*/
-		if (pf->fw8_3gt && !(rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)) {
-			PMD_DRV_LOG(WARNING,
-				"Disable double VLAN is not allowed after firmwarev8.3!");
-			return 0;
-		}
 		i = 0;
 		num = vsi->mac_num;
 		mac_filter = rte_zmalloc("mac_filter_info_data",
@@ -6296,7 +6290,6 @@ int i40e_vsi_cfg_inner_vlan_stripping(struct i40e_vsi *vsi, bool on)
 static int
 i40e_dev_init_vlan(struct rte_eth_dev *dev)
 {
-	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	struct rte_eth_dev_data *data = dev->data;
 	int ret;
 	int mask = 0;
@@ -6307,11 +6300,6 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev)
 	       RTE_ETH_VLAN_FILTER_MASK |
 	       RTE_ETH_VLAN_EXTEND_MASK;
 
-	/* Double VLAN be enabled by default.*/
-	if (pf->fw8_3gt) {
-		struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
-		rxmode->offloads |= RTE_ETH_RX_OFFLOAD_VLAN_EXTEND;
-	}
 	ret = i40e_vlan_offload_set(dev, mask);
 	if (ret) {
 		PMD_DRV_LOG(INFO, "Failed to update vlan offload");
-- 
2.34.1


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

* [PATCH v2] net/i40e: restore disable double VLAN by default
  2022-07-07 10:47 [PATCH] net/i40e: restore disable double VLAN by default Kevin Liu
                   ` (2 preceding siblings ...)
  2022-07-07  6:54 ` Yang, Qiming
@ 2022-07-07 15:22 ` Kevin Liu
  2022-07-07 16:26 ` [PATCH v3] " Kevin Liu
  2022-07-07 17:04 ` [PATCH v4] " Kevin Liu
  5 siblings, 0 replies; 12+ messages in thread
From: Kevin Liu @ 2022-07-07 15:22 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, Yuying.Zhang, stevex.yang, Kevin Liu

Previously, QinQ was enabled by default and cannot be disable,
But a serious issue was found during the performance test,
if QinQ is always enable, the performance will drop seriously.

So, restore disable double VLAN by default and eliminate the
impact of QinQ on Performance.

doc: update known issue.

Fixes: ae97b8b89826 ("net/i40e: fix error disable double VLAN")
Signed-off-by: Kevin Liu <kevinx.liu@intel.com>

---
v2: update doc and refine commit log
---
 doc/guides/nics/i40e.rst       | 11 +++++++----
 drivers/net/i40e/i40e_ethdev.c | 12 ------------
 2 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index 85fdc4944d..75ff40aa59 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -969,11 +969,14 @@ it will fail and return the info "Conflict with the first rule's input set",
 which means the current rule's input set conflicts with the first rule's.
 Remove the first rule if want to change the input set of the PCTYPE.
 
-Disable QinQ is not supported when FW >= 8.4
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-If upgrade FW to version 8.4 and higher, enable QinQ by default and disable QinQ is not supported.
+Vlan related feature miss when FW >= 8.4
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+If upgrade FW to version 8.4 and higher, some vlan related issue exist:
+1. vlan tci input set not work
+2. tpid set fail
+3. need enable qinq before use vlan filter
+4. outer vlan strip fail
 
 Example of getting best performance with l3fwd example
 ------------------------------------------------------
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 684e095026..117dd85c11 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4027,12 +4027,6 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 	}
 
 	if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
-		/* Double VLAN not allowed to be disabled.*/
-		if (pf->fw8_3gt && !(rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)) {
-			PMD_DRV_LOG(WARNING,
-				"Disable double VLAN is not allowed after firmwarev8.3!");
-			return 0;
-		}
 		i = 0;
 		num = vsi->mac_num;
 		mac_filter = rte_zmalloc("mac_filter_info_data",
@@ -6296,7 +6290,6 @@ int i40e_vsi_cfg_inner_vlan_stripping(struct i40e_vsi *vsi, bool on)
 static int
 i40e_dev_init_vlan(struct rte_eth_dev *dev)
 {
-	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	struct rte_eth_dev_data *data = dev->data;
 	int ret;
 	int mask = 0;
@@ -6307,11 +6300,6 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev)
 	       RTE_ETH_VLAN_FILTER_MASK |
 	       RTE_ETH_VLAN_EXTEND_MASK;
 
-	/* Double VLAN be enabled by default.*/
-	if (pf->fw8_3gt) {
-		struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
-		rxmode->offloads |= RTE_ETH_RX_OFFLOAD_VLAN_EXTEND;
-	}
 	ret = i40e_vlan_offload_set(dev, mask);
 	if (ret) {
 		PMD_DRV_LOG(INFO, "Failed to update vlan offload");
-- 
2.34.1


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

* [PATCH v3] net/i40e: restore disable double VLAN by default
  2022-07-07 10:47 [PATCH] net/i40e: restore disable double VLAN by default Kevin Liu
                   ` (3 preceding siblings ...)
  2022-07-07 15:22 ` [PATCH v2] " Kevin Liu
@ 2022-07-07 16:26 ` Kevin Liu
  2022-07-07  8:59   ` Xing, Beilei
  2022-07-07 17:04 ` [PATCH v4] " Kevin Liu
  5 siblings, 1 reply; 12+ messages in thread
From: Kevin Liu @ 2022-07-07 16:26 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, Yuying.Zhang, stevex.yang, Kevin Liu

Previously, QinQ is enabled by default and can't be disabled,
but there'll be performance drop if QinQ is enabled.

So, disable QinQ by default.

Fixes: ae97b8b89826 ("net/i40e: fix error disable double VLAN")
Signed-off-by: Kevin Liu <kevinx.liu@intel.com>

---
v2: update doc and refine commit log
---
v3: refine commit log
---
 doc/guides/nics/i40e.rst       | 11 +++++++----
 drivers/net/i40e/i40e_ethdev.c | 12 ------------
 2 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index 85fdc4944d..75ff40aa59 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -969,11 +969,14 @@ it will fail and return the info "Conflict with the first rule's input set",
 which means the current rule's input set conflicts with the first rule's.
 Remove the first rule if want to change the input set of the PCTYPE.
 
-Disable QinQ is not supported when FW >= 8.4
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-If upgrade FW to version 8.4 and higher, enable QinQ by default and disable QinQ is not supported.
+Vlan related feature miss when FW >= 8.4
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+If upgrade FW to version 8.4 and higher, some vlan related issue exist:
+1. vlan tci input set not work
+2. tpid set fail
+3. need enable qinq before use vlan filter
+4. outer vlan strip fail
 
 Example of getting best performance with l3fwd example
 ------------------------------------------------------
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 684e095026..117dd85c11 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4027,12 +4027,6 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 	}
 
 	if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
-		/* Double VLAN not allowed to be disabled.*/
-		if (pf->fw8_3gt && !(rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)) {
-			PMD_DRV_LOG(WARNING,
-				"Disable double VLAN is not allowed after firmwarev8.3!");
-			return 0;
-		}
 		i = 0;
 		num = vsi->mac_num;
 		mac_filter = rte_zmalloc("mac_filter_info_data",
@@ -6296,7 +6290,6 @@ int i40e_vsi_cfg_inner_vlan_stripping(struct i40e_vsi *vsi, bool on)
 static int
 i40e_dev_init_vlan(struct rte_eth_dev *dev)
 {
-	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	struct rte_eth_dev_data *data = dev->data;
 	int ret;
 	int mask = 0;
@@ -6307,11 +6300,6 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev)
 	       RTE_ETH_VLAN_FILTER_MASK |
 	       RTE_ETH_VLAN_EXTEND_MASK;
 
-	/* Double VLAN be enabled by default.*/
-	if (pf->fw8_3gt) {
-		struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
-		rxmode->offloads |= RTE_ETH_RX_OFFLOAD_VLAN_EXTEND;
-	}
 	ret = i40e_vlan_offload_set(dev, mask);
 	if (ret) {
 		PMD_DRV_LOG(INFO, "Failed to update vlan offload");
-- 
2.34.1


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

* [PATCH v4] net/i40e: restore disable double VLAN by default
  2022-07-07 10:47 [PATCH] net/i40e: restore disable double VLAN by default Kevin Liu
                   ` (4 preceding siblings ...)
  2022-07-07 16:26 ` [PATCH v3] " Kevin Liu
@ 2022-07-07 17:04 ` Kevin Liu
  2022-07-08  0:21   ` Xing, Beilei
  2022-07-11 16:50   ` Thomas Monjalon
  5 siblings, 2 replies; 12+ messages in thread
From: Kevin Liu @ 2022-07-07 17:04 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, Yuying.Zhang, stevex.yang, Kevin Liu

Previously, QinQ is enabled by default and can't be disabled,
but there'll be performance drop if QinQ is enabled.

So, disable QinQ by default.

Fixes: ae97b8b89826 ("net/i40e: fix error disable double VLAN")
Signed-off-by: Kevin Liu <kevinx.liu@intel.com>

---
v2: update doc and refine commit log
---
v3: refine commit log
---
v4: update doc
---
 doc/guides/nics/i40e.rst       | 13 ++++++++-----
 drivers/net/i40e/i40e_ethdev.c | 12 ------------
 2 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index 85fdc4944d..d5938fa8e4 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -969,11 +969,14 @@ it will fail and return the info "Conflict with the first rule's input set",
 which means the current rule's input set conflicts with the first rule's.
 Remove the first rule if want to change the input set of the PCTYPE.
 
-Disable QinQ is not supported when FW >= 8.4
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-If upgrade FW to version 8.4 and higher, enable QinQ by default and disable QinQ is not supported.
-
+Vlan related Features miss when FW >= 8.4
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If FW version >= 8.4, there'll be some Vlan related issues:
+1. TCI input set for QinQ  is invalid.
+2. Fail to configure TPID for QinQ.
+3. Need to enable QinQ before enabling Vlan filter.
+4. Fail to strip outer Vlan.
 
 Example of getting best performance with l3fwd example
 ------------------------------------------------------
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 684e095026..117dd85c11 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4027,12 +4027,6 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 	}
 
 	if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
-		/* Double VLAN not allowed to be disabled.*/
-		if (pf->fw8_3gt && !(rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)) {
-			PMD_DRV_LOG(WARNING,
-				"Disable double VLAN is not allowed after firmwarev8.3!");
-			return 0;
-		}
 		i = 0;
 		num = vsi->mac_num;
 		mac_filter = rte_zmalloc("mac_filter_info_data",
@@ -6296,7 +6290,6 @@ int i40e_vsi_cfg_inner_vlan_stripping(struct i40e_vsi *vsi, bool on)
 static int
 i40e_dev_init_vlan(struct rte_eth_dev *dev)
 {
-	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	struct rte_eth_dev_data *data = dev->data;
 	int ret;
 	int mask = 0;
@@ -6307,11 +6300,6 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev)
 	       RTE_ETH_VLAN_FILTER_MASK |
 	       RTE_ETH_VLAN_EXTEND_MASK;
 
-	/* Double VLAN be enabled by default.*/
-	if (pf->fw8_3gt) {
-		struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
-		rxmode->offloads |= RTE_ETH_RX_OFFLOAD_VLAN_EXTEND;
-	}
 	ret = i40e_vlan_offload_set(dev, mask);
 	if (ret) {
 		PMD_DRV_LOG(INFO, "Failed to update vlan offload");
-- 
2.34.1


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

* RE: [PATCH v4] net/i40e: restore disable double VLAN by default
  2022-07-07 17:04 ` [PATCH v4] " Kevin Liu
@ 2022-07-08  0:21   ` Xing, Beilei
  2022-07-08  0:41     ` Zhang, Qi Z
  2022-07-11 16:50   ` Thomas Monjalon
  1 sibling, 1 reply; 12+ messages in thread
From: Xing, Beilei @ 2022-07-08  0:21 UTC (permalink / raw)
  To: Liu, KevinX, dev; +Cc: Zhang, Yuying, Yang, SteveX



> -----Original Message-----
> From: Liu, KevinX <kevinx.liu@intel.com>
> Sent: Friday, July 8, 2022 1:05 AM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Yuying
> <yuying.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Liu, KevinX
> <kevinx.liu@intel.com>
> Subject: [PATCH v4] net/i40e: restore disable double VLAN by default
> 
> Previously, QinQ is enabled by default and can't be disabled, but there'll be
> performance drop if QinQ is enabled.
> 
> So, disable QinQ by default.
> 
> Fixes: ae97b8b89826 ("net/i40e: fix error disable double VLAN")
> Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
> 
> ---
> v2: update doc and refine commit log
> ---
> v3: refine commit log
> ---
> v4: update doc
> ---
>  doc/guides/nics/i40e.rst       | 13 ++++++++-----
>  drivers/net/i40e/i40e_ethdev.c | 12 ------------
>  2 files changed, 8 insertions(+), 17 deletions(-)
> 
> diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst index
> 85fdc4944d..d5938fa8e4 100644
> --- a/doc/guides/nics/i40e.rst
> +++ b/doc/guides/nics/i40e.rst
> @@ -969,11 +969,14 @@ it will fail and return the info "Conflict with the first
> rule's input set",  which means the current rule's input set conflicts with the first
> rule's.
>  Remove the first rule if want to change the input set of the PCTYPE.
> 
> -Disable QinQ is not supported when FW >= 8.4 -
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> -
> -If upgrade FW to version 8.4 and higher, enable QinQ by default and disable
> QinQ is not supported.
> -
> +Vlan related Features miss when FW >= 8.4
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +If FW version >= 8.4, there'll be some Vlan related issues:
> +1. TCI input set for QinQ  is invalid.
> +2. Fail to configure TPID for QinQ.
> +3. Need to enable QinQ before enabling Vlan filter.
> +4. Fail to strip outer Vlan.
> 
>  Example of getting best performance with l3fwd example
>  ------------------------------------------------------
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 684e095026..117dd85c11 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -4027,12 +4027,6 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int
> mask)
>  	}
> 
>  	if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
> -		/* Double VLAN not allowed to be disabled.*/
> -		if (pf->fw8_3gt && !(rxmode->offloads &
> RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)) {
> -			PMD_DRV_LOG(WARNING,
> -				"Disable double VLAN is not allowed after
> firmwarev8.3!");
> -			return 0;
> -		}
>  		i = 0;
>  		num = vsi->mac_num;
>  		mac_filter = rte_zmalloc("mac_filter_info_data",
> @@ -6296,7 +6290,6 @@ int i40e_vsi_cfg_inner_vlan_stripping(struct i40e_vsi
> *vsi, bool on)  static int  i40e_dev_init_vlan(struct rte_eth_dev *dev)  {
> -	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data-
> >dev_private);
>  	struct rte_eth_dev_data *data = dev->data;
>  	int ret;
>  	int mask = 0;
> @@ -6307,11 +6300,6 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev)
>  	       RTE_ETH_VLAN_FILTER_MASK |
>  	       RTE_ETH_VLAN_EXTEND_MASK;
> 
> -	/* Double VLAN be enabled by default.*/
> -	if (pf->fw8_3gt) {
> -		struct rte_eth_rxmode *rxmode = &dev->data-
> >dev_conf.rxmode;
> -		rxmode->offloads |= RTE_ETH_RX_OFFLOAD_VLAN_EXTEND;
> -	}
>  	ret = i40e_vlan_offload_set(dev, mask);
>  	if (ret) {
>  		PMD_DRV_LOG(INFO, "Failed to update vlan offload");
> --
> 2.34.1

Acked-by: Beilei Xing <beilei.xing@intel.com>


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

* RE: [PATCH v4] net/i40e: restore disable double VLAN by default
  2022-07-08  0:21   ` Xing, Beilei
@ 2022-07-08  0:41     ` Zhang, Qi Z
  0 siblings, 0 replies; 12+ messages in thread
From: Zhang, Qi Z @ 2022-07-08  0:41 UTC (permalink / raw)
  To: Xing, Beilei, Liu, KevinX, dev; +Cc: Zhang, Yuying, Yang, SteveX



> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Friday, July 8, 2022 8:22 AM
> To: Liu, KevinX <kevinx.liu@intel.com>; dev@dpdk.org
> Cc: Zhang, Yuying <yuying.zhang@intel.com>; Yang, SteveX
> <stevex.yang@intel.com>
> Subject: RE: [PATCH v4] net/i40e: restore disable double VLAN by default
> 
> 
> 
> > -----Original Message-----
> > From: Liu, KevinX <kevinx.liu@intel.com>
> > Sent: Friday, July 8, 2022 1:05 AM
> > To: dev@dpdk.org
> > Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Yuying
> > <yuying.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Liu,
> > KevinX <kevinx.liu@intel.com>
> > Subject: [PATCH v4] net/i40e: restore disable double VLAN by default
> >
> > Previously, QinQ is enabled by default and can't be disabled, but
> > there'll be performance drop if QinQ is enabled.
> >
> > So, disable QinQ by default.
> >
> > Fixes: ae97b8b89826 ("net/i40e: fix error disable double VLAN")

The commit log of above patch has been refined 
Correct it to 
Fixes: 5bd74df1dbf5 ("net/i40e: fix QinQ enablement")

> Acked-by: Beilei Xing <beilei.xing@intel.com>

Applied to dpdk-next-net-intel.
Thanks
Qi


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

* Re: [PATCH v4] net/i40e: restore disable double VLAN by default
  2022-07-07 17:04 ` [PATCH v4] " Kevin Liu
  2022-07-08  0:21   ` Xing, Beilei
@ 2022-07-11 16:50   ` Thomas Monjalon
  1 sibling, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2022-07-11 16:50 UTC (permalink / raw)
  To: Kevin Liu; +Cc: dev, beilei.xing, Yuying.Zhang, stevex.yang, john.mcnamara

07/07/2022 19:04, Kevin Liu:
> +Vlan related Features miss when FW >= 8.4
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +If FW version >= 8.4, there'll be some Vlan related issues:
> +1. TCI input set for QinQ  is invalid.
> +2. Fail to configure TPID for QinQ.
> +3. Need to enable QinQ before enabling Vlan filter.
> +4. Fail to strip outer Vlan.

Did you check the HTML rendering?
A blank line is missing before the list.

Also you could use #. for automatic list numbering.

I'll fix when pulling.




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

end of thread, other threads:[~2022-07-11 16:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07 10:47 [PATCH] net/i40e: restore disable double VLAN by default Kevin Liu
2022-07-07  5:49 ` Jiang, YuX
2022-07-07  6:15 ` Han, YingyaX
2022-07-07  6:54 ` Yang, Qiming
2022-07-07  6:59   ` Liu, KevinX
2022-07-07 15:22 ` [PATCH v2] " Kevin Liu
2022-07-07 16:26 ` [PATCH v3] " Kevin Liu
2022-07-07  8:59   ` Xing, Beilei
2022-07-07 17:04 ` [PATCH v4] " Kevin Liu
2022-07-08  0:21   ` Xing, Beilei
2022-07-08  0:41     ` Zhang, Qi Z
2022-07-11 16:50   ` 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).