|
|
5e1950 |
From c68f3a815c061dbcfb3e0aca041b042ba7e75d47 Mon Sep 17 00:00:00 2001
|
|
|
5e1950 |
From: Paul Blakey <paulb@nvidia.com>
|
|
|
5e1950 |
Date: Wed, 22 Jun 2022 13:11:18 +0300
|
|
|
5e1950 |
Subject: [PATCH 04/28] net/mlx5e: Fix enabling sriov while tc nic rules are
|
|
|
5e1950 |
offloaded
|
|
|
5e1950 |
Git-commit: 0c9d876545a56aebed30fa306d0460a4d28d271a
|
|
|
5e1950 |
Patch-mainline: v5.19-rc7
|
|
|
5e1950 |
References: git-fixes
|
|
|
5e1950 |
|
|
|
5e1950 |
There is a total of four 4M entries flow tables. In sriov disabled
|
|
|
5e1950 |
mode, ct, ct_nat and post_act take three of them. When adding the
|
|
|
5e1950 |
first tc nic rule in this mode, it will take another 4M table
|
|
|
5e1950 |
for the tc <chain,prio> table. If user then enables sriov, the legacy
|
|
|
5e1950 |
flow table tries to take another 4M and fails, and so enablement fails.
|
|
|
5e1950 |
|
|
|
5e1950 |
To fix that, have legacy fdb take the next available maximum
|
|
|
5e1950 |
size from the fs ft pool.
|
|
|
5e1950 |
|
|
|
5e1950 |
Fixes: 4a98544d1827 ("net/mlx5: Move chains ft pool to be used by all firmware steering")
|
|
|
5e1950 |
Signed-off-by: Paul Blakey <paulb@nvidia.com>
|
|
|
5e1950 |
Reviewed-by: Roi Dayan <roid@nvidia.com>
|
|
|
5e1950 |
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
|
|
|
5e1950 |
Signed-off-by: Denis Kirjanov <denis.kirjanov@suse.com>
|
|
|
5e1950 |
---
|
|
|
5e1950 |
drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c | 5 +++--
|
|
|
5e1950 |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
5e1950 |
|
|
|
5e1950 |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c
|
|
|
5e1950 |
index df277a6cddc0..c4c7e96a781e 100644
|
|
|
5e1950 |
--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c
|
|
|
5e1950 |
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c
|
|
|
5e1950 |
@@ -11,6 +11,7 @@
|
|
|
5e1950 |
#include "mlx5_core.h"
|
|
|
5e1950 |
#include "eswitch.h"
|
|
|
5e1950 |
#include "fs_core.h"
|
|
|
5e1950 |
+#include "fs_ft_pool.h"
|
|
|
5e1950 |
#include "esw/qos.h"
|
|
|
5e1950 |
|
|
|
5e1950 |
enum {
|
|
|
5e1950 |
@@ -95,8 +96,7 @@ static int esw_create_legacy_fdb_table(struct mlx5_eswitch *esw)
|
|
|
5e1950 |
if (!flow_group_in)
|
|
|
5e1950 |
return -ENOMEM;
|
|
|
5e1950 |
|
|
|
5e1950 |
- table_size = BIT(MLX5_CAP_ESW_FLOWTABLE_FDB(dev, log_max_ft_size));
|
|
|
5e1950 |
- ft_attr.max_fte = table_size;
|
|
|
5e1950 |
+ ft_attr.max_fte = POOL_NEXT_SIZE;
|
|
|
5e1950 |
ft_attr.prio = LEGACY_FDB_PRIO;
|
|
|
5e1950 |
fdb = mlx5_create_flow_table(root_ns, &ft_attr);
|
|
|
5e1950 |
if (IS_ERR(fdb)) {
|
|
|
5e1950 |
@@ -105,6 +105,7 @@ static int esw_create_legacy_fdb_table(struct mlx5_eswitch *esw)
|
|
|
5e1950 |
goto out;
|
|
|
5e1950 |
}
|
|
|
5e1950 |
esw->fdb_table.legacy.fdb = fdb;
|
|
|
5e1950 |
+ table_size = fdb->max_fte;
|
|
|
5e1950 |
|
|
|
5e1950 |
/* Addresses group : Full match unicast/multicast addresses */
|
|
|
5e1950 |
MLX5_SET(create_flow_group_in, flow_group_in, match_criteria_enable,
|
|
|
5e1950 |
--
|
|
|
5e1950 |
2.16.4
|
|
|
5e1950 |
|