Skip to content

Commit a683012

Browse files
ummakynesSaeed Mahameed
authored andcommitted
net/mlx5e: replace EINVAL in mlx5e_flower_parse_meta()
The drivers reports EINVAL to userspace through netlink on invalid meta match. This is confusing since EINVAL is usually reserved for malformed netlink messages. Replace it by more meaningful codes. Fixes: 6d65bc6 ("net/mlx5e: Add mlx5e_flower_parse_meta support") Signed-off-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent cb9a064 commit a683012

File tree

1 file changed

+3
-3
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,21 +2068,21 @@ static int mlx5e_flower_parse_meta(struct net_device *filter_dev,
20682068
flow_rule_match_meta(rule, &match);
20692069
if (match.mask->ingress_ifindex != 0xFFFFFFFF) {
20702070
NL_SET_ERR_MSG_MOD(extack, "Unsupported ingress ifindex mask");
2071-
return -EINVAL;
2071+
return -EOPNOTSUPP;
20722072
}
20732073

20742074
ingress_dev = __dev_get_by_index(dev_net(filter_dev),
20752075
match.key->ingress_ifindex);
20762076
if (!ingress_dev) {
20772077
NL_SET_ERR_MSG_MOD(extack,
20782078
"Can't find the ingress port to match on");
2079-
return -EINVAL;
2079+
return -ENOENT;
20802080
}
20812081

20822082
if (ingress_dev != filter_dev) {
20832083
NL_SET_ERR_MSG_MOD(extack,
20842084
"Can't match on the ingress filter port");
2085-
return -EINVAL;
2085+
return -EOPNOTSUPP;
20862086
}
20872087

20882088
return 0;

0 commit comments

Comments
 (0)