summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2018-09-10 15:26:36 +0000
committerDamjan Marion <dmarion@me.com>2018-09-10 18:50:08 +0000
commit1606d3aa23394b58a888a90044d1b3a786fa9549 (patch)
treedb9557ba343b1547c7d6a17c1c0eafa83d5c43d8
parent255299c265c68a37157ecdf0d42bff8939b113fe (diff)
dpdk-plugin: do not request SCTP offload, some cards do not support it while supporting TCP/UDP
The DPDK plugin sets all of the offload flags, which may cause an initialization failure on the NICs that do not support SCTP offload. The VPP code does not deal with the SCTP offload at the moment at all, so after discussing with Damjan, we agreed the best approach to fix the issue is to not request the SCTP offload. The output of "show hardware" for the NIC in question before this patch: Name Idx Link Hardware GigabitEthernet1/0/0 1 down GigabitEthernet1/0/0 Ethernet address 00:e0:67:09:90:4b Intel 82540EM (e1000) carrier down flags: pmd pmd-init-fail maybe-multiseg tx-offload intel-phdr-cksum rx queues 1, rx desc 1024, tx queues 1, tx desc 1024 cpu socket 0 Errors: rte_eth_dev_configure[port:0, errno:-22]: Unknown error -22 And the excerpt from "show log": 1970/ 1/ 1 00:00:00:739 notice dpdk Ethdev port_id=0 requested Tx offloads 0x1c doesn't match Tx offloads capabilities 0xf in rte_eth_dev_configure() Change-Id: I159d65c02fc3f044441972205f1f0ac08e52050c Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
-rw-r--r--src/plugins/dpdk/device/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 0e9e6d6e9ad..c811c4736d0 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -444,9 +444,9 @@ dpdk_lib_init (dpdk_main_t * dm)
if (dm->conf->no_tx_checksum_offload == 0)
{
#if RTE_VERSION < RTE_VERSION_NUM(18, 8, 0, 0)
- xd->tx_conf.txq_flags &= ~ETH_TXQ_FLAGS_NOXSUMS;
+ xd->tx_conf.txq_flags &= ~(ETH_TXQ_FLAGS_NOXSUMUDP |
+ ETH_TXQ_FLAGS_NOXSUMTCP);
#else
- xd->port_conf.txmode.offloads |= DEV_TX_OFFLOAD_SCTP_CKSUM;
xd->port_conf.txmode.offloads |= DEV_TX_OFFLOAD_TCP_CKSUM;
xd->port_conf.txmode.offloads |= DEV_TX_OFFLOAD_UDP_CKSUM;
#endif