aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-02-19 21:38:15 +0000
committerDave Wallace <dwallacelf@gmail.com>2020-02-20 15:55:22 +0000
commitdd989487a683c56b56b8ffec1712149420dc8d81 (patch)
treea85f75dfa3dac685e0e864b7388b91e8fb9e9023 /src/plugins/dpdk/device
parent3ebebc3a2fe47f1222ba035e04ccd8caed0cf58f (diff)
dpdk: rx checksum offload
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5a3e3a41dcc60c0d9b291e51bb112e7701f73050
Diffstat (limited to 'src/plugins/dpdk/device')
-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;