summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dpdk/device/init.c')
-rw-r--r--src/plugins/dpdk/device/init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 6d327cbdb24..ac79ac4b627 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -349,6 +349,14 @@ dpdk_lib_init (dpdk_main_t * dm)
xd->flags |= DPDK_DEVICE_FLAG_RX_IP4_CKSUM;
}
+ if (dm->conf->enable_tcp_udp_checksum)
+ {
+ if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_UDP_CKSUM)
+ xd->port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_UDP_CKSUM;
+ if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_CKSUM)
+ xd->port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_TCP_CKSUM;
+ }
+
if (dm->conf->no_multi_seg)
{
xd->port_conf.txmode.offloads &= ~DEV_TX_OFFLOAD_MULTI_SEGS;