summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2019-08-29 15:40:26 -0400
committerJohn Lo <loj@cisco.com>2019-08-30 13:24:51 +0000
commit43a5b7cc44596fea37a9b7ab62f49eb40c402f22 (patch)
tree1bb9b9a1c9ce38222582eb633cee651ec1a91aed
parentdc4161eb85cea9963ce5d4ad162907ec816636d6 (diff)
dpdk: enable checksum offload for Intel SRIOV NIC drivers
Type: fix Signed-off-by: John Lo <loj@cisco.com> Change-Id: I3ee59106ba45164a4ee3788bf4dcf5bf4c2dc1c2 (cherry picked from commit 03598c4bcc639cbfc9afa13c5b4e52440f9eae2b)
-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 07cbbf99725..a32ab4e8015 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -462,6 +462,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: