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, Or Gerlitz <ogerlitz@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 05/13] net/mlx5e: Always use the match level enum when parsing TC rule match
Date: Mon, 19 Nov 2018 15:41:20 -0800	[thread overview]
Message-ID: <20181119234128.6948-6-saeedm@mellanox.com> (raw)
In-Reply-To: <20181119234128.6948-1-saeedm@mellanox.com>

From: Or Gerlitz <ogerlitz@mellanox.com>

We get the match level (none, l2, l3, l4) while going over the match
dissectors of an offloaded tc rule. When doing this, the match level
enum and the not min inline enum values should be used, fix that.

This worked accidentally b/c both enums have the same numerical values.

Fixes: d708f902989b ('net/mlx5e: Get the required HW match level while parsing TC flow matches')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++--
 1 file changed, 2 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 84eb6939e69a..0409767237a7 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -1587,10 +1587,10 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
 
 			/* the HW doesn't need L3 inline to match on frag=no */
 			if (!(key->flags & FLOW_DIS_IS_FRAGMENT))
-				*match_level = MLX5_INLINE_MODE_L2;
+				*match_level = MLX5_MATCH_L2;
 	/* ***  L2 attributes parsing up to here *** */
 			else
-				*match_level = MLX5_INLINE_MODE_IP;
+				*match_level = MLX5_MATCH_L3;
 		}
 	}
 
-- 
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 ` Saeed Mahameed [this message]
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 ` [net 07/13] net/mlx5e: Apply the correct check for supporting TC esw rules split Saeed Mahameed
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-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox