* [dpdk-dev] [PATCH] examples/ip_reassembly: enable scatter mode for Mellanox PMDs
@ 2019-11-18 18:18 Thinh Tran
2019-11-18 18:30 ` Jerin Jacob
2019-11-19 1:15 ` Stephen Hemminger
0 siblings, 2 replies; 5+ messages in thread
From: Thinh Tran @ 2019-11-18 18:18 UTC (permalink / raw)
To: dev; +Cc: Thinh Tran
Simple change to enable scatter for Mellanox CX4/CX5 PMDs
to run this example
Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
---
examples/ip_reassembly/main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index d59e6d02f..f881b89d1 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -1109,6 +1109,9 @@ main(int argc, char **argv)
port_conf.rx_adv_conf.rss_conf.rss_hf,
local_port_conf.rx_adv_conf.rss_conf.rss_hf);
}
+ /* Mellanox PMDs needs scatter mode to be explicitly enabled */
+ if (!strcmp(dev_info.driver_name, "net_mlx5"))
+ local_port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_SCATTER;
ret = rte_eth_dev_configure(portid, 1, (uint16_t)n_tx_queue,
&local_port_conf);
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/ip_reassembly: enable scatter mode for Mellanox PMDs
2019-11-18 18:18 [dpdk-dev] [PATCH] examples/ip_reassembly: enable scatter mode for Mellanox PMDs Thinh Tran
@ 2019-11-18 18:30 ` Jerin Jacob
2019-11-18 23:02 ` Thinh Tran
2019-11-19 1:15 ` Stephen Hemminger
1 sibling, 1 reply; 5+ messages in thread
From: Jerin Jacob @ 2019-11-18 18:30 UTC (permalink / raw)
To: Thinh Tran; +Cc: dpdk-dev
On Mon, 18 Nov, 2019, 11:49 pm Thinh Tran, <thinhtr@linux.vnet.ibm.com>
wrote:
> Simple change to enable scatter for Mellanox CX4/CX5 PMDs
> to run this example
>
> Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
> ---
> examples/ip_reassembly/main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
> index d59e6d02f..f881b89d1 100644
> --- a/examples/ip_reassembly/main.c
> +++ b/examples/ip_reassembly/main.c
> @@ -1109,6 +1109,9 @@ main(int argc, char **argv)
> port_conf.rx_adv_conf.rss_conf.rss_hf,
>
> local_port_conf.rx_adv_conf.rss_conf.rss_hf);
> }
> + /* Mellanox PMDs needs scatter mode to be explicitly
> enabled */
> + if (!strcmp(dev_info.driver_name, "net_mlx5"))
>
No driver specific code in generic application. Please fix the driver
instead.
+ local_port_conf.rxmode.offloads |=
> DEV_RX_OFFLOAD_SCATTER;
>
> ret = rte_eth_dev_configure(portid, 1,
> (uint16_t)n_tx_queue,
> &local_port_conf);
> --
> 2.17.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/ip_reassembly: enable scatter mode for Mellanox PMDs
2019-11-18 18:30 ` Jerin Jacob
@ 2019-11-18 23:02 ` Thinh Tran
0 siblings, 0 replies; 5+ messages in thread
From: Thinh Tran @ 2019-11-18 23:02 UTC (permalink / raw)
To: Jerin Jacob; +Cc: dpdk-dev
Hi Jerin,
would it be possible to add a command option such as '--enable-scatter'
like testpmd does?
Thanks,
Thinh Tran
On 11/18/2019 12:30 PM, Jerin Jacob wrote:
>
>
> On Mon, 18 Nov, 2019, 11:49 pm Thinh Tran, <thinhtr@linux.vnet.ibm.com
> <mailto:thinhtr@linux.vnet.ibm.com>> wrote:
>
> Simple change to enable scatter for Mellanox CX4/CX5 PMDs
> to run this example
>
> Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com
> <mailto:thinhtr@linux.vnet.ibm.com>>
> ---
> examples/ip_reassembly/main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/examples/ip_reassembly/main.c
> b/examples/ip_reassembly/main.c
> index d59e6d02f..f881b89d1 100644
> --- a/examples/ip_reassembly/main.c
> +++ b/examples/ip_reassembly/main.c
> @@ -1109,6 +1109,9 @@ main(int argc, char **argv)
> port_conf.rx_adv_conf.rss_conf.rss_hf,
>
> local_port_conf.rx_adv_conf.rss_conf.rss_hf);
> }
> + /* Mellanox PMDs needs scatter mode to be explicitly
> enabled */
> + if (!strcmp(dev_info.driver_name, "net_mlx5"))
>
>
> No driver specific code in generic application. Please fix the driver
> instead.
>
> + local_port_conf.rxmode.offloads |=
> DEV_RX_OFFLOAD_SCATTER;
>
> ret = rte_eth_dev_configure(portid, 1,
> (uint16_t)n_tx_queue,
> &local_port_conf);
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/ip_reassembly: enable scatter mode for Mellanox PMDs
2019-11-18 18:18 [dpdk-dev] [PATCH] examples/ip_reassembly: enable scatter mode for Mellanox PMDs Thinh Tran
2019-11-18 18:30 ` Jerin Jacob
@ 2019-11-19 1:15 ` Stephen Hemminger
2020-02-03 14:43 ` Slava Ovsiienko
1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2019-11-19 1:15 UTC (permalink / raw)
To: Thinh Tran; +Cc: dev
On Mon, 18 Nov 2019 12:18:33 -0600
Thinh Tran <thinhtr@linux.vnet.ibm.com> wrote:
> Simple change to enable scatter for Mellanox CX4/CX5 PMDs
> to run this example
>
> Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
> ---
> examples/ip_reassembly/main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
> index d59e6d02f..f881b89d1 100644
> --- a/examples/ip_reassembly/main.c
> +++ b/examples/ip_reassembly/main.c
> @@ -1109,6 +1109,9 @@ main(int argc, char **argv)
> port_conf.rx_adv_conf.rss_conf.rss_hf,
> local_port_conf.rx_adv_conf.rss_conf.rss_hf);
> }
> + /* Mellanox PMDs needs scatter mode to be explicitly enabled */
> + if (!strcmp(dev_info.driver_name, "net_mlx5"))
> + local_port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_SCATTER;
This is a bad, bad precedent.
Either fix MLX driver or enable it for all PMD's.
Forcing applications to do workarounds indicates a poor design abstraction.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/ip_reassembly: enable scatter mode for Mellanox PMDs
2019-11-19 1:15 ` Stephen Hemminger
@ 2020-02-03 14:43 ` Slava Ovsiienko
0 siblings, 0 replies; 5+ messages in thread
From: Slava Ovsiienko @ 2020-02-03 14:43 UTC (permalink / raw)
To: Stephen Hemminger, Thinh Tran; +Cc: dev
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Stephen Hemminger
> Sent: Tuesday, November 19, 2019 3:15
> To: Thinh Tran <thinhtr@linux.vnet.ibm.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] examples/ip_reassembly: enable scatter
> mode for Mellanox PMDs
>
> On Mon, 18 Nov 2019 12:18:33 -0600
> Thinh Tran <thinhtr@linux.vnet.ibm.com> wrote:
>
> > Simple change to enable scatter for Mellanox CX4/CX5 PMDs to run this
> > example
> >
> > Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
> > ---
> > examples/ip_reassembly/main.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/examples/ip_reassembly/main.c
> > b/examples/ip_reassembly/main.c index d59e6d02f..f881b89d1 100644
> > --- a/examples/ip_reassembly/main.c
> > +++ b/examples/ip_reassembly/main.c
> > @@ -1109,6 +1109,9 @@ main(int argc, char **argv)
> > port_conf.rx_adv_conf.rss_conf.rss_hf,
> > local_port_conf.rx_adv_conf.rss_conf.rss_hf);
> > }
> > + /* Mellanox PMDs needs scatter mode to be explicitly
> enabled */
> > + if (!strcmp(dev_info.driver_name, "net_mlx5"))
> > + local_port_conf.rxmode.offloads |=
> DEV_RX_OFFLOAD_SCATTER;
>
> This is a bad, bad precedent.
> Either fix MLX driver or enable it for all PMD's.
> Forcing applications to do workarounds indicates a poor design abstraction.
+1
What about checking whether PMD supports scattering offload and enable these one?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-02-03 14:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-18 18:18 [dpdk-dev] [PATCH] examples/ip_reassembly: enable scatter mode for Mellanox PMDs Thinh Tran
2019-11-18 18:30 ` Jerin Jacob
2019-11-18 23:02 ` Thinh Tran
2019-11-19 1:15 ` Stephen Hemminger
2020-02-03 14:43 ` Slava Ovsiienko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).