[dpdk-dev] [PATCH 6/6] app/testpmd: testpmd support TX common tunnel offloads
Xueming Li
xuemingl at mellanox.com
Tue Jan 9 15:11:10 CET 2018
"show port cap" and "csum parse tunnel" command support TX common tunnel
offloads
Signed-off-by: Xueming Li <xuemingl at mellanox.com>
---
app/test-pmd/cmdline.c | 9 +++++++--
app/test-pmd/config.c | 9 +++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 00a229a41..63bc493b3 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3949,6 +3949,9 @@ check_tunnel_tso_nic_support(portid_t port_id)
if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GENEVE_TNL_TSO))
printf("Warning: GENEVE TUNNEL TSO not supported therefore "
"not enabled for port %d\n", port_id);
+ if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM_TSO))
+ printf("Warning: COMMON TUNNEL TSO not supported therefore "
+ "not enabled for port %d\n", port_id);
return dev_info;
}
@@ -3976,13 +3979,15 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
~(DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
DEV_TX_OFFLOAD_GRE_TNL_TSO |
DEV_TX_OFFLOAD_IPIP_TNL_TSO |
- DEV_TX_OFFLOAD_GENEVE_TNL_TSO);
+ DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
+ DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM_TSO);
printf("TSO for tunneled packets is disabled\n");
} else {
uint64_t tso_offloads = (DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
DEV_TX_OFFLOAD_GRE_TNL_TSO |
DEV_TX_OFFLOAD_IPIP_TNL_TSO |
- DEV_TX_OFFLOAD_GENEVE_TNL_TSO);
+ DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
+ DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM_TSO);
ports[res->port_id].dev_conf.txmode.offloads |=
(tso_offloads & dev_info.tx_offload_capa);
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index da968cb64..486667bf4 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -739,6 +739,15 @@ port_offload_cap_display(portid_t port_id)
printf("off\n");
}
+ if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM_TSO) {
+ printf("TX common tunnel TSO and checksum: ");
+ if (ports[port_id].dev_conf.txmode.offloads &
+ DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM_TSO)
+ printf("on\n");
+ else
+ printf("off\n");
+ }
+
}
int
--
2.13.3
More information about the dev
mailing list