All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Or Gerlitz <ogerlitz@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 5/9] net/mlx5e: Avoid overriding the user provided priority for offloaded tc rules
Date: Thu, 13 Dec 2018 08:45:34 -0800	[thread overview]
Message-ID: <20181213164538.31436-6-saeedm@mellanox.com> (raw)
In-Reply-To: <20181213164538.31436-1-saeedm@mellanox.com>

From: Or Gerlitz <ogerlitz@mellanox.com>

Just a leftover which was wrongly left there, remove it while spawning
a message to suggest firmware upgrade.

Fixes: bf07aa730a04 ('net/mlx5e: Support offloading tc priorities and chains for eswitch flows')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 1f01c905a042..e6170ddf2cc4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -907,11 +907,10 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv,
 	struct mlx5e_priv *out_priv;
 	int err = 0, encap_err = 0;
 
-	/* if prios are not supported, keep the old behaviour of using same prio
-	 * for all offloaded rules.
-	 */
-	if (!mlx5_eswitch_prios_supported(esw))
-		attr->prio = 1;
+	if (!mlx5_eswitch_prios_supported(esw) && attr->prio != 1) {
+		NL_SET_ERR_MSG(extack, "E-switch priorities unsupported, upgrade FW");
+		return -EOPNOTSUPP;
+	}
 
 	if (attr->chain > max_chain) {
 		NL_SET_ERR_MSG(extack, "Requested chain is out of supported range");
-- 
2.19.2

  parent reply	other threads:[~2018-12-13 16:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13 16:45 [pull request][net 0/9] Mellanox, mlx5 fixes 2018-12-13 Saeed Mahameed
2018-12-13 16:45 ` [net 1/9] net/mlx5: E-Switch, Fix fdb cap bits swap Saeed Mahameed
2018-12-13 16:45 ` [net 2/9] net/mlx5e: Fix default amount of channels for VF representors Saeed Mahameed
2018-12-13 16:45 ` [net 3/9] net/mlx5e: RX, Verify MPWQE stride size is in range Saeed Mahameed
2018-12-13 16:45 ` [net 4/9] net/mlx5e: Err if asked to mirror a goto chain tc eswitch rule Saeed Mahameed
2018-12-13 16:45 ` Saeed Mahameed [this message]
2018-12-13 16:45 ` [net 6/9] net/mlx5e: Properly initialize flow attributes for slow path eswitch rule deletion Saeed Mahameed
2018-12-13 16:45 ` [net 7/9] net/mlx5e: Avoid encap flows deletion attempt the 1st time a neigh is resolved Saeed Mahameed
2018-12-13 16:45 ` [net 8/9] net/mlx5e: Remove unused UDP GSO remaining counter Saeed Mahameed
2018-12-13 16:45 ` [net 9/9] net/mlx5e: Cancel DIM work on close SQ Saeed Mahameed
2018-12-14  3:32 ` [pull request][net 0/9] Mellanox, mlx5 fixes 2018-12-13 David Miller
2018-12-14 19:03   ` Saeed Mahameed

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=20181213164538.31436-6-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.