summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk
diff options
context:
space:
mode:
authorFederico Claramonte <fede.claramonte@caviumnetworks.com>2018-11-15 13:19:29 +0100
committerDamjan Marion <dmarion@me.com>2018-11-18 19:48:10 +0000
commit384a336849e031883425532029458d0f89a08c09 (patch)
treefe98867fe2eaabb64bcc0322ea0f8c8b33331bef /src/plugins/dpdk
parent053a0e44edb21713e0825f9c09ba4af12e686b38 (diff)
Enable l4 checksum offload for ThunderX PMD
Change-Id: I6a6ab6d8d9aeca9df3ba8a3ac519be25aaa796e8 Signed-off-by: Federico Claramonte <fede.claramonte@caviumnetworks.com>
Diffstat (limited to 'src/plugins/dpdk')
-rw-r--r--src/plugins/dpdk/device/init.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index d67540c65ea..e8718f73ab9 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -506,6 +506,19 @@ dpdk_lib_init (dpdk_main_t * dm)
#elif RTE_VERSION < RTE_VERSION_NUM(18, 11, 0, 0)
xd->port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
#endif
+
+ if (dm->conf->no_tx_checksum_offload == 0)
+ {
+#if RTE_VERSION < RTE_VERSION_NUM(18, 8, 0, 0)
+ xd->tx_conf.txq_flags &= ~(ETH_TXQ_FLAGS_NOXSUMUDP |
+ ETH_TXQ_FLAGS_NOXSUMTCP);
+#else
+ xd->port_conf.txmode.offloads |= DEV_TX_OFFLOAD_TCP_CKSUM;
+ xd->port_conf.txmode.offloads |= DEV_TX_OFFLOAD_UDP_CKSUM;
+#endif
+ xd->flags |=
+ DPDK_DEVICE_FLAG_TX_OFFLOAD;
+ }
break;
case VNET_DPDK_PMD_ENA: