DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix tx vlan and qinq insert enable
@ 2019-02-19  6:48 Nithin Kumar Dabilpuram
  2019-03-01 16:29 ` Ferruh Yigit
                   ` (3 more replies)
  0 siblings, 4 replies; 36+ messages in thread
From: Nithin Kumar Dabilpuram @ 2019-02-19  6:48 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, Jerin Jacob Kollanukkaran, Nithin Kumar Dabilpuram

Tx VLAN & QinQ insert enable need not depend on
Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. Also enable
DEV_TX_OFFLOAD_VLAN_INSERT for tx_qinq_set() as it takes
both vlan id's.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 app/test-pmd/config.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index b9e5dd9..0243f07 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2955,7 +2955,6 @@ vlan_tpid_set(portid_t port_id, enum rte_vlan_type vlan_type, uint16_t tp_id)
 void
 tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 	if (vlan_id_is_invalid(vlan_id))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
-		printf("Error, as QinQ has been enabled.\n");
-		return;
-	}
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VLAN_INSERT) == 0) {
 		printf("Error: vlan insert is not supported by port %d\n",
@@ -2983,7 +2977,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 void
 tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -2993,11 +2986,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	if (vlan_id_is_invalid(vlan_id_outer))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (!(vlan_offload & ETH_VLAN_EXTEND_OFFLOAD)) {
-		printf("Error, as QinQ hasn't been enabled.\n");
-		return;
-	}
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_QINQ_INSERT) == 0) {
 		printf("Error: qinq insert not supported by port %d\n",
@@ -3006,7 +2994,8 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	}
 
 	tx_vlan_reset(port_id);
-	ports[port_id].dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_QINQ_INSERT;
+	ports[port_id].dev_conf.txmode.offloads |= (DEV_TX_OFFLOAD_VLAN_INSERT |
+						    DEV_TX_OFFLOAD_QINQ_INSERT);
 	ports[port_id].tx_vlan_id = vlan_id;
 	ports[port_id].tx_vlan_id_outer = vlan_id_outer;
 }
-- 
2.8.4

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

* Re: [dpdk-dev] [PATCH] app/testpmd: fix tx vlan and qinq insert enable
  2019-02-19  6:48 [dpdk-dev] [PATCH] app/testpmd: fix tx vlan and qinq insert enable Nithin Kumar Dabilpuram
@ 2019-03-01 16:29 ` Ferruh Yigit
  2019-03-18  9:56 ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Nithin Kumar Dabilpuram
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2019-03-01 16:29 UTC (permalink / raw)
  To: Nithin Kumar Dabilpuram, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, Jerin Jacob Kollanukkaran

On 2/19/2019 6:48 AM, Nithin Kumar Dabilpuram wrote:
> Tx VLAN & QinQ insert enable need not depend on
> Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. 

+1

> Also enable
> DEV_TX_OFFLOAD_VLAN_INSERT for tx_qinq_set() as it takes
> both vlan id's.

+1

Technically two different but related fix, should it be two separate patches,
what do you think?

> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
>  app/test-pmd/config.c | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index b9e5dd9..0243f07 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -2955,7 +2955,6 @@ vlan_tpid_set(portid_t port_id, enum rte_vlan_type vlan_type, uint16_t tp_id)
>  void
>  tx_vlan_set(portid_t port_id, uint16_t vlan_id)
>  {
> -	int vlan_offload;
>  	struct rte_eth_dev_info dev_info;
>  
>  	if (port_id_is_invalid(port_id, ENABLED_WARN))
> @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
>  	if (vlan_id_is_invalid(vlan_id))
>  		return;
>  
> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
> -		printf("Error, as QinQ has been enabled.\n");
> -		return;
> -	}

Here I think intention is if QINQ is enabled 'tx_vlan_id' & 'tx_vlan_id_outer'
should be set by tx_qinq_set() not 'tx_vlan_set', and check is for that.

What do you think keeping same logic?
But of course check should be if 'ports[port_id].dev_conf.txmode.offloads' has
'DEV_TX_OFFLOAD_QINQ_INSERT' instead of above check.

>  	rte_eth_dev_info_get(port_id, &dev_info);
>  	if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VLAN_INSERT) == 0) {
>  		printf("Error: vlan insert is not supported by port %d\n",
> @@ -2983,7 +2977,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
>  void
>  tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
>  {
> -	int vlan_offload;
>  	struct rte_eth_dev_info dev_info;
>  
>  	if (port_id_is_invalid(port_id, ENABLED_WARN))
> @@ -2993,11 +2986,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
>  	if (vlan_id_is_invalid(vlan_id_outer))
>  		return;
>  
> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> -	if (!(vlan_offload & ETH_VLAN_EXTEND_OFFLOAD)) {
> -		printf("Error, as QinQ hasn't been enabled.\n");
> -		return;
> -	}
>  	rte_eth_dev_info_get(port_id, &dev_info);
>  	if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_QINQ_INSERT) == 0) {
>  		printf("Error: qinq insert not supported by port %d\n",
> @@ -3006,7 +2994,8 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
>  	}
>  
>  	tx_vlan_reset(port_id);
> -	ports[port_id].dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_QINQ_INSERT;
> +	ports[port_id].dev_conf.txmode.offloads |= (DEV_TX_OFFLOAD_VLAN_INSERT |
> +						    DEV_TX_OFFLOAD_QINQ_INSERT);
>  	ports[port_id].tx_vlan_id = vlan_id;
>  	ports[port_id].tx_vlan_id_outer = vlan_id_outer;
>  }
> 

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

* [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
  2019-02-19  6:48 [dpdk-dev] [PATCH] app/testpmd: fix tx vlan and qinq insert enable Nithin Kumar Dabilpuram
  2019-03-01 16:29 ` Ferruh Yigit
@ 2019-03-18  9:56 ` Nithin Kumar Dabilpuram
  2019-03-18  9:56   ` Nithin Kumar Dabilpuram
                     ` (2 more replies)
  2019-04-05  7:36 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Nithin Kumar Dabilpuram
  2019-04-05 12:04 ` [dpdk-dev] [PATCH v4 " Nithin Dabilpuram
  3 siblings, 3 replies; 36+ messages in thread
From: Nithin Kumar Dabilpuram @ 2019-03-18  9:56 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, Ferruh Yigit, Nithin Kumar Dabilpuram, xiao.w.wang

Tx VLAN & QinQ insert enable need not depend on
Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD.

Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN")
Cc: xiao.w.wang@intel.com

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
v2:
* Split change into two seperate patches as suggested.

 app/test-pmd/config.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index b9e5dd9..f800503 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2955,7 +2955,6 @@ vlan_tpid_set(portid_t port_id, enum rte_vlan_type vlan_type, uint16_t tp_id)
 void
 tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 	if (vlan_id_is_invalid(vlan_id))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
-		printf("Error, as QinQ has been enabled.\n");
-		return;
-	}
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VLAN_INSERT) == 0) {
 		printf("Error: vlan insert is not supported by port %d\n",
@@ -2983,7 +2977,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 void
 tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -2993,11 +2986,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	if (vlan_id_is_invalid(vlan_id_outer))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (!(vlan_offload & ETH_VLAN_EXTEND_OFFLOAD)) {
-		printf("Error, as QinQ hasn't been enabled.\n");
-		return;
-	}
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_QINQ_INSERT) == 0) {
 		printf("Error: qinq insert not supported by port %d\n",
-- 
2.8.4

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

* [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
  2019-03-18  9:56 ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Nithin Kumar Dabilpuram
@ 2019-03-18  9:56   ` Nithin Kumar Dabilpuram
  2019-03-18  9:56   ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix tx qinq insert enable Nithin Kumar Dabilpuram
  2019-03-21 17:11   ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Ferruh Yigit
  2 siblings, 0 replies; 36+ messages in thread
From: Nithin Kumar Dabilpuram @ 2019-03-18  9:56 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, Ferruh Yigit, Nithin Kumar Dabilpuram, xiao.w.wang

Tx VLAN & QinQ insert enable need not depend on
Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD.

Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN")
Cc: xiao.w.wang@intel.com

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
v2:
* Split change into two seperate patches as suggested.

 app/test-pmd/config.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index b9e5dd9..f800503 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2955,7 +2955,6 @@ vlan_tpid_set(portid_t port_id, enum rte_vlan_type vlan_type, uint16_t tp_id)
 void
 tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 	if (vlan_id_is_invalid(vlan_id))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
-		printf("Error, as QinQ has been enabled.\n");
-		return;
-	}
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VLAN_INSERT) == 0) {
 		printf("Error: vlan insert is not supported by port %d\n",
@@ -2983,7 +2977,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 void
 tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -2993,11 +2986,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	if (vlan_id_is_invalid(vlan_id_outer))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (!(vlan_offload & ETH_VLAN_EXTEND_OFFLOAD)) {
-		printf("Error, as QinQ hasn't been enabled.\n");
-		return;
-	}
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_QINQ_INSERT) == 0) {
 		printf("Error: qinq insert not supported by port %d\n",
-- 
2.8.4


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

* [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix tx qinq insert enable
  2019-03-18  9:56 ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Nithin Kumar Dabilpuram
  2019-03-18  9:56   ` Nithin Kumar Dabilpuram
@ 2019-03-18  9:56   ` Nithin Kumar Dabilpuram
  2019-03-18  9:56     ` Nithin Kumar Dabilpuram
  2019-03-26 17:40     ` Iremonger, Bernard
  2019-03-21 17:11   ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Ferruh Yigit
  2 siblings, 2 replies; 36+ messages in thread
From: Nithin Kumar Dabilpuram @ 2019-03-18  9:56 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, Ferruh Yigit, Nithin Kumar Dabilpuram, shahafs

Enable DEV_TX_OFFLOAD_VLAN_INSERT also along with
DEV_TX_OFFLOAD_VLAN_QINQ in tx_qinq_set() as it takes
both vlan id's as arguments.

Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
Cc: shahafs@mellanox.com

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
v2:
* Split change into two seperate patches as suggested.

 app/test-pmd/config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index f800503..0243f07 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2994,7 +2994,8 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	}
 
 	tx_vlan_reset(port_id);
-	ports[port_id].dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_QINQ_INSERT;
+	ports[port_id].dev_conf.txmode.offloads |= (DEV_TX_OFFLOAD_VLAN_INSERT |
+						    DEV_TX_OFFLOAD_QINQ_INSERT);
 	ports[port_id].tx_vlan_id = vlan_id;
 	ports[port_id].tx_vlan_id_outer = vlan_id_outer;
 }
-- 
2.8.4

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

* [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix tx qinq insert enable
  2019-03-18  9:56   ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix tx qinq insert enable Nithin Kumar Dabilpuram
@ 2019-03-18  9:56     ` Nithin Kumar Dabilpuram
  2019-03-26 17:40     ` Iremonger, Bernard
  1 sibling, 0 replies; 36+ messages in thread
From: Nithin Kumar Dabilpuram @ 2019-03-18  9:56 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, Ferruh Yigit, Nithin Kumar Dabilpuram, shahafs

Enable DEV_TX_OFFLOAD_VLAN_INSERT also along with
DEV_TX_OFFLOAD_VLAN_QINQ in tx_qinq_set() as it takes
both vlan id's as arguments.

Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
Cc: shahafs@mellanox.com

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
v2:
* Split change into two seperate patches as suggested.

 app/test-pmd/config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index f800503..0243f07 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2994,7 +2994,8 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	}
 
 	tx_vlan_reset(port_id);
-	ports[port_id].dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_QINQ_INSERT;
+	ports[port_id].dev_conf.txmode.offloads |= (DEV_TX_OFFLOAD_VLAN_INSERT |
+						    DEV_TX_OFFLOAD_QINQ_INSERT);
 	ports[port_id].tx_vlan_id = vlan_id;
 	ports[port_id].tx_vlan_id_outer = vlan_id_outer;
 }
-- 
2.8.4


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

* Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
  2019-03-18  9:56 ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Nithin Kumar Dabilpuram
  2019-03-18  9:56   ` Nithin Kumar Dabilpuram
  2019-03-18  9:56   ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix tx qinq insert enable Nithin Kumar Dabilpuram
@ 2019-03-21 17:11   ` Ferruh Yigit
  2019-03-21 17:11     ` Ferruh Yigit
                       ` (2 more replies)
  2 siblings, 3 replies; 36+ messages in thread
From: Ferruh Yigit @ 2019-03-21 17:11 UTC (permalink / raw)
  To: Nithin Kumar Dabilpuram, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, xiao.w.wang

On 3/18/2019 9:56 AM, Nithin Kumar Dabilpuram wrote:
> Tx VLAN & QinQ insert enable need not depend on
> Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD.
> 
> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN")
> Cc: xiao.w.wang@intel.com
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>

<...>

> @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
>  	if (vlan_id_is_invalid(vlan_id))
>  		return;
>  
> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
> -		printf("Error, as QinQ has been enabled.\n");
> -		return;
> -	}

It looks like you didn't take account comment on this in previous version, can
you please check it?

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

* Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
  2019-03-21 17:11   ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Ferruh Yigit
@ 2019-03-21 17:11     ` Ferruh Yigit
  2019-03-26 17:33     ` Iremonger, Bernard
  2019-03-31 18:58     ` [dpdk-dev] [EXT] " Nithin Kumar Dabilpuram
  2 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2019-03-21 17:11 UTC (permalink / raw)
  To: Nithin Kumar Dabilpuram, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, xiao.w.wang

On 3/18/2019 9:56 AM, Nithin Kumar Dabilpuram wrote:
> Tx VLAN & QinQ insert enable need not depend on
> Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD.
> 
> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN")
> Cc: xiao.w.wang@intel.com
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>

<...>

> @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
>  	if (vlan_id_is_invalid(vlan_id))
>  		return;
>  
> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
> -		printf("Error, as QinQ has been enabled.\n");
> -		return;
> -	}

It looks like you didn't take account comment on this in previous version, can
you please check it?

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

* Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
  2019-03-21 17:11   ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Ferruh Yigit
  2019-03-21 17:11     ` Ferruh Yigit
@ 2019-03-26 17:33     ` Iremonger, Bernard
  2019-03-26 17:33       ` Iremonger, Bernard
  2019-03-27  9:52       ` Iremonger, Bernard
  2019-03-31 18:58     ` [dpdk-dev] [EXT] " Nithin Kumar Dabilpuram
  2 siblings, 2 replies; 36+ messages in thread
From: Iremonger, Bernard @ 2019-03-26 17:33 UTC (permalink / raw)
  To: Yigit, Ferruh, Nithin Kumar Dabilpuram, Lu, Wenzhuo, Wu, Jingjing
  Cc: dev, Wang, Xiao W

Hi Nithin

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Thursday, March 21, 2019 5:11 PM
> To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Iremonger,
> Bernard <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; Wang, Xiao W <xiao.w.wang@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq
> dependency
> 
> On 3/18/2019 9:56 AM, Nithin Kumar Dabilpuram wrote:
> > Tx VLAN & QinQ insert enable need not depend on Rx VLAN offload
> > ETH_VLAN_EXTEND_OFFLOAD.
> >
> > Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx
> > VLAN")
> > Cc: xiao.w.wang@intel.com
> >
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> 
> <...>
> 
> > @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
> >  	if (vlan_id_is_invalid(vlan_id))
> >  		return;
> >
> > -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> > -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
> > -		printf("Error, as QinQ has been enabled.\n");
> > -		return;
> > -	}
> 
> It looks like you didn't take account comment on this in previous version, can
> you please check it?

./dpdk/devtools/check-git-log.sh -1
Wrong headline lowercase:
        app/testpmd: fix tx vlan and qinq dependency

otherwise 
acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

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

* Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
  2019-03-26 17:33     ` Iremonger, Bernard
@ 2019-03-26 17:33       ` Iremonger, Bernard
  2019-03-27  9:52       ` Iremonger, Bernard
  1 sibling, 0 replies; 36+ messages in thread
From: Iremonger, Bernard @ 2019-03-26 17:33 UTC (permalink / raw)
  To: Yigit, Ferruh, Nithin Kumar Dabilpuram, Lu, Wenzhuo, Wu, Jingjing
  Cc: dev, Wang, Xiao W

Hi Nithin

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Thursday, March 21, 2019 5:11 PM
> To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Iremonger,
> Bernard <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; Wang, Xiao W <xiao.w.wang@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq
> dependency
> 
> On 3/18/2019 9:56 AM, Nithin Kumar Dabilpuram wrote:
> > Tx VLAN & QinQ insert enable need not depend on Rx VLAN offload
> > ETH_VLAN_EXTEND_OFFLOAD.
> >
> > Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx
> > VLAN")
> > Cc: xiao.w.wang@intel.com
> >
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> 
> <...>
> 
> > @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
> >  	if (vlan_id_is_invalid(vlan_id))
> >  		return;
> >
> > -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> > -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
> > -		printf("Error, as QinQ has been enabled.\n");
> > -		return;
> > -	}
> 
> It looks like you didn't take account comment on this in previous version, can
> you please check it?

./dpdk/devtools/check-git-log.sh -1
Wrong headline lowercase:
        app/testpmd: fix tx vlan and qinq dependency

otherwise 
acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

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

* Re: [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix tx qinq insert enable
  2019-03-18  9:56   ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix tx qinq insert enable Nithin Kumar Dabilpuram
  2019-03-18  9:56     ` Nithin Kumar Dabilpuram
@ 2019-03-26 17:40     ` Iremonger, Bernard
  2019-03-26 17:40       ` Iremonger, Bernard
  1 sibling, 1 reply; 36+ messages in thread
From: Iremonger, Bernard @ 2019-03-26 17:40 UTC (permalink / raw)
  To: Nithin Kumar Dabilpuram, Lu, Wenzhuo, Wu, Jingjing
  Cc: dev, Yigit, Ferruh, shahafs

Hi Nithin

<snip>

> Subject: [PATCH v2 2/2] app/testpmd: fix tx qinq insert enable
> 
./dpdk/devtools/check-git-log.sh -1
Wrong headline lowercase:
        app/testpmd: fix tx qinq insert enable

The commit line does not seem correct as it is actually fixing the tx_qinq_set() function.

Otherwise 

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

> Enable DEV_TX_OFFLOAD_VLAN_INSERT also along with
> DEV_TX_OFFLOAD_VLAN_QINQ in tx_qinq_set() as it takes both vlan id's as
> arguments.
> 
> Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
> Cc: shahafs@mellanox.com
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
> v2:
> * Split change into two seperate patches as suggested.
> 
>  app/test-pmd/config.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
> f800503..0243f07 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -2994,7 +2994,8 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id,
> uint16_t vlan_id_outer)
>  	}
> 
>  	tx_vlan_reset(port_id);
> -	ports[port_id].dev_conf.txmode.offloads |=
> DEV_TX_OFFLOAD_QINQ_INSERT;
> +	ports[port_id].dev_conf.txmode.offloads |=
> (DEV_TX_OFFLOAD_VLAN_INSERT |
> +
> DEV_TX_OFFLOAD_QINQ_INSERT);
>  	ports[port_id].tx_vlan_id = vlan_id;
>  	ports[port_id].tx_vlan_id_outer = vlan_id_outer;  }
> --
> 2.8.4

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

* Re: [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix tx qinq insert enable
  2019-03-26 17:40     ` Iremonger, Bernard
@ 2019-03-26 17:40       ` Iremonger, Bernard
  0 siblings, 0 replies; 36+ messages in thread
From: Iremonger, Bernard @ 2019-03-26 17:40 UTC (permalink / raw)
  To: Nithin Kumar Dabilpuram, Lu, Wenzhuo, Wu, Jingjing
  Cc: dev, Yigit, Ferruh, shahafs

Hi Nithin

<snip>

> Subject: [PATCH v2 2/2] app/testpmd: fix tx qinq insert enable
> 
./dpdk/devtools/check-git-log.sh -1
Wrong headline lowercase:
        app/testpmd: fix tx qinq insert enable

The commit line does not seem correct as it is actually fixing the tx_qinq_set() function.

Otherwise 

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

> Enable DEV_TX_OFFLOAD_VLAN_INSERT also along with
> DEV_TX_OFFLOAD_VLAN_QINQ in tx_qinq_set() as it takes both vlan id's as
> arguments.
> 
> Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
> Cc: shahafs@mellanox.com
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
> v2:
> * Split change into two seperate patches as suggested.
> 
>  app/test-pmd/config.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
> f800503..0243f07 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -2994,7 +2994,8 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id,
> uint16_t vlan_id_outer)
>  	}
> 
>  	tx_vlan_reset(port_id);
> -	ports[port_id].dev_conf.txmode.offloads |=
> DEV_TX_OFFLOAD_QINQ_INSERT;
> +	ports[port_id].dev_conf.txmode.offloads |=
> (DEV_TX_OFFLOAD_VLAN_INSERT |
> +
> DEV_TX_OFFLOAD_QINQ_INSERT);
>  	ports[port_id].tx_vlan_id = vlan_id;
>  	ports[port_id].tx_vlan_id_outer = vlan_id_outer;  }
> --
> 2.8.4


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

* Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
  2019-03-26 17:33     ` Iremonger, Bernard
  2019-03-26 17:33       ` Iremonger, Bernard
@ 2019-03-27  9:52       ` Iremonger, Bernard
  2019-03-27  9:52         ` Iremonger, Bernard
  1 sibling, 1 reply; 36+ messages in thread
From: Iremonger, Bernard @ 2019-03-27  9:52 UTC (permalink / raw)
  To: Iremonger, Bernard, Yigit, Ferruh, Nithin Kumar Dabilpuram, Lu,
	Wenzhuo, Wu, Jingjing
  Cc: dev, Wang, Xiao W

Hi Nithin,

<snip>

> > To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Lu, Wenzhuo
> > <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> > Iremonger, Bernard <bernard.iremonger@intel.com>
> > Cc: dev@dpdk.org; Wang, Xiao W <xiao.w.wang@intel.com>
> > Subject: Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and
> > qinq dependency
> >
> > On 3/18/2019 9:56 AM, Nithin Kumar Dabilpuram wrote:
> > > Tx VLAN & QinQ insert enable need not depend on Rx VLAN offload
> > > ETH_VLAN_EXTEND_OFFLOAD.
> > >
> > > Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx
> > > VLAN")
> > > Cc: xiao.w.wang@intel.com
> > >
> > > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> >
> > <...>
> >
> > > @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
> > >  	if (vlan_id_is_invalid(vlan_id))
> > >  		return;
> > >
> > > -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> > > -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
> > > -		printf("Error, as QinQ has been enabled.\n");
> > > -		return;
> > > -	}
> >
> > It looks like you didn't take account comment on this in previous
> > version, can you please check it?
> 
> ./dpdk/devtools/check-git-log.sh -1
> Wrong headline lowercase:
>         app/testpmd: fix tx vlan and qinq dependency
> 
> otherwise
> acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

Please drop my ack until the comment on the v1 patch is addressed.

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

* Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
  2019-03-27  9:52       ` Iremonger, Bernard
@ 2019-03-27  9:52         ` Iremonger, Bernard
  0 siblings, 0 replies; 36+ messages in thread
From: Iremonger, Bernard @ 2019-03-27  9:52 UTC (permalink / raw)
  To: Iremonger, Bernard, Yigit, Ferruh, Nithin Kumar Dabilpuram, Lu,
	Wenzhuo, Wu, Jingjing
  Cc: dev, Wang, Xiao W

Hi Nithin,

<snip>

> > To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Lu, Wenzhuo
> > <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> > Iremonger, Bernard <bernard.iremonger@intel.com>
> > Cc: dev@dpdk.org; Wang, Xiao W <xiao.w.wang@intel.com>
> > Subject: Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and
> > qinq dependency
> >
> > On 3/18/2019 9:56 AM, Nithin Kumar Dabilpuram wrote:
> > > Tx VLAN & QinQ insert enable need not depend on Rx VLAN offload
> > > ETH_VLAN_EXTEND_OFFLOAD.
> > >
> > > Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx
> > > VLAN")
> > > Cc: xiao.w.wang@intel.com
> > >
> > > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> >
> > <...>
> >
> > > @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
> > >  	if (vlan_id_is_invalid(vlan_id))
> > >  		return;
> > >
> > > -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> > > -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
> > > -		printf("Error, as QinQ has been enabled.\n");
> > > -		return;
> > > -	}
> >
> > It looks like you didn't take account comment on this in previous
> > version, can you please check it?
> 
> ./dpdk/devtools/check-git-log.sh -1
> Wrong headline lowercase:
>         app/testpmd: fix tx vlan and qinq dependency
> 
> otherwise
> acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

Please drop my ack until the comment on the v1 patch is addressed.

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

* Re: [dpdk-dev] [EXT] Re: [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
  2019-03-21 17:11   ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Ferruh Yigit
  2019-03-21 17:11     ` Ferruh Yigit
  2019-03-26 17:33     ` Iremonger, Bernard
@ 2019-03-31 18:58     ` Nithin Kumar Dabilpuram
  2019-03-31 18:58       ` Nithin Kumar Dabilpuram
  2019-04-01 19:10       ` Ferruh Yigit
  2 siblings, 2 replies; 36+ messages in thread
From: Nithin Kumar Dabilpuram @ 2019-03-31 18:58 UTC (permalink / raw)
  To: Ferruh Yigit, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger; +Cc: dev, xiao.w.wang

Hi Ferruh Yigit,

Sorry, missed to see your inline comment about the check in v1.

>> @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
>>  	if (vlan_id_is_invalid(vlan_id))
>>  		return;
>>  
>> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
>> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
>> -		printf("Error, as QinQ has been enabled.\n");
>> -		return;
>> -	}

> Here I think intention is if QINQ is enabled 'tx_vlan_id' & 'tx_vlan_id_outer'
> should be set by tx_qinq_set() not 'tx_vlan_set', and check is for that.

> What do you think keeping same logic?
> But of course check should be if 'ports[port_id].dev_conf.txmode.offloads' has 'DEV_TX_OFFLOAD_QINQ_INSERT' instead of above check.

Since tx_vlan_set() and tx_qinq_set() are they themselves are resetting/setting those flags in 'ports[port_id].dev_conf.txmode.offloads', 
do you think having such a check before clearing and setting flags be consistent ?
Current behavior is to override last setting with new setting. All the settings could be completely disabled by cmdline "tx vlan reset"

--
Thanks
Nithin



-----Original Message-----
From: Ferruh Yigit <ferruh.yigit@intel.com> 
Sent: Thursday, March 21, 2019 10:41 PM
To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Wenzhuo Lu <wenzhuo.lu@intel.com>; Jingjing Wu <jingjing.wu@intel.com>; Bernard Iremonger <bernard.iremonger@intel.com>
Cc: dev@dpdk.org; xiao.w.wang@intel.com
Subject: [EXT] Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency

External Email

----------------------------------------------------------------------
On 3/18/2019 9:56 AM, Nithin Kumar Dabilpuram wrote:
> Tx VLAN & QinQ insert enable need not depend on Rx VLAN offload 
> ETH_VLAN_EXTEND_OFFLOAD.
> 
> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx 
> VLAN")
> Cc: xiao.w.wang@intel.com
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>

<...>

> @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
>  	if (vlan_id_is_invalid(vlan_id))
>  		return;
>  
> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
> -		printf("Error, as QinQ has been enabled.\n");
> -		return;
> -	}

