summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorChris Mi <cmi@nvidia.com>2020-10-09 11:06:33 +0800
committerSaeed Mahameed <saeedm@nvidia.com>2021-04-06 21:36:02 -0700
commitc1904360dde8fb4f79bec4751c7540df10d57ec2 (patch)
treea82d6d61e9857c9a353316acf5b7cdc5115ab9bb /drivers/net
parentc796bb7cd2307d5fb815e919b964bf2d65c95ec3 (diff)
net/mlx5: E-switch, Set per vport table default group number
Different per voprt table is created using a different per vport table namespace. Because we can't use variable to set the namespace member value. If max group number is 0 in the namespace, use the eswitch default max group number. Signed-off-by: Chris Mi <cmi@nvidia.com> Reviewed-by: Oz Shlomo <ozsh@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/esw/vporttbl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/vporttbl.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/vporttbl.c
index abba1b801048..9e72118f2e4c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/vporttbl.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/vporttbl.c
@@ -28,7 +28,10 @@ esw_vport_tbl_create(struct mlx5_eswitch *esw, struct mlx5_flow_namespace *ns,
struct mlx5_flow_table_attr ft_attr = {};
struct mlx5_flow_table *fdb;
- ft_attr.autogroup.max_num_groups = vport_ns->max_num_groups;
+ if (vport_ns->max_num_groups)
+ ft_attr.autogroup.max_num_groups = vport_ns->max_num_groups;
+ else
+ ft_attr.autogroup.max_num_groups = esw->params.large_group_num;
ft_attr.max_fte = vport_ns->max_fte;
ft_attr.prio = FDB_PER_VPORT;
ft_attr.flags = vport_ns->flags;