Skip to content

Commit 9558580

Browse files
Eli BritsteinSaeed Mahameed
authored andcommitted
net/mlx5e: Fix number of vports for ingress ACL configuration
With the cited commit, ACLs are configured for the VF ports. The loop for the number of ports had the wrong number. Fix it. Fixes: 1848673 ("net/mlx5e: ACLs for priority tag mode") Signed-off-by: Eli Britstein <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 8f0916c commit 9558580

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,21 +1732,22 @@ static void esw_prio_tag_acls_cleanup(struct mlx5_eswitch *esw)
17321732
struct mlx5_vport *vport;
17331733
int i;
17341734

1735-
mlx5_esw_for_each_vf_vport(esw, i, vport, esw->nvports) {
1735+
mlx5_esw_for_each_vf_vport(esw, i, vport, esw->dev->priv.sriov.num_vfs) {
17361736
esw_vport_disable_egress_acl(esw, vport);
17371737
esw_vport_disable_ingress_acl(esw, vport);
17381738
}
17391739
}
17401740

1741-
static int esw_offloads_steering_init(struct mlx5_eswitch *esw, int nvports)
1741+
static int esw_offloads_steering_init(struct mlx5_eswitch *esw, int vf_nvports,
1742+
int nvports)
17421743
{
17431744
int err;
17441745

17451746
memset(&esw->fdb_table.offloads, 0, sizeof(struct offloads_fdb));
17461747
mutex_init(&esw->fdb_table.offloads.fdb_prio_lock);
17471748

17481749
if (MLX5_CAP_GEN(esw->dev, prio_tag_required)) {
1749-
err = esw_prio_tag_acls_config(esw, nvports);
1750+
err = esw_prio_tag_acls_config(esw, vf_nvports);
17501751
if (err)
17511752
return err;
17521753
}
@@ -1839,7 +1840,7 @@ int esw_offloads_init(struct mlx5_eswitch *esw, int vf_nvports,
18391840
{
18401841
int err;
18411842

1842-
err = esw_offloads_steering_init(esw, total_nvports);
1843+
err = esw_offloads_steering_init(esw, vf_nvports, total_nvports);
18431844
if (err)
18441845
return err;
18451846

0 commit comments

Comments
 (0)