It looks like you didn't take account comment on this in previous version, can you please check it?

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

* Re: [dpdk-dev] [EXT] Re: [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
  2019-03-31 18:58     ` [dpdk-dev] [EXT] " Nithin Kumar Dabilpuram
@ 2019-03-31 18:58       ` Nithin Kumar Dabilpuram
  2019-04-01 19:10       ` Ferruh Yigit
  1 sibling, 0 replies; 36+ messages in thread
From: Nithin Kumar Dabilpuram @ 2019-03-31 18:58 UTC (permalink / raw)
  To: Ferruh Yigit, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger; +Cc: dev, xiao.w.wang

Hi Ferruh Yigit,

Sorry, missed to see your inline comment about the check in v1.

>> @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
>>  	if (vlan_id_is_invalid(vlan_id))
>>  		return;
>>  
>> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
>> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
>> -		printf("Error, as QinQ has been enabled.\n");
>> -		return;
>> -	}

> Here I think intention is if QINQ is enabled 'tx_vlan_id' & 'tx_vlan_id_outer'
> should be set by tx_qinq_set() not 'tx_vlan_set', and check is for that.

> What do you think keeping same logic?
> But of course check should be if 'ports[port_id].dev_conf.txmode.offloads' has 'DEV_TX_OFFLOAD_QINQ_INSERT' instead of above check.

Since tx_vlan_set() and tx_qinq_set() are they themselves are resetting/setting those flags in 'ports[port_id].dev_conf.txmode.offloads', 
do you think having such a check before clearing and setting flags be consistent ?
Current behavior is to override last setting with new setting. All the settings could be completely disabled by cmdline "tx vlan reset"

--
Thanks
Nithin



-----Original Message-----
From: Ferruh Yigit <ferruh.yigit@intel.com> 
Sent: Thursday, March 21, 2019 10:41 PM
To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Wenzhuo Lu <wenzhuo.lu@intel.com>; Jingjing Wu <jingjing.wu@intel.com>; Bernard Iremonger <bernard.iremonger@intel.com>
Cc: dev@dpdk.org; xiao.w.wang@intel.com
Subject: [EXT] Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency

External Email

----------------------------------------------------------------------
On 3/18/2019 9:56 AM, Nithin Kumar Dabilpuram wrote:
> Tx VLAN & QinQ insert enable need not depend on Rx VLAN offload 
> ETH_VLAN_EXTEND_OFFLOAD.
> 
> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx 
> VLAN")
> Cc: xiao.w.wang@intel.com
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>

<...>

> @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
>  	if (vlan_id_is_invalid(vlan_id))
>  		return;
>  
> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
> -		printf("Error, as QinQ has been enabled.\n");
> -		return;
> -	}

It looks like you didn't take account comment on this in previous version, can you please check it?

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

* Re: [dpdk-dev] [EXT] Re: [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
  2019-03-31 18:58     ` [dpdk-dev] [EXT] " Nithin Kumar Dabilpuram
  2019-03-31 18:58       ` Nithin Kumar Dabilpuram
@ 2019-04-01 19:10       ` Ferruh Yigit
  2019-04-01 19:10         ` Ferruh Yigit
  2019-04-02  2:35         ` Wang, Xiao W
  1 sibling, 2 replies; 36+ messages in thread
From: Ferruh Yigit @ 2019-04-01 19:10 UTC (permalink / raw)
  To: Nithin Kumar Dabilpuram, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, xiao.w.wang

On 3/31/2019 7:58 PM, Nithin Kumar Dabilpuram wrote:
> Hi Ferruh Yigit,
> 
> Sorry, missed to see your inline comment about the check in v1.
> 
>>> @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
>>>  	if (vlan_id_is_invalid(vlan_id))
>>>  		return;
>>>  
>>> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
>>> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
>>> -		printf("Error, as QinQ has been enabled.\n");
>>> -		return;
>>> -	}
> 
>> Here I think intention is if QINQ is enabled 'tx_vlan_id' & 'tx_vlan_id_outer'
>> should be set by tx_qinq_set() not 'tx_vlan_set', and check is for that.
> 
>> What do you think keeping same logic?
>> But of course check should be if 'ports[port_id].dev_conf.txmode.offloads' has 'DEV_TX_OFFLOAD_QINQ_INSERT' instead of above check.
> 
> Since tx_vlan_set() and tx_qinq_set() are they themselves are resetting/setting those flags in 'ports[port_id].dev_conf.txmode.offloads', 
> do you think having such a check before clearing and setting flags be consistent ?
> Current behavior is to override last setting with new setting. All the settings could be completely disabled by cmdline "tx vlan reset"

When QINQ offload is enabled:
  'vlan_id' & 'vlan_id_outer' should be set together via 'tx_qinq_set()'
  This is "tx_vlan set <port_id> <vlan_id> <outer_vlan_id>" command

When VLAN offload is enabled:
  'vlan_id' should be set via 'tx_vlan_set()'
  This is "tx_vlan set <port_id> <vlan_id>" command

basically, the check above is to prevent to setting only 'vlan_id' once both
"<vlan_id> <outer_vlan_id>" set.

I don't know the main reason of the intention of current implementation, I
assume it is to help user to prevent make mistake.

This patch is to prevent 'ETH_VLAN_EXTEND_OFFLOAD' dependency, I believe it
makes sense.

But my concern this patch is also changing above intention silently, and if we
should keep the intention?

If you think that QINQ protection is also should removed, that is OK, only
please make it separate patch with describing the impact.

Thanks,
ferruh

> 
> --
> Thanks
> Nithin
> 
> 
> 
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com> 
> Sent: Thursday, March 21, 2019 10:41 PM
> To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Wenzhuo Lu <wenzhuo.lu@intel.com>; Jingjing Wu <jingjing.wu@intel.com>; Bernard Iremonger <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; xiao.w.wang@intel.com
> Subject: [EXT] Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
> 
> External Email
> 
> ----------------------------------------------------------------------
> On 3/18/2019 9:56 AM, Nithin Kumar Dabilpuram wrote:
>> Tx VLAN & QinQ insert enable need not depend on Rx VLAN offload 
>> ETH_VLAN_EXTEND_OFFLOAD.
>>
>> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx 
>> VLAN")
>> Cc: xiao.w.wang@intel.com
>>
>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> 
> <...>
> 
>> @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
>>  	if (vlan_id_is_invalid(vlan_id))
>>  		return;
>>  
>> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
>> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
>> -		printf("Error, as QinQ has been enabled.\n");
>> -		return;
>> -	}
> 
> It looks like you didn't take account comment on this in previous version, can you please check it?
> 

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

