From 384a336849e031883425532029458d0f89a08c09 Mon Sep 17 00:00:00 2001 From: Federico Claramonte Date: Thu, 15 Nov 2018 13:19:29 +0100 Subject: Enable l4 checksum offload for ThunderX PMD Change-Id: I6a6ab6d8d9aeca9df3ba8a3ac519be25aaa796e8 Signed-off-by: Federico Claramonte --- src/plugins/dpdk/device/init.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/plugins') 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: -- cgit 1.2.3-korg