Message ID | 1524847249-19091-1-git-send-email-pablo.cascon@netronome.com |
---|---|
State | Accepted |
Delegated to: | Ian Stokes |
Headers | show |
Series | [ovs-dev,v4,1/1] netdev-dpdk: don't enable scatter for jumbo RX support for nfp | expand |
On 04/27/2018 05:40 PM, Pablo Cascón wrote: > 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 not enabling scatter only for the PMD/NIC known not to > need it to support jumbo RX. > Acked-by: Kevin Traynor <ktraynor@redhat.com> > Note: this change is temporary and not needed for later releases OVS/DPDK > > Reported-by: Louis Peens <louis.peens@netronome.com> > Signed-off-by: Pablo Cascón <pablo.cascon@netronome.com> > Reviewed-by: Simon Horman <simon.horman@netronome.com> > --- > lib/netdev-dpdk.c | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > index ee39cbe..fdc8f66 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. */ > + /* As of DPDK 17.11.1 a few PMDs require to explicitly enable > + * scatter to support jumbo RX. Checking the offload capabilities > + * is not an option as PMDs are not required yet to report > + * them. The only reliable info is the driver name and knowledge > + * (testing or code review). Listing all such PMDs feels harder > + * than highlighting the one known not to need scatter */ > if (dev->mtu > ETHER_MTU) { > - conf.rxmode.enable_scatter = 1; > + rte_eth_dev_info_get(dev->port_id, &info); > + if (strncmp(info.driver_name, "net_nfp", 6)) { > + conf.rxmode.enable_scatter = 1; > + } > } > > conf.rxmode.hw_ip_checksum = (dev->hw_ol_features & >
> On 04/27/2018 05:40 PM, Pablo Cascón wrote: > > 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 not enabling scatter only for the PMD/NIC known not to > > need it to support jumbo RX. > > > > Acked-by: Kevin Traynor <ktraynor@redhat.com> > Thanks all, I'll apply this to DPDK_MERGE and backport to the previous releases, it will be part of this week's pull request. Thanks Ian > > Note: this change is temporary and not needed for later releases > > OVS/DPDK > > > > Reported-by: Louis Peens <louis.peens@netronome.com> > > Signed-off-by: Pablo Cascón <pablo.cascon@netronome.com> > > Reviewed-by: Simon Horman <simon.horman@netronome.com> > > --- > > lib/netdev-dpdk.c | 14 +++++++++++--- > > 1 file changed, 11 insertions(+), 3 deletions(-) > > > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index > > ee39cbe..fdc8f66 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. */ > > + /* As of DPDK 17.11.1 a few PMDs require to explicitly enable > > + * scatter to support jumbo RX. Checking the offload capabilities > > + * is not an option as PMDs are not required yet to report > > + * them. The only reliable info is the driver name and knowledge > > + * (testing or code review). Listing all such PMDs feels harder > > + * than highlighting the one known not to need scatter */ > > if (dev->mtu > ETHER_MTU) { > > - conf.rxmode.enable_scatter = 1; > > + rte_eth_dev_info_get(dev->port_id, &info); > > + if (strncmp(info.driver_name, "net_nfp", 6)) { > > + conf.rxmode.enable_scatter = 1; > > + } > > } > > > > conf.rxmode.hw_ip_checksum = (dev->hw_ol_features & > > > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
On 01/05/18 11:34, Stokes, Ian wrote: >> On 04/27/2018 05:40 PM, Pablo Cascón wrote: >>> 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 not enabling scatter only for the PMD/NIC known not to >>> need it to support jumbo RX. >>> >> Acked-by: Kevin Traynor <ktraynor@redhat.com> >> > Thanks all, I'll apply this to DPDK_MERGE and backport to the previous releases, it will be part of this week's pull request. > > Thanks > Ian Thanks! > >>> Note: this change is temporary and not needed for later releases >>> OVS/DPDK >>> >>> Reported-by: Louis Peens <louis.peens@netronome.com> >>> Signed-off-by: Pablo Cascón <pablo.cascon@netronome.com> >>> Reviewed-by: Simon Horman <simon.horman@netronome.com> >>> --- >>> lib/netdev-dpdk.c | 14 +++++++++++--- >>> 1 file changed, 11 insertions(+), 3 deletions(-) >>> >>> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index >>> ee39cbe..fdc8f66 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. */ >>> + /* As of DPDK 17.11.1 a few PMDs require to explicitly enable >>> + * scatter to support jumbo RX. Checking the offload capabilities >>> + * is not an option as PMDs are not required yet to report >>> + * them. The only reliable info is the driver name and knowledge >>> + * (testing or code review). Listing all such PMDs feels harder >>> + * than highlighting the one known not to need scatter */ >>> if (dev->mtu > ETHER_MTU) { >>> - conf.rxmode.enable_scatter = 1; >>> + rte_eth_dev_info_get(dev->port_id, &info); >>> + if (strncmp(info.driver_name, "net_nfp", 6)) { >>> + conf.rxmode.enable_scatter = 1; >>> + } >>> } >>> >>> conf.rxmode.hw_ip_checksum = (dev->hw_ol_features & >>> >> _______________________________________________ >> dev mailing list >> dev@openvswitch.org >> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index ee39cbe..fdc8f66 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. */ + /* As of DPDK 17.11.1 a few PMDs require to explicitly enable + * scatter to support jumbo RX. Checking the offload capabilities + * is not an option as PMDs are not required yet to report + * them. The only reliable info is the driver name and knowledge + * (testing or code review). Listing all such PMDs feels harder + * than highlighting the one known not to need scatter */ if (dev->mtu > ETHER_MTU) { - conf.rxmode.enable_scatter = 1; + rte_eth_dev_info_get(dev->port_id, &info); + if (strncmp(info.driver_name, "net_nfp", 6)) { + conf.rxmode.enable_scatter = 1; + } } conf.rxmode.hw_ip_checksum = (dev->hw_ol_features &