* Re: [dpdk-dev] [EXT] Re: [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
  2019-04-01 19:10       ` Ferruh Yigit
@ 2019-04-01 19:10         ` Ferruh Yigit
  2019-04-02  2:35         ` Wang, Xiao W
  1 sibling, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2019-04-01 19:10 UTC (permalink / raw)
  To: Nithin Kumar Dabilpuram, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, xiao.w.wang

On 3/31/2019 7:58 PM, Nithin Kumar Dabilpuram wrote:
> Hi Ferruh Yigit,
> 
> Sorry, missed to see your inline comment about the check in v1.
> 
>>> @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
>>>  	if (vlan_id_is_invalid(vlan_id))
>>>  		return;
>>>  
>>> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
>>> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
>>> -		printf("Error, as QinQ has been enabled.\n");
>>> -		return;
>>> -	}
> 
>> Here I think intention is if QINQ is enabled 'tx_vlan_id' & 'tx_vlan_id_outer'
>> should be set by tx_qinq_set() not 'tx_vlan_set', and check is for that.
> 
>> What do you think keeping same logic?
>> But of course check should be if 'ports[port_id].dev_conf.txmode.offloads' has 'DEV_TX_OFFLOAD_QINQ_INSERT' instead of above check.
> 
> Since tx_vlan_set() and tx_qinq_set() are they themselves are resetting/setting those flags in 'ports[port_id].dev_conf.txmode.offloads', 
> do you think having such a check before clearing and setting flags be consistent ?
> Current behavior is to override last setting with new setting. All the settings could be completely disabled by cmdline "tx vlan reset"

When QINQ offload is enabled:
  'vlan_id' & 'vlan_id_outer' should be set together via 'tx_qinq_set()'
  This is "tx_vlan set <port_id> <vlan_id> <outer_vlan_id>" command

When VLAN offload is enabled:
  'vlan_id' should be set via 'tx_vlan_set()'
  This is "tx_vlan set <port_id> <vlan_id>" command

basically, the check above is to prevent to setting only 'vlan_id' once both
"<vlan_id> <outer_vlan_id>" set.

I don't know the main reason of the intention of current implementation, I
assume it is to help user to prevent make mistake.

This patch is to prevent 'ETH_VLAN_EXTEND_OFFLOAD' dependency, I believe it
makes sense.

But my concern this patch is also changing above intention silently, and if we
should keep the intention?

If you think that QINQ protection is also should removed, that is OK, only
please make it separate patch with describing the impact.

Thanks,
ferruh

> 
> --
> Thanks
> Nithin
> 
> 
> 
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com> 
> Sent: Thursday, March 21, 2019 10:41 PM
> To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Wenzhuo Lu <wenzhuo.lu@intel.com>; Jingjing Wu <jingjing.wu@intel.com>; Bernard Iremonger <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; xiao.w.wang@intel.com
> Subject: [EXT] Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
> 
> External Email
> 
> ----------------------------------------------------------------------
> On 3/18/2019 9:56 AM, Nithin Kumar Dabilpuram wrote:
>> Tx VLAN & QinQ insert enable need not depend on Rx VLAN offload 
>> ETH_VLAN_EXTEND_OFFLOAD.
>>
>> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx 
>> VLAN")
>> Cc: xiao.w.wang@intel.com
>>
>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> 
> <...>
> 
>> @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
>>  	if (vlan_id_is_invalid(vlan_id))
>>  		return;
>>  
>> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
>> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
>> -		printf("Error, as QinQ has been enabled.\n");
>> -		return;
>> -	}
> 
> It looks like you didn't take account comment on this in previous version, can you please check it?
> 


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

* Re: [dpdk-dev] [EXT] Re: [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
  2019-04-01 19:10       ` Ferruh Yigit
  2019-04-01 19:10         ` Ferruh Yigit
@ 2019-04-02  2:35         ` Wang, Xiao W
  2019-04-02  2:35           ` Wang, Xiao W
  1 sibling, 1 reply; 36+ messages in thread
From: Wang, Xiao W @ 2019-04-02  2:35 UTC (permalink / raw)
  To: Yigit, Ferruh, Nithin Kumar Dabilpuram, Lu, Wenzhuo, Wu,
	Jingjing, Iremonger, Bernard
  Cc: dev

Hi,

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Tuesday, April 2, 2019 3:10 AM
> To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Iremonger,
> Bernard <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; Wang, Xiao W <xiao.w.wang@intel.com>
> Subject: Re: [EXT] Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and
> qinq dependency
> 
> On 3/31/2019 7:58 PM, Nithin Kumar Dabilpuram wrote:
> > Hi Ferruh Yigit,
> >
> > Sorry, missed to see your inline comment about the check in v1.
> >
> >>> @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
> >>>  	if (vlan_id_is_invalid(vlan_id))
> >>>  		return;
> >>>
> >>> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> >>> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
> >>> -		printf("Error, as QinQ has been enabled.\n");
> >>> -		return;
> >>> -	}
> >
> >> Here I think intention is if QINQ is enabled 'tx_vlan_id' & 'tx_vlan_id_outer'
> >> should be set by tx_qinq_set() not 'tx_vlan_set', and check is for that.
> >
> >> What do you think keeping same logic?
> >> But of course check should be if 'ports[port_id].dev_conf.txmode.offloads'
> has 'DEV_TX_OFFLOAD_QINQ_INSERT' instead of above check.
> >
> > Since tx_vlan_set() and tx_qinq_set() are they themselves are
> resetting/setting those flags in 'ports[port_id].dev_conf.txmode.offloads',
> > do you think having such a check before clearing and setting flags be
> consistent ?
> > Current behavior is to override last setting with new setting. All the settings
> could be completely disabled by cmdline "tx vlan reset"
> 
> When QINQ offload is enabled:
>   'vlan_id' & 'vlan_id_outer' should be set together via 'tx_qinq_set()'
>   This is "tx_vlan set <port_id> <vlan_id> <outer_vlan_id>" command
> 
> When VLAN offload is enabled:
>   'vlan_id' should be set via 'tx_vlan_set()'
>   This is "tx_vlan set <port_id> <vlan_id>" command
> 
> basically, the check above is to prevent to setting only 'vlan_id' once both
> "<vlan_id> <outer_vlan_id>" set.
> 
> I don't know the main reason of the intention of current implementation, I
> assume it is to help user to prevent make mistake.
> 
> This patch is to prevent 'ETH_VLAN_EXTEND_OFFLOAD' dependency, I believe
> it
> makes sense.
> 
> But my concern this patch is also changing above intention silently, and if we
> should keep the intention?
> 
> If you think that QINQ protection is also should removed, that is OK, only
> please make it separate patch with describing the impact.
> 
> Thanks,
> Ferruh

Yes, it makes sense to remove the 'ETH_VLAN_EXTEND_OFFLOAD' dependency for VLAN/QINQ insertion.
It's the 92ebda07ee58 ("app/testpmd: add qinq stripping and insertion") that introduced this logic,
6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN") fixed the port id check issue.

I think the original intention is to avoid mixing up VLAN insertion and QINQ insertion, since both are changing the vlan_id.
If user set QINQ first and then changes to just VLAN insertion, but he/she gets no warning about QINQ config still exists.
From this point of view, VLAN insertion and QINQ insertion should be mutual exclusive.

And like Ferruh said, this check should be like: if (ports[port_id].dev_conf.txmode.offloads & DEV_TX_OFFLOAD_QINQ_INSERT)

Thanks,
Xiao

> 
> >
> > --
> > Thanks
> > Nithin
> >
> >
> >
> > -----Original Message-----
> > From: Ferruh Yigit <ferruh.yigit@intel.com>
> > Sent: Thursday, March 21, 2019 10:41 PM
> > To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Wenzhuo Lu
> <wenzhuo.lu@intel.com>; Jingjing Wu <jingjing.wu@intel.com>; Bernard
> Iremonger <bernard.iremonger@intel.com>
> > Cc: dev@dpdk.org; xiao.w.wang@intel.com
> > Subject: [EXT] Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and
> qinq dependency
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > On 3/18/2019 9:56 AM, Nithin Kumar Dabilpuram wrote:
> >> Tx VLAN & QinQ insert enable need not depend on Rx VLAN offload
> >> ETH_VLAN_EXTEND_OFFLOAD.
> >>
> >> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx
> >> VLAN")
> >> Cc: xiao.w.wang@intel.com
> >>
> >> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> >
> > <...>
> >
> >> @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
> >>  	if (vlan_id_is_invalid(vlan_id))
> >>  		return;
> >>
> >> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> >> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
> >> -		printf("Error, as QinQ has been enabled.\n");
> >> -		return;
> >> -	}
> >
> > It looks like you didn't take account comment on this in previous version, can
> you please check it?
> >


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

* Re: [dpdk-dev] [EXT] Re: [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
  2019-04-02  2:35         ` Wang, Xiao W
@ 2019-04-02  2:35           ` Wang, Xiao W
  0 siblings, 0 replies; 36+ messages in thread
From: Wang, Xiao W @ 2019-04-02  2:35 UTC (permalink / raw)
  To: Yigit, Ferruh, Nithin Kumar Dabilpuram, Lu, Wenzhuo, Wu,
	Jingjing, Iremonger, Bernard
  Cc: dev

Hi,

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Tuesday, April 2, 2019 3:10 AM
> To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Iremonger,
> Bernard <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; Wang, Xiao W <xiao.w.wang@intel.com>
> Subject: Re: [EXT] Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and
> qinq dependency
> 
> On 3/31/2019 7:58 PM, Nithin Kumar Dabilpuram wrote:
> > Hi Ferruh Yigit,
> >
> > Sorry, missed to see your inline comment about the check in v1.
> >
> >>> @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
> >>>  	if (vlan_id_is_invalid(vlan_id))
> >>>  		return;
> >>>
> >>> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> >>> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
> >>> -		printf("Error, as QinQ has been enabled.\n");
> >>> -		return;
> >>> -	}
> >
> >> Here I think intention is if QINQ is enabled 'tx_vlan_id' & 'tx_vlan_id_outer'
> >> should be set by tx_qinq_set() not 'tx_vlan_set', and check is for that.
> >
> >> What do you think keeping same logic?
> >> But of course check should be if 'ports[port_id].dev_conf.txmode.offloads'
> has 'DEV_TX_OFFLOAD_QINQ_INSERT' instead of above check.
> >
> > Since tx_vlan_set() and tx_qinq_set() are they themselves are
> resetting/setting those flags in 'ports[port_id].dev_conf.txmode.offloads',
> > do you think having such a check before clearing and setting flags be
> consistent ?
> > Current behavior is to override last setting with new setting. All the settings
> could be completely disabled by cmdline "tx vlan reset"
> 
> When QINQ offload is enabled:
>   'vlan_id' & 'vlan_id_outer' should be set together via 'tx_qinq_set()'
>   This is "tx_vlan set <port_id> <vlan_id> <outer_vlan_id>" command
> 
> When VLAN offload is enabled:
>   'vlan_id' should be set via 'tx_vlan_set()'
>   This is "tx_vlan set <port_id> <vlan_id>" command
> 
> basically, the check above is to prevent to setting only 'vlan_id' once both
> "<vlan_id> <outer_vlan_id>" set.
> 
> I don't know the main reason of the intention of current implementation, I
> assume it is to help user to prevent make mistake.
> 
> This patch is to prevent 'ETH_VLAN_EXTEND_OFFLOAD' dependency, I believe
> it
> makes sense.
> 
> But my concern this patch is also changing above intention silently, and if we
> should keep the intention?
> 
> If you think that QINQ protection is also should removed, that is OK, only
> please make it separate patch with describing the impact.
> 
> Thanks,
> Ferruh

Yes, it makes sense to remove the 'ETH_VLAN_EXTEND_OFFLOAD' dependency for VLAN/QINQ insertion.
It's the 92ebda07ee58 ("app/testpmd: add qinq stripping and insertion") that introduced this logic,
6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN") fixed the port id check issue.

I think the original intention is to avoid mixing up VLAN insertion and QINQ insertion, since both are changing the vlan_id.
If user set QINQ first and then changes to just VLAN insertion, but he/she gets no warning about QINQ config still exists.
From this point of view, VLAN insertion and QINQ insertion should be mutual exclusive.

And like Ferruh said, this check should be like: if (ports[port_id].dev_conf.txmode.offloads & DEV_TX_OFFLOAD_QINQ_INSERT)

Thanks,
Xiao

> 
> >
> > --
> > Thanks
> > Nithin
> >
> >
> >
> > -----Original Message-----
> > From: Ferruh Yigit <ferruh.yigit@intel.com>
> > Sent: Thursday, March 21, 2019 10:41 PM
> > To: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Wenzhuo Lu
> <wenzhuo.lu@intel.com>; Jingjing Wu <jingjing.wu@intel.com>; Bernard
> Iremonger <bernard.iremonger@intel.com>
> > Cc: dev@dpdk.org; xiao.w.wang@intel.com
> > Subject: [EXT] Re: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and
> qinq dependency
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > On 3/18/2019 9:56 AM, Nithin Kumar Dabilpuram wrote:
> >> Tx VLAN & QinQ insert enable need not depend on Rx VLAN offload
> >> ETH_VLAN_EXTEND_OFFLOAD.
> >>
> >> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx
> >> VLAN")
> >> Cc: xiao.w.wang@intel.com
> >>
> >> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> >
> > <...>
> >
> >> @@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
> >>  	if (vlan_id_is_invalid(vlan_id))
> >>  		return;
> >>
> >> -	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
> >> -	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
> >> -		printf("Error, as QinQ has been enabled.\n");
> >> -		return;
> >> -	}
> >
> > It looks like you didn't take account comment on this in previous version, can
> you please check it?
> >


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

* [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency
  2019-02-19  6:48 [dpdk-dev] [PATCH] app/testpmd: fix tx vlan and qinq insert enable Nithin Kumar Dabilpuram
  2019-03-01 16:29 ` Ferruh Yigit
  2019-03-18  9:56 ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Nithin Kumar Dabilpuram
@ 2019-04-05  7:36 ` Nithin Kumar Dabilpuram
  2019-04-05  7:36   ` Nithin Kumar Dabilpuram
                     ` (2 more replies)
  2019-04-05 12:04 ` [dpdk-dev] [PATCH v4 " Nithin Dabilpuram
  3 siblings, 3 replies; 36+ messages in thread
From: Nithin Kumar Dabilpuram @ 2019-04-05  7:36 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, Ferruh Yigit, Nithin Kumar Dabilpuram, xiao.w.wang

Tx VLAN & QinQ insert enable need not depend on
Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. For Tx VLAN
insert enable, error check is now to see if QinQ was enabled
but only single VLAN id is set.

Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN")
Cc: xiao.w.wang@intel.com

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
v3:
* Add back error check in tx_vlan_set() to check if QinQ is
already enabled. Also fix headline.
v2:
* Split change into two seperate patches as suggested.

 app/test-pmd/config.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cadcb51..010e26d 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2962,7 +2962,6 @@ vlan_tpid_set(portid_t port_id, enum rte_vlan_type vlan_type, uint16_t tp_id)
 void
 tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -2970,8 +2969,8 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 	if (vlan_id_is_invalid(vlan_id))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
+	if (ports[port_id].dev_conf.txmode.offloads &
+	    DEV_TX_OFFLOAD_QINQ_INSERT) {
 		printf("Error, as QinQ has been enabled.\n");
 		return;
 	}
@@ -2990,7 +2989,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 void
 tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -3000,11 +2998,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	if (vlan_id_is_invalid(vlan_id_outer))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (!(vlan_offload & ETH_VLAN_EXTEND_OFFLOAD)) {
-		printf("Error, as QinQ hasn't been enabled.\n");
-		return;
-	}
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_QINQ_INSERT) == 0) {
 		printf("Error: qinq insert not supported by port %d\n",
-- 
2.8.4


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

* [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency
  2019-04-05  7:36 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Nithin Kumar Dabilpuram
@ 2019-04-05  7:36   ` Nithin Kumar Dabilpuram
  2019-04-05  7:36   ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix Tx QinQ set Nithin Kumar Dabilpuram
  2019-04-05 13:36   ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Ferruh Yigit
  2 siblings, 0 replies; 36+ messages in thread
From: Nithin Kumar Dabilpuram @ 2019-04-05  7:36 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, Ferruh Yigit, Nithin Kumar Dabilpuram, xiao.w.wang

Tx VLAN & QinQ insert enable need not depend on
Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. For Tx VLAN
insert enable, error check is now to see if QinQ was enabled
but only single VLAN id is set.

Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN")
Cc: xiao.w.wang@intel.com

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
v3:
* Add back error check in tx_vlan_set() to check if QinQ is
already enabled. Also fix headline.
v2:
* Split change into two seperate patches as suggested.

 app/test-pmd/config.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cadcb51..010e26d 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2962,7 +2962,6 @@ vlan_tpid_set(portid_t port_id, enum rte_vlan_type vlan_type, uint16_t tp_id)
 void
 tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -2970,8 +2969,8 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 	if (vlan_id_is_invalid(vlan_id))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
+	if (ports[port_id].dev_conf.txmode.offloads &
+	    DEV_TX_OFFLOAD_QINQ_INSERT) {
 		printf("Error, as QinQ has been enabled.\n");
 		return;
 	}
@@ -2990,7 +2989,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 void
 tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -3000,11 +2998,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	if (vlan_id_is_invalid(vlan_id_outer))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (!(vlan_offload & ETH_VLAN_EXTEND_OFFLOAD)) {
-		printf("Error, as QinQ hasn't been enabled.\n");
-		return;
-	}
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_QINQ_INSERT) == 0) {
 		printf("Error: qinq insert not supported by port %d\n",
-- 
2.8.4


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

* [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix Tx QinQ set
  2019-04-05  7:36 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Nithin Kumar Dabilpuram
  2019-04-05  7:36   ` Nithin Kumar Dabilpuram
@ 2019-04-05  7:36   ` Nithin Kumar Dabilpuram
  2019-04-05  7:36     ` Nithin Kumar Dabilpuram
  2019-04-05 13:36   ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Ferruh Yigit
  2 siblings, 1 reply; 36+ messages in thread
From: Nithin Kumar Dabilpuram @ 2019-04-05  7:36 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, Ferruh Yigit, Nithin Kumar Dabilpuram, shahafs

Enable DEV_TX_OFFLOAD_VLAN_INSERT also along with
DEV_TX_OFFLOAD_VLAN_QINQ in tx_qinq_set() as it takes
both vlan id's as arguments.

Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
Cc: shahafs@mellanox.com

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---

v3:
* Rename headline
v2:
* Split change into two seperate patches as suggested.

 app/test-pmd/config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 010e26d..f9cb129 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3006,7 +3006,8 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	}
 
 	tx_vlan_reset(port_id);
-	ports[port_id].dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_QINQ_INSERT;
+	ports[port_id].dev_conf.txmode.offloads |= (DEV_TX_OFFLOAD_VLAN_INSERT |
+						    DEV_TX_OFFLOAD_QINQ_INSERT);
 	ports[port_id].tx_vlan_id = vlan_id;
 	ports[port_id].tx_vlan_id_outer = vlan_id_outer;
 }
-- 
2.8.4


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

* [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix Tx QinQ set
  2019-04-05  7:36   ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix Tx QinQ set Nithin Kumar Dabilpuram
@ 2019-04-05  7:36     ` Nithin Kumar Dabilpuram
  0 siblings, 0 replies; 36+ messages in thread
From: Nithin Kumar Dabilpuram @ 2019-04-05  7:36 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, Ferruh Yigit, Nithin Kumar Dabilpuram, shahafs

Enable DEV_TX_OFFLOAD_VLAN_INSERT also along with
DEV_TX_OFFLOAD_VLAN_QINQ in tx_qinq_set() as it takes
both vlan id's as arguments.

Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
Cc: shahafs@mellanox.com

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---

v3:
* Rename headline
v2:
* Split change into two seperate patches as suggested.

 app/test-pmd/config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 010e26d..f9cb129 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3006,7 +3006,8 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	}
 
 	tx_vlan_reset(port_id);
-	ports[port_id].dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_QINQ_INSERT;
+	ports[port_id].dev_conf.txmode.offloads |= (DEV_TX_OFFLOAD_VLAN_INSERT |
+						    DEV_TX_OFFLOAD_QINQ_INSERT);
 	ports[port_id].tx_vlan_id = vlan_id;
 	ports[port_id].tx_vlan_id_outer = vlan_id_outer;
 }
-- 
2.8.4


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

* [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency
  2019-02-19  6:48 [dpdk-dev] [PATCH] app/testpmd: fix tx vlan and qinq insert enable Nithin Kumar Dabilpuram
                   ` (2 preceding siblings ...)
  2019-04-05  7:36 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Nithin Kumar Dabilpuram
@ 2019-04-05 12:04 ` Nithin Dabilpuram
  2019-04-05 12:04   ` Nithin Dabilpuram
                     ` (2 more replies)
  3 siblings, 3 replies; 36+ messages in thread
From: Nithin Dabilpuram @ 2019-04-05 12:04 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: Ferruh Yigit, dev, Wang Xiao W, Nithin Dabilpuram

From: Nithin Dabilpuram <ndabilpuram@marvell.com>

Tx VLAN & QinQ insert enable need not depend on
Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. For Tx VLAN
insert enable, error check is now to see if QinQ was enabled
but only single VLAN id is set.

Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN")
Cc: xiao.w.wang@intel.com

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
v4:
* Resend v3 from different mailserver to avoid 
  CRLF
v3:
* Add back error check in tx_vlan_set() to check if QinQ is
already enabled. Also fix headline.
v2:
* Split change into two seperate patches as suggested.

 app/test-pmd/config.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cadcb51..010e26d 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2962,7 +2962,6 @@ vlan_tpid_set(portid_t port_id, enum rte_vlan_type vlan_type, uint16_t tp_id)
 void
 tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -2970,8 +2969,8 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 	if (vlan_id_is_invalid(vlan_id))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
+	if (ports[port_id].dev_conf.txmode.offloads &
+	    DEV_TX_OFFLOAD_QINQ_INSERT) {
 		printf("Error, as QinQ has been enabled.\n");
 		return;
 	}
@@ -2990,7 +2989,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 void
 tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -3000,11 +2998,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	if (vlan_id_is_invalid(vlan_id_outer))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (!(vlan_offload & ETH_VLAN_EXTEND_OFFLOAD)) {
-		printf("Error, as QinQ hasn't been enabled.\n");
-		return;
-	}
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_QINQ_INSERT) == 0) {
 		printf("Error: qinq insert not supported by port %d\n",
-- 
2.8.4

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

* [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency
  2019-04-05 12:04 ` [dpdk-dev] [PATCH v4 " Nithin Dabilpuram
@ 2019-04-05 12:04   ` Nithin Dabilpuram
  2019-04-05 12:04   ` [dpdk-dev] [PATCH v4 2/2] app/testpmd: fix Tx QinQ set Nithin Dabilpuram
  2019-04-05 12:06   ` [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Ferruh Yigit
  2 siblings, 0 replies; 36+ messages in thread
From: Nithin Dabilpuram @ 2019-04-05 12:04 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: Ferruh Yigit, dev, Wang Xiao W, Nithin Dabilpuram

From: Nithin Dabilpuram <ndabilpuram@marvell.com>

Tx VLAN & QinQ insert enable need not depend on
Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. For Tx VLAN
insert enable, error check is now to see if QinQ was enabled
but only single VLAN id is set.

Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN")
Cc: xiao.w.wang@intel.com

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
v4:
* Resend v3 from different mailserver to avoid 
  CRLF
v3:
* Add back error check in tx_vlan_set() to check if QinQ is
already enabled. Also fix headline.
v2:
* Split change into two seperate patches as suggested.

 app/test-pmd/config.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cadcb51..010e26d 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2962,7 +2962,6 @@ vlan_tpid_set(portid_t port_id, enum rte_vlan_type vlan_type, uint16_t tp_id)
 void
 tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -2970,8 +2969,8 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 	if (vlan_id_is_invalid(vlan_id))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
+	if (ports[port_id].dev_conf.txmode.offloads &
+	    DEV_TX_OFFLOAD_QINQ_INSERT) {
 		printf("Error, as QinQ has been enabled.\n");
 		return;
 	}
@@ -2990,7 +2989,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 void
 tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -3000,11 +2998,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	if (vlan_id_is_invalid(vlan_id_outer))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (!(vlan_offload & ETH_VLAN_EXTEND_OFFLOAD)) {
-		printf("Error, as QinQ hasn't been enabled.\n");
-		return;
-	}
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_QINQ_INSERT) == 0) {
 		printf("Error: qinq insert not supported by port %d\n",
-- 
2.8.4


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

* [dpdk-dev] [PATCH v4 2/2] app/testpmd: fix Tx QinQ set
  2019-04-05 12:04 ` [dpdk-dev] [PATCH v4 " Nithin Dabilpuram
  2019-04-05 12:04   ` Nithin Dabilpuram
@ 2019-04-05 12:04   ` Nithin Dabilpuram
  2019-04-05 12:04     ` Nithin Dabilpuram
  2019-04-05 12:06   ` [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Ferruh Yigit
  2 siblings, 1 reply; 36+ messages in thread
From: Nithin Dabilpuram @ 2019-04-05 12:04 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: Ferruh Yigit, dev, Wang Xiao W, Nithin Dabilpuram, shahafs

From: Nithin Dabilpuram <ndabilpuram@marvell.com>

Enable DEV_TX_OFFLOAD_VLAN_INSERT also along with
DEV_TX_OFFLOAD_VLAN_QINQ in tx_qinq_set() as it takes
both vlan id's as arguments.

Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
Cc: shahafs@mellanox.com

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
v4:
* Resend v3 from different mailserver to avoid 
  CRLF
v3:
* Rename headline
v2:
* Split change into two seperate patches as suggested.

 app/test-pmd/config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 010e26d..f9cb129 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3006,7 +3006,8 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	}
 
 	tx_vlan_reset(port_id);
-	ports[port_id].dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_QINQ_INSERT;
+	ports[port_id].dev_conf.txmode.offloads |= (DEV_TX_OFFLOAD_VLAN_INSERT |
+						    DEV_TX_OFFLOAD_QINQ_INSERT);
 	ports[port_id].tx_vlan_id = vlan_id;
 	ports[port_id].tx_vlan_id_outer = vlan_id_outer;
 }
-- 
2.8.4

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

* [dpdk-dev] [PATCH v4 2/2] app/testpmd: fix Tx QinQ set
  2019-04-05 12:04   ` [dpdk-dev] [PATCH v4 2/2] app/testpmd: fix Tx QinQ set Nithin Dabilpuram
@ 2019-04-05 12:04     ` Nithin Dabilpuram
  0 siblings, 0 replies; 36+ messages in thread
From: Nithin Dabilpuram @ 2019-04-05 12:04 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: Ferruh Yigit, dev, Wang Xiao W, Nithin Dabilpuram, shahafs

From: Nithin Dabilpuram <ndabilpuram@marvell.com>

Enable DEV_TX_OFFLOAD_VLAN_INSERT also along with
DEV_TX_OFFLOAD_VLAN_QINQ in tx_qinq_set() as it takes
both vlan id's as arguments.

Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
Cc: shahafs@mellanox.com

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
v4:
* Resend v3 from different mailserver to avoid 
  CRLF
v3:
* Rename headline
v2:
* Split change into two seperate patches as suggested.

 app/test-pmd/config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 010e26d..f9cb129 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3006,7 +3006,8 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	}
 
 	tx_vlan_reset(port_id);
-	ports[port_id].dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_QINQ_INSERT;
+	ports[port_id].dev_conf.txmode.offloads |= (DEV_TX_OFFLOAD_VLAN_INSERT |
+						    DEV_TX_OFFLOAD_QINQ_INSERT);
 	ports[port_id].tx_vlan_id = vlan_id;
 	ports[port_id].tx_vlan_id_outer = vlan_id_outer;
 }
-- 
2.8.4


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

* Re: [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency
  2019-04-05 12:04 ` [dpdk-dev] [PATCH v4 " Nithin Dabilpuram
  2019-04-05 12:04   ` Nithin Dabilpuram
  2019-04-05 12:04   ` [dpdk-dev] [PATCH v4 2/2] app/testpmd: fix Tx QinQ set Nithin Dabilpuram
@ 2019-04-05 12:06   ` Ferruh Yigit
  2019-04-05 12:06     ` Ferruh Yigit
  2019-04-05 13:10     ` Nithin Kumar D
  2 siblings, 2 replies; 36+ messages in thread
From: Ferruh Yigit @ 2019-04-05 12:06 UTC (permalink / raw)
  To: Nithin Dabilpuram, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, Wang Xiao W, Nithin Dabilpuram

On 4/5/2019 1:04 PM, Nithin Dabilpuram wrote:
> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> 
> Tx VLAN & QinQ insert enable need not depend on
> Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. For Tx VLAN
> insert enable, error check is now to see if QinQ was enabled
> but only single VLAN id is set.
> 
> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN")
> Cc: xiao.w.wang@intel.com
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
> ---
> v4:
> * Resend v3 from different mailserver to avoid 
>   CRLF
> v3:
> * Add back error check in tx_vlan_set() to check if QinQ is
> already enabled. Also fix headline.
> v2:
> * Split change into two seperate patches as suggested.
> 

Hi Nithin,

I just merged the v3 and about to send the mail :)

What is different in v4? avoid CRLF?

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

* Re: [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency
  2019-04-05 12:06   ` [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Ferruh Yigit
@ 2019-04-05 12:06     ` Ferruh Yigit
  2019-04-05 13:10     ` Nithin Kumar D
  1 sibling, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2019-04-05 12:06 UTC (permalink / raw)
  To: Nithin Dabilpuram, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, Wang Xiao W, Nithin Dabilpuram

On 4/5/2019 1:04 PM, Nithin Dabilpuram wrote:
> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> 
> Tx VLAN & QinQ insert enable need not depend on
> Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. For Tx VLAN
> insert enable, error check is now to see if QinQ was enabled
> but only single VLAN id is set.
> 
> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN")
> Cc: xiao.w.wang@intel.com
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
> ---
> v4:
> * Resend v3 from different mailserver to avoid 
>   CRLF
> v3:
> * Add back error check in tx_vlan_set() to check if QinQ is
> already enabled. Also fix headline.
> v2:
> * Split change into two seperate patches as suggested.
> 

Hi Nithin,

I just merged the v3 and about to send the mail :)

What is different in v4? avoid CRLF?


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

* Re: [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency
  2019-04-05 12:06   ` [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Ferruh Yigit
  2019-04-05 12:06     ` Ferruh Yigit
@ 2019-04-05 13:10     ` Nithin Kumar D
  2019-04-05 13:10       ` Nithin Kumar D
  2019-04-05 13:32       ` Ferruh Yigit
  1 sibling, 2 replies; 36+ messages in thread
From: Nithin Kumar D @ 2019-04-05 13:10 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger, dev, Wang Xiao W,
	Nithin Dabilpuram

Hi Ferruh,

Yes, our mail server had some issue and was inserting CRLF chars. So I sent
the same v3 as v4 from gmail.

Thanks
Nithin

On Fri, Apr 5, 2019 at 5:36 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 4/5/2019 1:04 PM, Nithin Dabilpuram wrote:
> > From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> >
> > Tx VLAN & QinQ insert enable need not depend on
> > Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. For Tx VLAN
> > insert enable, error check is now to see if QinQ was enabled
> > but only single VLAN id is set.
> >
> > Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx
> VLAN")
> > Cc: xiao.w.wang@intel.com
> >
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
> > ---
> > v4:
> > * Resend v3 from different mailserver to avoid
> >   CRLF
> > v3:
> > * Add back error check in tx_vlan_set() to check if QinQ is
> > already enabled. Also fix headline.
> > v2:
> > * Split change into two seperate patches as suggested.
> >
>
> Hi Nithin,
>
> I just merged the v3 and about to send the mail :)
>
> What is different in v4? avoid CRLF?
>
>

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

* Re: [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency
  2019-04-05 13:10     ` Nithin Kumar D
@ 2019-04-05 13:10       ` Nithin Kumar D
  2019-04-05 13:32       ` Ferruh Yigit
  1 sibling, 0 replies; 36+ messages in thread
From: Nithin Kumar D @ 2019-04-05 13:10 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger, dev, Wang Xiao W,
	Nithin Dabilpuram

Hi Ferruh,

Yes, our mail server had some issue and was inserting CRLF chars. So I sent
the same v3 as v4 from gmail.

Thanks
Nithin

On Fri, Apr 5, 2019 at 5:36 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 4/5/2019 1:04 PM, Nithin Dabilpuram wrote:
> > From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> >
> > Tx VLAN & QinQ insert enable need not depend on
> > Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. For Tx VLAN
> > insert enable, error check is now to see if QinQ was enabled
> > but only single VLAN id is set.
> >
> > Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx
> VLAN")
> > Cc: xiao.w.wang@intel.com
> >
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
> > ---
> > v4:
> > * Resend v3 from different mailserver to avoid
> >   CRLF
> > v3:
> > * Add back error check in tx_vlan_set() to check if QinQ is
> > already enabled. Also fix headline.
> > v2:
> > * Split change into two seperate patches as suggested.
> >
>
> Hi Nithin,
>
> I just merged the v3 and about to send the mail :)
>
> What is different in v4? avoid CRLF?
>
>

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

* Re: [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency
  2019-04-05 13:10     ` Nithin Kumar D
  2019-04-05 13:10       ` Nithin Kumar D
@ 2019-04-05 13:32       ` Ferruh Yigit
  2019-04-05 13:32         ` Ferruh Yigit
  1 sibling, 1 reply; 36+ messages in thread
From: Ferruh Yigit @ 2019-04-05 13:32 UTC (permalink / raw)
  To: Nithin Kumar D
  Cc: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger, dev, Wang Xiao W,
	Nithin Dabilpuram

On 4/5/2019 2:10 PM, Nithin Kumar D wrote:
> Hi Ferruh,
> 
> Yes, our mail server had some issue and was inserting CRLF chars. So I sent
> the same v3 as v4 from gmail.

If the content is same I will continue with v3, thanks.

> 
> Thanks
> Nithin
> 
> On Fri, Apr 5, 2019 at 5:36 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
>> On 4/5/2019 1:04 PM, Nithin Dabilpuram wrote:
>>> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
>>>
>>> Tx VLAN & QinQ insert enable need not depend on
>>> Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. For Tx VLAN
>>> insert enable, error check is now to see if QinQ was enabled
>>> but only single VLAN id is set.
>>>
>>> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx
>> VLAN")
>>> Cc: xiao.w.wang@intel.com
>>>
>>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
>>> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
>>> ---
>>> v4:
>>> * Resend v3 from different mailserver to avoid
>>>   CRLF
>>> v3:
>>> * Add back error check in tx_vlan_set() to check if QinQ is
>>> already enabled. Also fix headline.
>>> v2:
>>> * Split change into two seperate patches as suggested.
>>>
>>
>> Hi Nithin,
>>
>> I just merged the v3 and about to send the mail :)
>>
>> What is different in v4? avoid CRLF?
>>
>>

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

* Re: [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency
  2019-04-05 13:32       ` Ferruh Yigit
@ 2019-04-05 13:32         ` Ferruh Yigit
  0 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2019-04-05 13:32 UTC (permalink / raw)
  To: Nithin Kumar D
  Cc: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger, dev, Wang Xiao W,
	Nithin Dabilpuram

On 4/5/2019 2:10 PM, Nithin Kumar D wrote:
> Hi Ferruh,
> 
> Yes, our mail server had some issue and was inserting CRLF chars. So I sent
> the same v3 as v4 from gmail.

If the content is same I will continue with v3, thanks.

> 
> Thanks
> Nithin
> 
> On Fri, Apr 5, 2019 at 5:36 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
>> On 4/5/2019 1:04 PM, Nithin Dabilpuram wrote:
>>> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
>>>
>>> Tx VLAN & QinQ insert enable need not depend on
>>> Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. For Tx VLAN
>>> insert enable, error check is now to see if QinQ was enabled
>>> but only single VLAN id is set.
>>>
>>> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx
>> VLAN")
>>> Cc: xiao.w.wang@intel.com
>>>
>>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
>>> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
>>> ---
>>> v4:
>>> * Resend v3 from different mailserver to avoid
>>>   CRLF
>>> v3:
>>> * Add back error check in tx_vlan_set() to check if QinQ is
>>> already enabled. Also fix headline.
>>> v2:
>>> * Split change into two seperate patches as suggested.
>>>
>>
>> Hi Nithin,
>>
>> I just merged the v3 and about to send the mail :)
>>
>> What is different in v4? avoid CRLF?
>>
>>


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

* Re: [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency
  2019-04-05  7:36 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Nithin Kumar Dabilpuram
  2019-04-05  7:36   ` Nithin Kumar Dabilpuram
  2019-04-05  7:36   ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix Tx QinQ set Nithin Kumar Dabilpuram
@ 2019-04-05 13:36   ` Ferruh Yigit
  2019-04-05 13:36     ` Ferruh Yigit
  2 siblings, 1 reply; 36+ messages in thread
From: Ferruh Yigit @ 2019-04-05 13:36 UTC (permalink / raw)
  To: Nithin Kumar Dabilpuram, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, xiao.w.wang

On 4/5/2019 8:36 AM, Nithin Kumar Dabilpuram wrote:
> Tx VLAN & QinQ insert enable need not depend on
> Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. For Tx VLAN
> insert enable, error check is now to see if QinQ was enabled
> but only single VLAN id is set.
> 
> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN")
> Cc: xiao.w.wang@intel.com
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>

for series carried from prev version:
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>


for series,
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Series applied to dpdk-next-net/master, thanks.

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

* Re: [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency
  2019-04-05 13:36   ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Ferruh Yigit
@ 2019-04-05 13:36     ` Ferruh Yigit
  0 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2019-04-05 13:36 UTC (permalink / raw)
  To: Nithin Kumar Dabilpuram, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger
  Cc: dev, xiao.w.wang

On 4/5/2019 8:36 AM, Nithin Kumar Dabilpuram wrote:
> Tx VLAN & QinQ insert enable need not depend on
> Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD. For Tx VLAN
> insert enable, error check is now to see if QinQ was enabled
> but only single VLAN id is set.
> 
> Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN")
> Cc: xiao.w.wang@intel.com
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>

for series carried from prev version:
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>


for series,
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Series applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2019-04-05 13:36 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-19  6:48 [dpdk-dev] [PATCH] app/testpmd: fix tx vlan and qinq insert enable Nithin Kumar Dabilpuram
2019-03-01 16:29 ` Ferruh Yigit
2019-03-18  9:56 ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Nithin Kumar Dabilpuram
2019-03-18  9:56   ` Nithin Kumar Dabilpuram
2019-03-18  9:56   ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix tx qinq insert enable Nithin Kumar Dabilpuram
2019-03-18  9:56     ` Nithin Kumar Dabilpuram
2019-03-26 17:40     ` Iremonger, Bernard
2019-03-26 17:40       ` Iremonger, Bernard
2019-03-21 17:11   ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Ferruh Yigit
2019-03-21 17:11     ` Ferruh Yigit
2019-03-26 17:33     ` Iremonger, Bernard
2019-03-26 17:33       ` Iremonger, Bernard
2019-03-27  9:52       ` Iremonger, Bernard
2019-03-27  9:52         ` Iremonger, Bernard
2019-03-31 18:58     ` [dpdk-dev] [EXT] " Nithin Kumar Dabilpuram
2019-03-31 18:58       ` Nithin Kumar Dabilpuram
2019-04-01 19:10       ` Ferruh Yigit
2019-04-01 19:10         ` Ferruh Yigit
2019-04-02  2:35         ` Wang, Xiao W
2019-04-02  2:35           ` Wang, Xiao W
2019-04-05  7:36 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Nithin Kumar Dabilpuram
2019-04-05  7:36   ` Nithin Kumar Dabilpuram
2019-04-05  7:36   ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix Tx QinQ set Nithin Kumar Dabilpuram
2019-04-05  7:36     ` Nithin Kumar Dabilpuram
2019-04-05 13:36   ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Ferruh Yigit
2019-04-05 13:36     ` Ferruh Yigit
2019-04-05 12:04 ` [dpdk-dev] [PATCH v4 " Nithin Dabilpuram
2019-04-05 12:04   ` Nithin Dabilpuram
2019-04-05 12:04   ` [dpdk-dev] [PATCH v4 2/2] app/testpmd: fix Tx QinQ set Nithin Dabilpuram
2019-04-05 12:04     ` Nithin Dabilpuram
2019-04-05 12:06   ` [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Ferruh Yigit
2019-04-05 12:06     ` Ferruh Yigit
2019-04-05 13:10     ` Nithin Kumar D
2019-04-05 13:10       ` Nithin Kumar D
2019-04-05 13:32       ` Ferruh Yigit
2019-04-05 13:32         ` Ferruh Yigit

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