aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2020-02-12 18:45:09 -0800
committerDave Wallace <dwallacelf@gmail.com>2020-03-10 14:23:08 +0000
commit6f171a77564981aa65148df03ba17cd94d663009 (patch)
treee1c795b334d9286b239201e377ab6e9146237590 /src
parent4056ed59a0fd7c61629a4d0a882fadab2b316e22 (diff)
dpdk: TSO does not work for Cisco VIC
While TSO is supported for Intel NIC, Cisco VIC does not work. The problem is due to txmode offloads is not properly set for the Cisco VIC when enable-tcp-udp-checksum is configured. Type: fix Ticket: VPP-1838 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I72c41db9b327ed8d08ef70d74e8cc6206d4a102f (cherry picked from commit ac8bb9263438221cc93db62257ffd8db711530e2)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/dpdk/device/init.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index d0125e93936..34a1a82ef3c 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -199,6 +199,15 @@ check_l3cache ()
return 0;
}
+static void
+dpdk_enable_l4_csum_offload (dpdk_device_t * xd)
+{
+ xd->port_conf.txmode.offloads |= DEV_TX_OFFLOAD_TCP_CKSUM;
+ xd->port_conf.txmode.offloads |= DEV_TX_OFFLOAD_UDP_CKSUM;
+ xd->flags |= DPDK_DEVICE_FLAG_TX_OFFLOAD |
+ DPDK_DEVICE_FLAG_INTEL_PHDR_CKSUM;
+}
+
static clib_error_t *
dpdk_lib_init (dpdk_main_t * dm)
{
@@ -496,6 +505,8 @@ dpdk_lib_init (dpdk_main_t * dm)
/* Cisco VIC */
case VNET_DPDK_PMD_ENIC:
xd->port_type = port_type_from_link_speed (l.link_speed);
+ if (dm->conf->enable_tcp_udp_checksum)
+ dpdk_enable_l4_csum_offload (xd);
break;
/* Intel Red Rock Canyon */