[dpdk-dev,1/2] net/mlx5: fix flow priority for queue action

Message ID b014d4116d1fe8ce46a641f00e7a2a8ac8b9e61f.1507896510.git.nelio.laranjeiro@6wind.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Nélio Laranjeiro Oct. 13, 2017, 12:09 p.m. UTC
  Priority is wrongly configured when the action is queue, using the Ethernet
layer priority instead of the most specific layer found.

Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
  

Comments

Nélio Laranjeiro Oct. 23, 2017, 9:44 a.m. UTC | #1
Changes in v2:

 * Split last second commit in two, one for testpmd the second one for the PMD
 * Re-work "net/mlx5: fix RSS hash update" to also fix a bug introduced in the
   hash_get() blocking the update.

Nelio Laranjeiro (3):
  net/mlx5: fix flow priority for queue action
  app/testpmd: fix RSS structure initialisation
  net/mlx5: fix RSS hash update

 app/test-pmd/cmdline.c       |  2 +-
 drivers/net/mlx5/mlx5_flow.c | 12 +++++++++++-
 drivers/net/mlx5/mlx5_rss.c  | 25 +++++++++++--------------
 3 files changed, 23 insertions(+), 16 deletions(-)
  
Nélio Laranjeiro Oct. 23, 2017, 11:17 a.m. UTC | #2
Changes in v3:

 * Add missing "fixes" tag in the last commit.

Changes in v2:

 * Split last second commit in two, one for testpmd the second one for the PMD
 * Re-work "net/mlx5: fix RSS hash update" to also fix a bug introduced in the
   hash_get() blocking the update.

Nelio Laranjeiro (3):
  net/mlx5: fix flow priority for queue action
  app/testpmd: fix RSS structure initialisation
  net/mlx5: fix RSS hash update

 app/test-pmd/cmdline.c       |  2 +-
 drivers/net/mlx5/mlx5_flow.c | 12 +++++++++++-
 drivers/net/mlx5/mlx5_rss.c  | 25 +++++++++++--------------
 3 files changed, 23 insertions(+), 16 deletions(-)
  
Ferruh Yigit Oct. 23, 2017, 9:30 p.m. UTC | #3
On 10/23/2017 4:17 AM, Nelio Laranjeiro wrote:
> Changes in v3:
> 
>  * Add missing "fixes" tag in the last commit.
> 
> Changes in v2:
> 
>  * Split last second commit in two, one for testpmd the second one for the PMD
>  * Re-work "net/mlx5: fix RSS hash update" to also fix a bug introduced in the
>    hash_get() blocking the update.
> 
> Nelio Laranjeiro (3):
>   net/mlx5: fix flow priority for queue action
>   app/testpmd: fix RSS structure initialisation
>   net/mlx5: fix RSS hash update

Series applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 2b6380fb9..440bda9a1 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1172,8 +1172,18 @@  priv_flow_convert(struct priv *priv,
 	 * Last step. Complete missing specification to reach the RSS
 	 * configuration.
 	 */
-	if (parser->queues_n > 1)
+	if (parser->queues_n > 1) {
 		priv_flow_convert_finalise(priv, parser);
+	} else if (!parser->drop) {
+		/*
+		 * Action queue have their priority overridden with
+		 * Ethernet priority, this priority needs to be adjusted to
+		 * their most specific layer priority.
+		 */
+		parser->queue[HASH_RXQ_ETH].ibv_attr->priority =
+			attr->priority +
+			hash_rxq_init[parser->layer].flow_priority;
+	}
 exit_free:
 	/* Only verification is expected, all resources should be released. */
 	if (!parser->create) {