netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Jianbo Liu <jianbol@mellanox.com>,
	Oz Shlomo <ozsh@nvidia.com>, Roi Dayan <roid@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>
Subject: [net-next V2 04/11] net/mlx5e: E-Switch, Offload all chain 0 priorities when modify header and forward action is not supported
Date: Mon, 11 Jan 2021 23:05:27 -0800	[thread overview]
Message-ID: <20210112070534.136841-5-saeed@kernel.org> (raw)
In-Reply-To: <20210112070534.136841-1-saeed@kernel.org>

From: Jianbo Liu <jianbol@mellanox.com>

Miss path handling of tc multi chain filters (i.e. filters that are
defined on chain > 0) requires the hardware to communicate to the
driver the last chain that was processed. This is possible only when
the hardware is capable of performing the combination of modify header
and forward to table actions. Currently, if the hardware is missing
this capability then the driver only offloads rules that are defined
on tc chain 0 prio 1. However, this restriction can be relaxed because
packets that miss from chain 0 are processed through all the
priorities by tc software.

Allow the offload of all the supported priorities for chain 0 even
when the hardware is not capable to perform modify header and goto
table actions.

Fixes: 0b3a8b6b5340 ("net/mlx5: E-Switch: Fix using fwd and modify when firmware doesn't support it")
Signed-off-by: Jianbo Liu <jianbol@mellanox.com>
Reviewed-by: Oz Shlomo <ozsh@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c         | 6 ------
 drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c | 3 ---
 2 files changed, 9 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 4cdf834fa74a..56aa39ac1a1c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -1317,12 +1317,6 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv,
 	int err = 0;
 	int out_index;
 
-	if (!mlx5_chains_prios_supported(esw_chains(esw)) && attr->prio != 1) {
-		NL_SET_ERR_MSG_MOD(extack,
-				   "E-switch priorities unsupported, upgrade FW");
-		return -EOPNOTSUPP;
-	}
-
 	/* We check chain range only for tc flows.
 	 * For ft flows, we checked attr->chain was originally 0 and set it to
 	 * FDB_FT_CHAIN which is outside tc range.
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c
index 947f346bdc2d..fa61d305990c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c
@@ -141,9 +141,6 @@ u32 mlx5_chains_get_nf_ft_chain(struct mlx5_fs_chains *chains)
 
 u32 mlx5_chains_get_prio_range(struct mlx5_fs_chains *chains)
 {
-	if (!mlx5_chains_prios_supported(chains))
-		return 1;
-
 	if (mlx5_chains_ignore_flow_level_supported(chains))
 		return UINT_MAX;
 
-- 
2.26.2


  parent reply	other threads:[~2021-01-12  7:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12  7:05 [pull request][net-next V2 00/11] mlx5 updates 2021-01-07 Saeed Mahameed
2021-01-12  7:05 ` [net-next V2 01/11] net/mlx5: Add HW definition of reg_c_preserve Saeed Mahameed
2021-01-12  7:05 ` [net-next V2 02/11] net/mlx5e: Simplify condition on esw_vport_enable_qos() Saeed Mahameed
2021-01-12  7:05 ` [net-next V2 03/11] net/mlx5: E-Switch, use new cap as condition for mpls over udp Saeed Mahameed
2021-01-12  7:05 ` Saeed Mahameed [this message]
2021-01-12  7:05 ` [net-next V2 05/11] net/mlx5e: CT: Pass null instead of zero spec Saeed Mahameed
2021-01-12  7:05 ` [net-next V2 06/11] net/mlx5e: Remove redundant initialization to null Saeed Mahameed
2021-01-12  7:05 ` [net-next V2 07/11] net/mlx5e: CT: Remove redundant usage of zone mask Saeed Mahameed
2021-01-12  7:05 ` [net-next V2 08/11] net/mlx5e: IPsec, Enclose csum logic under ipsec config Saeed Mahameed
2021-01-12  7:05 ` [net-next V2 09/11] net/mlx5e: IPsec, Avoid unreachable return Saeed Mahameed
2021-01-12  7:05 ` [net-next V2 10/11] net/mlx5e: IPsec, Inline feature_check fast-path function Saeed Mahameed
2021-01-12  7:05 ` [net-next V2 11/11] net/mlx5e: IPsec, Remove unnecessary config flag usage Saeed Mahameed
2021-01-13 23:41 ` [pull request][net-next V2 00/11] mlx5 updates 2021-01-07 Jakub Kicinski
2021-01-14  0:01   ` Saeed Mahameed
2021-01-14  1:28     ` Jakub Kicinski

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=20210112070534.136841-5-saeed@kernel.org \
    --to=saeed@kernel.org \
    --cc=davem@davemloft.net \
    --cc=jianbol@mellanox.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ozsh@nvidia.com \
    --cc=roid@nvidia.com \
    --cc=saeedm@nvidia.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).