DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/l2fwd-event: set RSS based on device capabilities
@ 2019-12-16  5:37 pbhagavatula
  2019-12-16  5:46 ` Jerin Jacob
  2020-01-14  5:52 ` [dpdk-dev] [PATCH v2] examples/l2fwd-event: fix ethdev RSS setup pbhagavatula
  0 siblings, 2 replies; 5+ messages in thread
From: pbhagavatula @ 2019-12-16  5:37 UTC (permalink / raw)
  To: jerinj, Marko Kovacevic, Ori Kam, Bruce Richardson, Radu Nicolau,
	Akhil Goyal, Tomasz Kantecki, Sunil Kumar Kori, Pavan Nikhilesh
  Cc: dev, Satananda Burla

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Setup RSS configuration based on underlying device capabilities.

Signed-off-by: Satananda Burla <sburla@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 examples/l2fwd-event/l2fwd_common.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/examples/l2fwd-event/l2fwd_common.c b/examples/l2fwd-event/l2fwd_common.c
index 0c069ec35..2fae6f52c 100644
--- a/examples/l2fwd-event/l2fwd_common.c
+++ b/examples/l2fwd-event/l2fwd_common.c
@@ -46,6 +46,17 @@ l2fwd_event_init_ports(struct l2fwd_resources *rsrc)
 		if (ret != 0)
 			rte_panic("Error during getting device (port %u) info: %s\n",
 				  port_id, strerror(-ret));
+		local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
+			dev_info.flow_type_rss_offloads;
+		if (local_port_conf.rx_adv_conf.rss_conf.rss_hf !=
+				port_conf.rx_adv_conf.rss_conf.rss_hf) {
+			printf("Port %u modified RSS hash function based on hardware support,"
+			       "requested:%#"PRIx64" configured:%#"PRIx64"",
+				port_id,
+				port_conf.rx_adv_conf.rss_conf.rss_hf,
+				local_port_conf.rx_adv_conf.rss_conf.rss_hf);
+		}
+
 		if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
 			local_port_conf.txmode.offloads |=
 				DEV_TX_OFFLOAD_MBUF_FAST_FREE;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/l2fwd-event: set RSS based on device capabilities
  2019-12-16  5:37 [dpdk-dev] [PATCH] examples/l2fwd-event: set RSS based on device capabilities pbhagavatula
@ 2019-12-16  5:46 ` Jerin Jacob
  2020-01-13  9:34   ` Jerin Jacob
  2020-01-14  5:52 ` [dpdk-dev] [PATCH v2] examples/l2fwd-event: fix ethdev RSS setup pbhagavatula
  1 sibling, 1 reply; 5+ messages in thread
From: Jerin Jacob @ 2019-12-16  5:46 UTC (permalink / raw)
  To: Pavan Nikhilesh
  Cc: Jerin Jacob, Marko Kovacevic, Ori Kam, Bruce Richardson,
	Radu Nicolau, Akhil Goyal, Tomasz Kantecki, Sunil Kumar Kori,
	dpdk-dev, Satananda Burla

On Mon, Dec 16, 2019 at 11:07 AM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Setup RSS configuration based on underlying device capabilities.
>
> Signed-off-by: Satananda Burla <sburla@marvell.com>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---


Please add Fixes: and cc stable as well as it is a fix for the bug.


>  examples/l2fwd-event/l2fwd_common.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/examples/l2fwd-event/l2fwd_common.c b/examples/l2fwd-event/l2fwd_common.c
> index 0c069ec35..2fae6f52c 100644
> --- a/examples/l2fwd-event/l2fwd_common.c
> +++ b/examples/l2fwd-event/l2fwd_common.c
> @@ -46,6 +46,17 @@ l2fwd_event_init_ports(struct l2fwd_resources *rsrc)
>                 if (ret != 0)
>                         rte_panic("Error during getting device (port %u) info: %s\n",
>                                   port_id, strerror(-ret));
> +               local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
> +                       dev_info.flow_type_rss_offloads;
> +               if (local_port_conf.rx_adv_conf.rss_conf.rss_hf !=
> +                               port_conf.rx_adv_conf.rss_conf.rss_hf) {
> +                       printf("Port %u modified RSS hash function based on hardware support,"
> +                              "requested:%#"PRIx64" configured:%#"PRIx64"",
> +                               port_id,
> +                               port_conf.rx_adv_conf.rss_conf.rss_hf,
> +                               local_port_conf.rx_adv_conf.rss_conf.rss_hf);
> +               }
> +
>                 if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
>                         local_port_conf.txmode.offloads |=
>                                 DEV_TX_OFFLOAD_MBUF_FAST_FREE;
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/l2fwd-event: set RSS based on device capabilities
  2019-12-16  5:46 ` Jerin Jacob
