Skip to content

Commit 4575ab3

Browse files
roidayanSaeed Mahameed
authored andcommitted
net/mlx5e: E-Switch, Pass other_vport flag if vport is not 0
When creating flow table for shared fdb resources, there is only need to pass other_vport flag if vport is not 0 or if the port is ECPF in BlueField. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Shay Drory <shayd@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent 70c3643 commit 4575ab3

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2551,13 +2551,13 @@ static int __esw_set_master_egress_rule(struct mlx5_core_dev *master,
25512551
return err;
25522552
}
25532553

2554-
static int esw_master_egress_create_resources(struct mlx5_flow_namespace *egress_ns,
2554+
static int esw_master_egress_create_resources(struct mlx5_eswitch *esw,
2555+
struct mlx5_flow_namespace *egress_ns,
25552556
struct mlx5_vport *vport, size_t count)
25562557
{
25572558
int inlen = MLX5_ST_SZ_BYTES(create_flow_group_in);
25582559
struct mlx5_flow_table_attr ft_attr = {
25592560
.max_fte = count, .prio = 0, .level = 0,
2560-
.flags = MLX5_FLOW_TABLE_OTHER_VPORT,
25612561
};
25622562
struct mlx5_flow_table *acl;
25632563
struct mlx5_flow_group *g;
@@ -2572,6 +2572,9 @@ static int esw_master_egress_create_resources(struct mlx5_flow_namespace *egress
25722572
if (!flow_group_in)
25732573
return -ENOMEM;
25742574

2575+
if (vport->vport || mlx5_core_is_ecpf(esw->dev))
2576+
ft_attr.flags = MLX5_FLOW_TABLE_OTHER_VPORT;
2577+
25752578
acl = mlx5_create_vport_flow_table(egress_ns, &ft_attr, vport->vport);
25762579
if (IS_ERR(acl)) {
25772580
err = PTR_ERR(acl);
@@ -2642,7 +2645,7 @@ static int esw_set_master_egress_rule(struct mlx5_core_dev *master,
26422645
if (vport->egress.acl && vport->egress.type != VPORT_EGRESS_ACL_TYPE_SHARED_FDB)
26432646
return 0;
26442647

2645-
err = esw_master_egress_create_resources(egress_ns, vport, count);
2648+
err = esw_master_egress_create_resources(esw, egress_ns, vport, count);
26462649
if (err)
26472650
return err;
26482651

0 commit comments

Comments
 (0)