diff options
author | Damjan Marion <damarion@cisco.com> | 2018-11-09 23:30:20 +0100 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2018-11-09 23:34:36 +0100 |
commit | d5969e4a7b5aa4a51ee65a86e80e8ca3ae01c2a5 (patch) | |
tree | a98eac0d5a2a984287241e40679bcd548ab9d84e | |
parent | 46eecfdb9d25e0370afb705ec1691f501be32eb2 (diff) |
dpdk: configure ip4 header checksum rx offload properly
Change-Id: I3daf8d473aa37b4597d130d19913b782cf7b8511
Signed-off-by: Damjan Marion <damarion@cisco.com>
-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) |