[v4,2/2] app/testpmd: fix Tx QinQ set

Message ID 20190405120403.5446-2-nithind1988@gmail.com (mailing list archive)
State Not Applicable, archived
Delegated to: Ferruh Yigit
Headers
Series [v4,1/2] app/testpmd: fix Tx VLAN and QinQ dependency |

Checks

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

Commit Message

Nithin Dabilpuram April 5, 2019, 12:04 p.m. UTC
  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(-)
  

Patch

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