From d9665c93cbda9e64126baa0cbb5b1f423583d8e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?fengbojiang=28=E5=A7=9C=E5=87=A4=E6=B3=A2=29?= Date: Fri, 18 Jan 2019 18:05:18 +0800 Subject: [PATCH] Fix the IP/TCP/UDP csum error of txmode offloads, refer #317. --- lib/ff_dpdk_if.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ff_dpdk_if.c b/lib/ff_dpdk_if.c index 48f0be1c6..8cb096d6f 100644 --- a/lib/ff_dpdk_if.c +++ b/lib/ff_dpdk_if.c @@ -651,18 +651,21 @@ init_port_start(void) if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IPV4_CKSUM)) { printf("TX ip checksum offload supported\n"); + port_conf.txmode.offloads |= DEV_TX_OFFLOAD_IPV4_CKSUM; pconf->hw_features.tx_csum_ip = 1; } if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_UDP_CKSUM) && (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_CKSUM)) { printf("TX TCP&UDP checksum offload supported\n"); + port_conf.txmode.offloads |= DEV_TX_OFFLOAD_UDP_CKSUM | DEV_TX_OFFLOAD_TCP_CKSUM; pconf->hw_features.tx_csum_l4 = 1; } if (ff_global_cfg.dpdk.tso) { if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_TSO) { printf("TSO is supported\n"); + port_conf.txmode.offloads |= DEV_TX_OFFLOAD_TCP_TSO; pconf->hw_features.tx_tso = 1; } } else {