[ovs-dev] [PATCH v2 1/1] netdev-dpdk: fix RX jumbo for NICs not supporting scatter

Pablo Cascón pablo.cascon at netronome.com
Fri Apr 13 14:46:46 UTC 2018


Currently to RX jumbo packets fails for NICs not supporting scatter.
Scatter is not strictly needed for jumbo support on RX. This change
fixes the issue by only enabling scatter for NICs supporting it. Add a
quirk for "igb" while the PMD is fixed to advertise scatter.

Reported-by: Louis Peens <louis.peens at netronome.com>
Signed-off-by: Pablo Cascón <pablo.cascon at netronome.com>
Reviewed-by: Simon Horman <simon.horman at netronome.com>
---
 lib/netdev-dpdk.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index ee39cbe..8f6a0a3 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -694,11 +694,19 @@ dpdk_eth_dev_queue_setup(struct netdev_dpdk *dev, int n_rxq, int n_txq)
     int diag = 0;
     int i;
     struct rte_eth_conf conf = port_conf;
+    struct rte_eth_dev_info info;
 
     /* For some NICs (e.g. Niantic), scatter_rx mode needs to be explicitly
      * enabled. */
     if (dev->mtu > ETHER_MTU) {
-        conf.rxmode.enable_scatter = 1;
+        rte_eth_dev_info_get(dev->port_id, &info);
+        if (info.rx_offload_capa & DEV_RX_OFFLOAD_SCATTER) {
+            conf.rxmode.enable_scatter = 1;
+        } else if (!strcmp(info.driver_name, "igb")) {
+            /* Quirk: as of DPDK 17.11.1 igb's PMD requires explicitly
+               enabling scatter but fails to advertise it. */
+            conf.rxmode.enable_scatter = 1;
+        }
     }
 
     conf.rxmode.hw_ip_checksum = (dev->hw_ol_features &
-- 
2.7.4



More information about the dev mailing list