DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
To: dev@dpdk.org
Cc: Yongseok Koh <yskoh@mellanox.com>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>
Subject: [dpdk-dev] [PATCH v2] net/mlx5: fix adjust priority for drop queue
Date: Wed, 25 Oct 2017 10:25:22 +0200	[thread overview]
Message-ID: <5156fd25083e0489e1e3da5d412579ce9a123e0f.1508919813.git.nelio.laranjeiro@6wind.com> (raw)
In-Reply-To: <8c8fb4394ba85f5bda005119cbfc851a3b728fa6.1508844772.git.nelio.laranjeiro@6wind.com>

Drop queue should also adjust their priority according the most specific
layer in the pattern they are matching to avoid dropping all the traffic.

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

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

---

Changes in v2:

 * Reorder the if, else if, else statement to improve readability
---
 drivers/net/mlx5/mlx5_flow.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 26cf593af..f392f1f65 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1174,9 +1174,17 @@ priv_flow_convert(struct priv *priv,
 	 * Last step. Complete missing specification to reach the RSS
 	 * configuration.
 	 */
-	if (parser->queues_n > 1) {
+	if (parser->drop) {
+		/*
+		 * Drop queue priority needs to be adjusted to
+		 * their most specific layer priority.
+		 */
+		parser->drop_q.ibv_attr->priority =
+			attr->priority +
+			hash_rxq_init[parser->layer].flow_priority;
+	} else if (parser->queues_n > 1) {
 		priv_flow_convert_finalise(priv, parser);
-	} else if (!parser->drop) {
+	} else {
 		/*
 		 * Action queue have their priority overridden with
 		 * Ethernet priority, this priority needs to be adjusted to
-- 
2.11.0

  parent reply	other threads:[~2017-10-25  8:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 11:33 [dpdk-dev] [PATCH] " Nelio Laranjeiro
2017-10-24 17:55 ` Yongseok Koh
2017-10-25  8:06   ` Nélio Laranjeiro
2017-10-25  8:25 ` Nelio Laranjeiro [this message]
2017-10-25 16:41   ` [dpdk-dev] [PATCH v2] " Yongseok Koh
2017-10-25 21:45     ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5156fd25083e0489e1e3da5d412579ce9a123e0f.1508919813.git.nelio.laranjeiro@6wind.com \
    --to=nelio.laranjeiro@6wind.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=yskoh@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).