summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/common.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-01-04 20:07:32 +0100
committerOle Tr�an <otroan@employees.org>2022-01-05 10:48:54 +0000
commitdfc853c0ac2f8f15765a51268a53b023d4cf6c65 (patch)
tree267aef8cbb34ca94a2abd2b952df7fe3fadc8403 /src/plugins/dpdk/device/common.c
parent343ff3700948703a977a6ebcd0f9e84c4a988d90 (diff)
dpdk: keep buffer flags per-device
Type: improvement Change-Id: Idb0b079df49c12643c9a93ee0effe011d3489068 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/common.c')
-rw-r--r--src/plugins/dpdk/device/common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/common.c b/src/plugins/dpdk/device/common.c
index b3de5cf652c..3bd5001480e 100644
--- a/src/plugins/dpdk/device/common.c
+++ b/src/plugins/dpdk/device/common.c
@@ -147,7 +147,12 @@ dpdk_device_setup (dpdk_device_t * xd)
goto error;
rte_eth_dev_set_mtu (xd->port_id, hi->max_packet_bytes);
+ xd->buffer_flags =
+ (VLIB_BUFFER_TOTAL_LENGTH_VALID | VLIB_BUFFER_EXT_HDR_VALID);
+ if (xd->port_conf.rxmode.offloads & DEV_RX_OFFLOAD_TCP_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);