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 4/9] net/mlx5e: Err if asked to mirror a goto chain tc eswitch rule
Date: Thu, 13 Dec 2018 08:45:33 -0800	[thread overview]
Message-ID: <20181213164538.31436-5-saeedm@mellanox.com> (raw)
In-Reply-To: <20181213164538.31436-1-saeedm@mellanox.com>

From: Or Gerlitz <ogerlitz@mellanox.com>

Currently we are not supporting this and not err-ing on that either.

For now, just err if asked to do that.

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

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index fca6f4132c91..1f01c905a042 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -2966,8 +2966,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
 				NL_SET_ERR_MSG(extack, "Requested destination chain is out of supported range");
 				return -EOPNOTSUPP;
 			}
-			action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST |
-				  MLX5_FLOW_CONTEXT_ACTION_COUNT;
+			action |= MLX5_FLOW_CONTEXT_ACTION_COUNT;
 			attr->dest_chain = dest_chain;
 
 			continue;
@@ -2980,6 +2979,14 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
 	if (!actions_match_supported(priv, exts, parse_attr, flow, extack))
 		return -EOPNOTSUPP;
 
+	if (attr->dest_chain) {
+		if (attr->action & MLX5_FLOW_CONTEXT_ACTION_FWD_DEST) {
+			NL_SET_ERR_MSG(extack, "Mirroring goto chain rules isn't supported");
+			return -EOPNOTSUPP;
+		}
+		attr->action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST;
+	}
+
 	if (attr->mirror_count > 0 && !mlx5_esw_has_fwd_fdb(priv->mdev)) {
 		NL_SET_ERR_MSG_MOD(extack,
 				   "current firmware doesn't support split rule for port mirroring");
-- 
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 ` Saeed Mahameed [this message]
2018-12-13 16:45 ` [net 5/9] net/mlx5e: Avoid overriding the user provided priority for offloaded tc rules Saeed Mahameed
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-5-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.