[v2,2/2] app/testpmd: fix tx qinq insert enable

Message ID 20190318095613.28167-2-ndabilpuram@marvell.com
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • [v2,1/2] app/testpmd: fix tx vlan and qinq dependency
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch warning coding style issues

Commit Message

Nithin Dabilpuram March 18, 2019, 9:56 a.m.
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(-)

Comments

Iremonger, Bernard March 26, 2019, 5:40 p.m. | #1
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

Patch

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;
 }