Skip to content

Commit ac8bb92

Browse files
sluong99dmarion
authored andcommitted
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 <[email protected]> Change-Id: I72c41db9b327ed8d08ef70d74e8cc6206d4a102f
1 parent cd120f9 commit ac8bb92

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/plugins/dpdk/device/init.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,15 @@ check_l3cache ()
199199
return 0;
200200
}
201201

202+
static void
203+
dpdk_enable_l4_csum_offload (dpdk_device_t * xd)
204+
{
205+
xd->port_conf.txmode.offloads |= DEV_TX_OFFLOAD_TCP_CKSUM;
206+
xd->port_conf.txmode.offloads |= DEV_TX_OFFLOAD_UDP_CKSUM;
207+
xd->flags |= DPDK_DEVICE_FLAG_TX_OFFLOAD |
208+
DPDK_DEVICE_FLAG_INTEL_PHDR_CKSUM;
209+
}
210+
202211
static clib_error_t *
203212
dpdk_lib_init (dpdk_main_t * dm)
204213
{
@@ -482,6 +491,8 @@ dpdk_lib_init (dpdk_main_t * dm)
482491
/* Cisco VIC */
483492
case VNET_DPDK_PMD_ENIC:
484493
xd->port_type = port_type_from_link_speed (l.link_speed);
494+
if (dm->conf->enable_tcp_udp_checksum)
495+
dpdk_enable_l4_csum_offload (xd);
485496
break;
486497

487498
/* Intel Red Rock Canyon */

0 commit comments

Comments
 (0)