@ 2020-01-13  9:34   ` Jerin Jacob
  0 siblings, 0 replies; 5+ messages in thread
From: Jerin Jacob @ 2020-01-13  9:34 UTC (permalink / raw)
  To: Pavan Nikhilesh
  Cc: Jerin Jacob, Marko Kovacevic, Ori Kam, Bruce Richardson,
	Radu Nicolau, Akhil Goyal, Tomasz Kantecki, Sunil Kumar Kori,
	dpdk-dev, Satananda Burla

On Mon, Dec 16, 2019 at 11:16 AM Jerin Jacob <jerinjacobk@gmail.com> wrote:
>
> On Mon, Dec 16, 2019 at 11:07 AM <pbhagavatula@marvell.com> wrote:
> >
> > From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >
> > Setup RSS configuration based on underlying device capabilities.
> >
> > Signed-off-by: Satananda Burla <sburla@marvell.com>
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> > ---
>
>
> Please add Fixes: and cc stable as well as it is a fix for the bug.

Ping

>
>
> >  examples/l2fwd-event/l2fwd_common.c | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> >
> > diff --git a/examples/l2fwd-event/l2fwd_common.c b/examples/l2fwd-event/l2fwd_common.c
> > index 0c069ec35..2fae6f52c 100644
> > --- a/examples/l2fwd-event/l2fwd_common.c
> > +++ b/examples/l2fwd-event/l2fwd_common.c
> > @@ -46,6 +46,17 @@ l2fwd_event_init_ports(struct l2fwd_resources *rsrc)
> >                 if (ret != 0)
> >                         rte_panic("Error during getting device (port %u) info: %s\n",
> >                                   port_id, strerror(-ret));
> > +               local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
> > +                       dev_info.flow_type_rss_offloads;
> > +               if (local_port_conf.rx_adv_conf.rss_conf.rss_hf !=
> > +                               port_conf.rx_adv_conf.rss_conf.rss_hf) {
> > +                       printf("Port %u modified RSS hash function based on hardware support,"
> > +                              "requested:%#"PRIx64" configured:%#"PRIx64"",
> > +                               port_id,
> > +                               port_conf.rx_adv_conf.rss_conf.rss_hf,
> > +                               local_port_conf.rx_adv_conf.rss_conf.rss_hf);
> > +               }
> > +
> >                 if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
> >                         local_port_conf.txmode.offloads |=
> >                                 DEV_TX_OFFLOAD_MBUF_FAST_FREE;
> > --
> > 2.17.1
> >

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev]  [PATCH v2] examples/l2fwd-event: fix ethdev RSS setup
  2019-12-16  5:37 [dpdk-dev] [PATCH] examples/l2fwd-event: set RSS based on device capabilities pbhagavatula
  2019-12-16  5:46 ` Jerin Jacob
@ 2020-01-14  5:52 ` pbhagavatula
  2020-01-14 20:37   ` Jerin Jacob
  1 sibling, 1 reply; 5+ messages in thread
From: pbhagavatula @ 2020-01-14  5:52 UTC (permalink / raw)
  To: jerinj, Marko Kovacevic, Ori Kam, Bruce Richardson, Radu Nicolau,
	Akhil Goyal, Tomasz Kantecki, Sunil Kumar Kori, Pavan Nikhilesh
  Cc: dev, stable, Satananda Burla

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Setup RSS configuration based on underlying device capabilities.

Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines")
Cc: stable@dpdk.org

Signed-off-by: Satananda Burla <sburla@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 v2 Changes:
 - change the patch type to fix.

 examples/l2fwd-event/l2fwd_common.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/examples/l2fwd-event/l2fwd_common.c b/examples/l2fwd-event/l2fwd_common.c
