aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/init.c
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2019-08-29 15:40:26 -0400
committerDamjan Marion <dmarion@me.com>2019-08-30 13:17:31 +0000
commit03598c4bcc639cbfc9afa13c5b4e52440f9eae2b (patch)
treecab26e1c71dffe33f75fdf80db9bccd195552c8a /src/plugins/dpdk/device/init.c
parentcedcf608fefc5bdeff13bb0914fa15266e971d7c (diff)
dpdk: enable checksum offload for Intel SRIOV NIC drivers
Type: fix Signed-off-by: John Lo <loj@cisco.com> Change-Id: I3ee59106ba45164a4ee3788bf4dcf5bf4c2dc1c2
Diffstat (limited to 'src/plugins/dpdk/device/init.c')
-rw-r--r--src/plugins/dpdk/device/init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 742fa6069a1..a2651823806 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -463,6 +463,14 @@ dpdk_lib_init (dpdk_main_t * dm)
case VNET_DPDK_PMD_IXGBEVF:
case VNET_DPDK_PMD_I40EVF:
xd->port_type = VNET_DPDK_PORT_TYPE_ETH_VF;
+ if (dm->conf->no_tx_checksum_offload == 0)
+ {
+ 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;
+ }
break;
case VNET_DPDK_PMD_THUNDERX: