We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d0314b commit 350a632Copy full SHA for 350a632
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -1887,8 +1887,6 @@ int __mlx5_eswitch_set_vport_vlan(struct mlx5_eswitch *esw,
1887
struct mlx5_vport *evport = mlx5_eswitch_get_vport(esw, vport);
1888
int err = 0;
1889
1890
- if (!ESW_ALLOWED(esw))
1891
- return -EPERM;
1892
if (IS_ERR(evport))
1893
return PTR_ERR(evport);
1894
if (vlan > 4095 || qos > 7)
@@ -1916,6 +1914,9 @@ int mlx5_eswitch_set_vport_vlan(struct mlx5_eswitch *esw,
1916
1914
u8 set_flags = 0;
1917
1915
int err;
1918
+ if (!ESW_ALLOWED(esw))
+ return -EPERM;
1919
+
1920
if (vlan || qos)
1921
set_flags = SET_VLAN_STRIP | SET_VLAN_INSERT;
1922
0 commit comments