dpdk-plugin: do not request SCTP offload, some cards do not support it while supporti... 50/14750/3
authorAndrew Yourtchenko <ayourtch@gmail.com>
Mon, 10 Sep 2018 15:26:36 +0000 (15:26 +0000)
committerDamjan Marion <dmarion@me.com>
Mon, 10 Sep 2018 18:50:08 +0000 (18:50 +0000)
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>
src/plugins/dpdk/device/init.c

index 0e9e6d6..c811c47 100644 (file)
@@ -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