On 13/04/18 19:45, Kevin Traynor wrote:
On 04/13/2018 04:20 PM, Stokes, Ian wrote:
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.

Thanks for the v2 Pablo.

Adding Eelco and Kevin as they had some comments on the v1.

FYI I'm investigating on the DPDK side to see how/when the flag should be set 
and used for igb and ixgbe as well as other drivers.


Reported-by: Louis Peens<louis.pe...@netronome.com>
Signed-off-by: Pablo Cascón<pablo.cas...@netronome.com>
Reviewed-by: Simon Horman<simon.hor...@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
--- 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
       * 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. */
Can you check name for "nfp" and don't set enable_scatter? I don't think
most of the PMDs used these new offload defines in DPDK17.11.

(sorry for the delay replying, was on PTO)

While it is technically possible to do that for the "nfp" it is not the preferred solution IMHO. The "nfp" PMD is doing the right thing (TM) by not advertising it supports scatter (it doesn't) and not requiring it for jumbo traffic. If we're to add a quirk it should be for the to-be-fixed PMD(s).

I'm not sure this is acceptable. I'm worried it sets a precedent for code for 
specific devices and could lead to further instances of this in the future.

It could be argued the scatter approach up to now was specific to Niantic but 
it also worked for igb and i40e. I40e devices don’t require scatter but can 
handle it without issue if it is set.

In the past this type of solution has been rejected as the preferred approach 
was to keep netdev-dpdk code generic as possible.

The principle makes sense in general to me. I think this should be a temporary exception.

That’s why I suggest deferring the patch in OVS until the required changes are 
made in DPDK to satisfy all cases. 17.11.2 is targeted for May 19th. We could 
have a solution in place for then.

That would be fine when it comes to releases, not so fine for (potential) backports in distros and upstream consumers (interested on commits on between releases)

I'm not trying to obstruct this but these cases do arise so interested to hear 
what others think?



+            conf.rxmode.enable_scatter = 1;
+        }

      conf.rxmode.hw_ip_checksum = (dev->hw_ol_features &

dev mailing list

dev mailing list

Reply via email to