From 26bd3e939e42ad13fd5f569e23d904826254b0db Mon Sep 17 00:00:00 2001 From: Nicolas PLANEL Date: Wed, 5 Mar 2025 16:37:47 +0100 Subject: dpdk: rte_eth_tx_prepare need to called before transmiting packets By the DPDK documentation rte_eth_tx_prepare() call is required to prepare the NIC and to validate the mbufs. This would fix hardware bad UDP checksum generated by ena driver issue. As performance will be impacted depending on the driver tx_prepare() callback I defined a tx-prepare flag that would be enabled by default on ena driver but could be enabled in the configuration if need for others drivers. Note: This option would normally be exclusive with intel_phdr_cksum as driver's tx_prepare would normally cover this usage. Type: fix Change-Id: Ic7c21682f7bd92b35bd9b1028129709baa2a64d4 Signed-off-by: Nicolas PLANEL Signed-off-by: Nicolas PLANEL --- src/plugins/dpdk/device/init.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/dpdk/device/init.c') diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c index aaa2c1f4a68..8aba4ec25e7 100644 --- a/src/plugins/dpdk/device/init.c +++ b/src/plugins/dpdk/device/init.c @@ -390,6 +390,8 @@ dpdk_lib_init (dpdk_main_t * dm) dpdk_device_flag_set (xd, DPDK_DEVICE_FLAG_INTEL_PHDR_CKSUM, 1); if (dr->int_unmaskable) dpdk_device_flag_set (xd, DPDK_DEVICE_FLAG_INT_UNMASKABLE, 1); + if (dr->need_tx_prepare) + dpdk_device_flag_set (xd, DPDK_DEVICE_FLAG_TX_PREPARE, 1); } else dpdk_log_warn ("[%u] unknown driver '%s'", port_id, di.driver_name); -- cgit 1.2.3-korg