diff options
author | Florin Coras <fcoras@cisco.com> | 2022-01-05 11:31:03 -0800 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2022-01-05 22:03:22 +0000 |
commit | dbec8fa67f3910c2f6db9f302d3aed3e3c5226af (patch) | |
tree | fe1d78d23daeb652560e27fa7407b5c6f317bab4 /src/plugins/dpdk/device/common.c | |
parent | d4f88cc0967ea1de66396ac07b20cf6e33a3fa1a (diff) |
dpdk: improve checksum computation
Type: improvement
Based on gerrit 26480 by chenmin.sun@intel.com
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id8f2127f0fac5f555b38483714fe92c038875915
Diffstat (limited to 'src/plugins/dpdk/device/common.c')
-rw-r--r-- | src/plugins/dpdk/device/common.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/common.c b/src/plugins/dpdk/device/common.c index b0aaaaf9d47..19c0c32243d 100644 --- a/src/plugins/dpdk/device/common.c +++ b/src/plugins/dpdk/device/common.c @@ -148,9 +148,12 @@ dpdk_device_setup (dpdk_device_t * xd) xd->buffer_flags = (VLIB_BUFFER_TOTAL_LENGTH_VALID | VLIB_BUFFER_EXT_HDR_VALID); - if (xd->port_conf.rxmode.offloads & DEV_RX_OFFLOAD_TCP_CKSUM) + if ((xd->port_conf.rxmode.offloads & + (DEV_RX_OFFLOAD_TCP_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM)) == + (DEV_RX_OFFLOAD_TCP_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM)) xd->buffer_flags |= (VNET_BUFFER_F_L4_CHECKSUM_COMPUTED | VNET_BUFFER_F_L4_CHECKSUM_CORRECT); + if (xd->flags & DPDK_DEVICE_FLAG_ADMIN_UP) dpdk_device_start (xd); |