Commit 25c904b5 authored by Alaa Hleihel's avatar Alaa Hleihel Committed by Saeed Mahameed

net/mlx5: E-Switch, fix changing vf VLANID

Adding vf VLANID for the first time, or after having cleared previously
defined VLANID works fine, however, attempting to change an existing vf
VLANID clears the rules on the firmware, but does not add new rules for
the new vf VLANID.

Fix this by changing the logic in function esw_acl_egress_lgcy_setup()
so that it will always configure egress rules.

Fixes: ea651a86 ("net/mlx5: E-Switch, Refactor eswitch egress acl codes")
Signed-off-by: default avatarAlaa Hleihel <alaa@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent b544011f
...@@ -95,22 +95,21 @@ int esw_acl_egress_lgcy_setup(struct mlx5_eswitch *esw, ...@@ -95,22 +95,21 @@ int esw_acl_egress_lgcy_setup(struct mlx5_eswitch *esw,
return 0; return 0;
} }
if (!IS_ERR_OR_NULL(vport->egress.acl)) if (!vport->egress.acl) {
return 0; vport->egress.acl = esw_acl_table_create(esw, vport->vport,
MLX5_FLOW_NAMESPACE_ESW_EGRESS,
vport->egress.acl = esw_acl_table_create(esw, vport->vport, table_size);
MLX5_FLOW_NAMESPACE_ESW_EGRESS, if (IS_ERR(vport->egress.acl)) {
table_size); err = PTR_ERR(vport->egress.acl);
if (IS_ERR(vport->egress.acl)) { vport->egress.acl = NULL;
err = PTR_ERR(vport->egress.acl); goto out;
vport->egress.acl = NULL; }
goto out;
err = esw_acl_egress_lgcy_groups_create(esw, vport);
if (err)
goto out;
} }
err = esw_acl_egress_lgcy_groups_create(esw, vport);
if (err)
goto out;
esw_debug(esw->dev, esw_debug(esw->dev,
"vport[%d] configure egress rules, vlan(%d) qos(%d)\n", "vport[%d] configure egress rules, vlan(%d) qos(%d)\n",
vport->vport, vport->info.vlan, vport->info.qos); vport->vport, vport->info.vlan, vport->info.qos);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment