[ovs-dev] [PATCH v3 1/1] netdev-dpdk: remove enabling scatter for jumbo RX support

Stokes, Ian ian.stokes at intel.com
Thu Apr 26 15:26:25 UTC 2018


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

Thanks for the v3 Pablo, comments inline.

> 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>
> ---
> 
> Changelog:
> v3->v2:
>    - only check for driver_name
>    - tested with "nfp" and not with "igb"
> 
> 
>  lib/netdev-dpdk.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index ee39cbe..02ed85b
> 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -694,11 +694,17 @@ 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. */
> +    /* Quirk: as of DPDK 17.11.1 igb's PMD requires explicitly
> +     * enabling scatter to support jumbo RX. Note: PMDs are not
> +     * required to set the offload capabilities and so is not reliable
> +     * info, only the driver_name is after testing the PMD/NIC */
>      if (dev->mtu > ETHER_MTU) {
> -        conf.rxmode.enable_scatter = 1;
> +        rte_eth_dev_info_get(dev->port_id, &info);
> +        if (!strcmp(info.driver_name, "igb")) {

For igb devices condition above will never hit, the driver name in info will be reported as 'net_e1000_igb'.

I'm seeing a bit of a list growing for other drivers that support the current behavior/requirement for scatter with Jumbo frames.

Through testing today I saw that Scatter must be set for ixgbe SRIOV functions also, "net_ixgbe_vf".

From code inspection em devices "net_e1000_em" would have to be included also.

I would think that 'net_e1000_igb_vf' will be required also when set_mtu support is introduced in the future (quite likely), but for the moment that’s not relevant.

I'm wondering if there's an alternative solution to checking driver names as we could end up with an extensive list. Would have to look at this.

Ian

> +            conf.rxmode.enable_scatter = 1;
> +        }
>      }
> 
>      conf.rxmode.hw_ip_checksum = (dev->hw_ol_features &
> --
> 2.7.4
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev


More information about the dev mailing list