aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/init.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-11-24 14:34:18 +0100
committerDave Barach <openvpp@barachs.net>2017-11-24 15:02:42 +0000
commit952181e0bcbc838c646bd4c710033dd3bc20cec6 (patch)
tree4f21702cf89ff559e5bf12b0d9f0132caaa0ff41 /src/plugins/dpdk/device/init.c
parentfd920609819a5b10d3d7c8d34fe4fa4214c7da22 (diff)
dpdk: enable tx checksum offloads as default, add disable knob
New startup.conf knob: dpdk { ... no-tx-checksum-offload ... } Change-Id: I337fd57616dd77687300861b411b420a3cb75149 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/init.c')
-rwxr-xr-xsrc/plugins/dpdk/device/init.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 8d08da1308f..60f8ce67583 100755
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -331,6 +331,10 @@ dpdk_lib_init (dpdk_main_t * dm)
clib_memcpy (&xd->tx_conf, &dev_info.default_txconf,
sizeof (struct rte_eth_txconf));
+
+ if (dm->conf->no_tx_checksum_offload == 0)
+ xd->tx_conf.txq_flags &= ~ETH_TXQ_FLAGS_NOXSUMS;
+
if (dm->conf->no_multi_seg)
{
xd->tx_conf.txq_flags |= ETH_TXQ_FLAGS_NOMULTSEGS;
@@ -636,8 +640,9 @@ dpdk_lib_init (dpdk_main_t * dm)
hi = vnet_get_hw_interface (dm->vnet_main, xd->hw_if_index);
- if (xd->flags & DPDK_DEVICE_FLAG_TX_OFFLOAD)
- hi->flags |= VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD;
+ if (dm->conf->no_tx_checksum_offload == 0)
+ if (xd->flags & DPDK_DEVICE_FLAG_TX_OFFLOAD)
+ hi->flags |= VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD;
dpdk_device_setup (xd);
@@ -915,6 +920,9 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
else if (unformat (input, "enable-tcp-udp-checksum"))
conf->enable_tcp_udp_checksum = 1;
+ else if (unformat (input, "no-tx-checksum-offload"))
+ conf->no_tx_checksum_offload = 1;
+
else if (unformat (input, "decimal-interface-names"))
conf->interface_name_format_decimal = 1;