Netdev List
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Roi Dayan <roid@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 07/13] net/mlx5e: Apply the correct check for supporting TC esw rules split
Date: Mon, 19 Nov 2018 15:41:22 -0800	[thread overview]
Message-ID: <20181119234128.6948-8-saeedm@mellanox.com> (raw)
In-Reply-To: <20181119234128.6948-1-saeedm@mellanox.com>

From: Roi Dayan <roid@mellanox.com>

The mirror and not the output count is the one denoting a split.
Fix to condition the offload attempt on the mirror count being > 0
along the firmware to have the related capability.

Fixes: 592d36515969 ("net/mlx5e: Parse mirroring action for offloaded TC eswitch flows")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Yossi Kuperman <yossiku@mellanox.com>
Reviewed-by: Chris Mi <chrism@mellanox.com>
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 0409767237a7..fca6f4132c91 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -2980,7 +2980,7 @@ 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->out_count > 1 && !mlx5_esw_has_fwd_fdb(priv->mdev)) {
+	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");
 		netdev_warn_once(priv->netdev, "current firmware doesn't support split rule for port mirroring\n");
-- 
2.19.1

  parent reply	other threads:[~2018-11-20 10:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 23:41 [pull request][net 00/13] Mellanox, mlx5 fixes 2018-11-19 Saeed Mahameed
2018-11-19 23:41 ` [net 01/13] net/mlx5: IPSec, Fix the SA context hash key Saeed Mahameed
2018-11-20  9:25   ` Sergei Shtylyov
2018-11-20 17:18     ` David Miller
2018-11-19 23:41 ` [net 02/13] net/mlx5e: IPoIB, Reset QP after channels are closed Saeed Mahameed
2018-11-19 23:41 ` [net 03/13] net/mlx5e: Don't match on vlan non-existence if ethertype is wildcarded Saeed Mahameed
2018-11-19 23:41 ` [net 04/13] net/mlx5e: Claim TC hw offloads support only under a proper build config Saeed Mahameed
2018-11-19 23:41 ` [net 05/13] net/mlx5e: Always use the match level enum when parsing TC rule match Saeed Mahameed
2018-11-19 23:41 ` [net 06/13] net/mlx5e: Adjust to max number of channles when re-attaching Saeed Mahameed
2018-11-19 23:41 ` Saeed Mahameed [this message]
2018-11-19 23:41 ` [net 08/13] net/mlx5e: RX, verify received packet size in Linear Striding RQ Saeed Mahameed
2018-11-19 23:41 ` [net 09/13] net/mlx5e: Fix selftest for small MTUs Saeed Mahameed
2018-11-19 23:41 ` [net 10/13] net/mlx5e: Fix a bug in turning off FEC policy in unsupported speeds Saeed Mahameed
2018-11-19 23:41 ` [net 11/13] net/mlx5e: Fix wrong field name in FEC related functions Saeed Mahameed
2018-11-19 23:41 ` [net 12/13] net/mlx5e: Removed unnecessary warnings in FEC caps query Saeed Mahameed
2018-11-19 23:41 ` [net 13/13] net/mlx5e: Fix failing ethtool query on FEC query error Saeed Mahameed
2018-11-20  3:34 ` [pull request][net 00/13] Mellanox, mlx5 fixes 2018-11-19 David Miller

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=20181119234128.6948-8-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=roid@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