diff options
Diffstat (limited to 'src/plugins/dpdk/device')
-rw-r--r-- | src/plugins/dpdk/device/dpdk.h | 3 | ||||
-rw-r--r-- | src/plugins/dpdk/device/init.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h index 46d53f1d895..007a7b91905 100644 --- a/src/plugins/dpdk/device/dpdk.h +++ b/src/plugins/dpdk/device/dpdk.h @@ -169,7 +169,8 @@ typedef struct _( 8, BOND_SLAVE_UP, "bond-slave-up") \ _( 9, TX_OFFLOAD, "tx-offload") \ _(10, INTEL_PHDR_CKSUM, "intel-phdr-cksum") \ - _(11, RX_FLOW_OFFLOAD, "rx-flow-offload") + _(11, RX_FLOW_OFFLOAD, "rx-flow-offload") \ + _(12, RX_IP4_CKSUM, "rx-ip4-cksum") enum { diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c index fcdc29bfdc4..d67540c65ea 100644 --- a/src/plugins/dpdk/device/init.c +++ b/src/plugins/dpdk/device/init.c @@ -363,6 +363,12 @@ dpdk_lib_init (dpdk_main_t * dm) clib_memcpy (&xd->tx_conf, &dev_info.default_txconf, sizeof (struct rte_eth_txconf)); + if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_IPV4_CKSUM) + { + xd->port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_IPV4_CKSUM; + xd->flags |= DPDK_DEVICE_FLAG_RX_IP4_CKSUM; + } + if (dm->conf->no_multi_seg) { #if RTE_VERSION < RTE_VERSION_NUM(18, 8, 0, 0) |