All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -stable v5.{7,8,9}] net/mlx5: E-Switch, fix changing mode to switchdev
@ 2021-01-27  5:22 Saeed Mahameed
  0 siblings, 0 replies; only message in thread
From: Saeed Mahameed @ 2021-01-27  5:22 UTC (permalink / raw)
  To: stable, gregkh; +Cc: Roi Dayan, Sridhar Samudrala, Saeed Mahameed

From: Roi Dayan <roid@nvidia.com>

Miss rule creation is always done with ignore flow level bit set.
Older firmwares do not support that. Check FW support before setting the
ignore flow level bit.

The issue doesn't exist upstream, it was already fixed by a refactoring
commit ae430332557a ("net/mlx5: Refactor multi chains and prios support")
which was merged on v5.10.

Fixes: 278d51f24330 ("net/mlx5: E-Switch, Increase number of chains and priorities")
Reported-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Signed-off-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/esw/chains.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/chains.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/chains.c
index 029001040737..b801825b3292 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/chains.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/chains.c
@@ -419,7 +419,9 @@ mlx5_esw_chains_add_miss_rule(struct fdb_chain *fdb_chain,
 	struct mlx5_flow_destination dest = {};
 	struct mlx5_flow_act act = {};
 
-	act.flags  = FLOW_ACT_IGNORE_FLOW_LEVEL | FLOW_ACT_NO_APPEND;
+	act.flags  = FLOW_ACT_NO_APPEND;
+	if (fdb_ignore_flow_level_supported(esw))
+		act.flags |= FLOW_ACT_IGNORE_FLOW_LEVEL;
 	act.action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST;
 	dest.type  = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE;
 	dest.ft = next_fdb;
-- 
2.29.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-27  5:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27  5:22 [PATCH -stable v5.{7,8,9}] net/mlx5: E-Switch, fix changing mode to switchdev Saeed Mahameed

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.