index 0c069ec35..2fae6f52c 100644
--- a/examples/l2fwd-event/l2fwd_common.c
+++ b/examples/l2fwd-event/l2fwd_common.c
@@ -46,6 +46,17 @@ l2fwd_event_init_ports(struct l2fwd_resources *rsrc)
 		if (ret != 0)
 			rte_panic("Error during getting device (port %u) info: %s\n",
 				  port_id, strerror(-ret));
+		local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
+			dev_info.flow_type_rss_offloads;
+		if (local_port_conf.rx_adv_conf.rss_conf.rss_hf !=
+				port_conf.rx_adv_conf.rss_conf.rss_hf) {
+			printf("Port %u modified RSS hash function based on hardware support,"
+			       "requested:%#"PRIx64" configured:%#"PRIx64"",
+				port_id,
+				port_conf.rx_adv_conf.rss_conf.rss_hf,
+				local_port_conf.rx_adv_conf.rss_conf.rss_hf);
+		}
+
 		if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
 			local_port_conf.txmode.offloads |=
 				DEV_TX_OFFLOAD_MBUF_FAST_FREE;
--
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2] examples/l2fwd-event: fix ethdev RSS setup
  2020-01-14  5:52 ` [dpdk-dev] [PATCH v2] examples/l2fwd-event: fix ethdev RSS setup pbhagavatula
@ 2020-01-14 20:37   ` Jerin Jacob
  0 siblings, 0 replies; 5+ messages in thread
From: Jerin Jacob @ 2020-01-14 20:37 UTC (permalink / raw)
  To: Pavan Nikhilesh
  Cc: Jerin Jacob, Marko Kovacevic, Ori Kam, Bruce Richardson,
	Radu Nicolau, Akhil Goyal, Tomasz Kantecki, Sunil Kumar Kori,
	dpdk-dev, dpdk stable, Satananda Burla

On Tue, Jan 14, 2020 at 11:22 AM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Setup RSS configuration based on underlying device capabilities.
>
> Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines")
> Cc: stable@dpdk.org
>
> Signed-off-by: Satananda Burla <sburla@marvell.com>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>


Applied to dpdk-next-eventdev/master. Thanks.

> ---
>  v2 Changes:
>  - change the patch type to fix.
>
>  examples/l2fwd-event/l2fwd_common.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/examples/l2fwd-event/l2fwd_common.c b/examples/l2fwd-event/l2fwd_common.c
> index 0c069ec35..2fae6f52c 100644
> --- a/examples/l2fwd-event/l2fwd_common.c
> +++ b/examples/l2fwd-event/l2fwd_common.c
> @@ -46,6 +46,17 @@ l2fwd_event_init_ports(struct l2fwd_resources *rsrc)
>                 if (ret != 0)
>                         rte_panic("Error during getting device (port %u) info: %s\n",
>                                   port_id, strerror(-ret));
> +               local_port_conf.rx_adv_conf.rss_conf.rss_hf &=
> +                       dev_info.flow_type_rss_offloads;
> +               if (local_port_conf.rx_adv_conf.rss_conf.rss_hf !=
> +                               port_conf.rx_adv_conf.rss_conf.rss_hf) {
> +                       printf("Port %u modified RSS hash function based on hardware support,"
> +                              "requested:%#"PRIx64" configured:%#"PRIx64"",
> +                               port_id,
> +                               port_conf.rx_adv_conf.rss_conf.rss_hf,
> +                               local_port_conf.rx_adv_conf.rss_conf.rss_hf);
> +               }
> +
>                 if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
>                         local_port_conf.txmode.offloads |=
>                                 DEV_TX_OFFLOAD_MBUF_FAST_FREE;
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-14 20:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-16  5:37 [dpdk-dev] [PATCH] examples/l2fwd-event: set RSS based on device capabilities pbhagavatula
2019-12-16  5:46 ` Jerin Jacob
2020-01-13  9:34   ` Jerin Jacob
2020-01-14  5:52 ` [dpdk-dev] [PATCH v2] examples/l2fwd-event: fix ethdev RSS setup pbhagavatula
2020-01-14 20:37   ` Jerin Jacob

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).