Skip to content

Commit

Permalink
dpdk: TSO does not work for Cisco VIC
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Steven Luong authored and dmarion committed Feb 14, 2020
1 parent cd120f9 commit ac8bb92
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/plugins/dpdk/device/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -482,6 +491,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 */
Expand Down

0 comments on commit ac8bb92

Please sign in to comment.