[v2] examples/l2fwd-event: fix ethdev RSS setup
diff mbox series

Message ID 20200114055224.1795-1-pbhagavatula@marvell.com
State Accepted, archived
Delegated to: Jerin Jacob
Headers show
Series
  • [v2] examples/l2fwd-event: fix ethdev RSS setup
Related show

Checks

Context Check Description
ci/travis-robot success Travis build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/Intel-compilation fail Compilation issues
ci/iol-testing success Testing PASS
ci/iol-intel-Performance fail Performance Testing issues
ci/checkpatch success coding style OK

Commit Message

Pavan Nikhilesh Bhagavatula Jan. 14, 2020, 5:52 a.m. UTC
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(+)

--
2.17.1

Comments

Jerin Jacob Jan. 14, 2020, 8:37 p.m. UTC | #1
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
>

Patch
diff mbox series

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;