Commit 1ffd3a26 authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Doug Ledford

IB/mlx5: Replace ENOTSUPP usage with EOPNOTSUPP

Flow steering is supposed to return EOPNOTSUPP error
for unsupported fields and not ENOTSUPP error.
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 2ac693f9
...@@ -1704,7 +1704,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v, ...@@ -1704,7 +1704,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v,
switch (ib_spec->type & ~IB_FLOW_SPEC_INNER) { switch (ib_spec->type & ~IB_FLOW_SPEC_INNER) {
case IB_FLOW_SPEC_ETH: case IB_FLOW_SPEC_ETH:
if (FIELDS_NOT_SUPPORTED(ib_spec->eth.mask, LAST_ETH_FIELD)) if (FIELDS_NOT_SUPPORTED(ib_spec->eth.mask, LAST_ETH_FIELD))
return -ENOTSUPP; return -EOPNOTSUPP;
ether_addr_copy(MLX5_ADDR_OF(fte_match_set_lyr_2_4, headers_c, ether_addr_copy(MLX5_ADDR_OF(fte_match_set_lyr_2_4, headers_c,
dmac_47_16), dmac_47_16),
...@@ -1752,7 +1752,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v, ...@@ -1752,7 +1752,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v,
break; break;
case IB_FLOW_SPEC_IPV4: case IB_FLOW_SPEC_IPV4:
if (FIELDS_NOT_SUPPORTED(ib_spec->ipv4.mask, LAST_IPV4_FIELD)) if (FIELDS_NOT_SUPPORTED(ib_spec->ipv4.mask, LAST_IPV4_FIELD))
return -ENOTSUPP; return -EOPNOTSUPP;
MLX5_SET(fte_match_set_lyr_2_4, headers_c, MLX5_SET(fte_match_set_lyr_2_4, headers_c,
ethertype, 0xffff); ethertype, 0xffff);
...@@ -1784,7 +1784,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v, ...@@ -1784,7 +1784,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v,
break; break;
case IB_FLOW_SPEC_IPV6: case IB_FLOW_SPEC_IPV6:
if (FIELDS_NOT_SUPPORTED(ib_spec->ipv6.mask, LAST_IPV6_FIELD)) if (FIELDS_NOT_SUPPORTED(ib_spec->ipv6.mask, LAST_IPV6_FIELD))
return -ENOTSUPP; return -EOPNOTSUPP;
MLX5_SET(fte_match_set_lyr_2_4, headers_c, MLX5_SET(fte_match_set_lyr_2_4, headers_c,
ethertype, 0xffff); ethertype, 0xffff);
...@@ -1825,7 +1825,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v, ...@@ -1825,7 +1825,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v,
case IB_FLOW_SPEC_TCP: case IB_FLOW_SPEC_TCP:
if (FIELDS_NOT_SUPPORTED(ib_spec->tcp_udp.mask, if (FIELDS_NOT_SUPPORTED(ib_spec->tcp_udp.mask,
LAST_TCP_UDP_FIELD)) LAST_TCP_UDP_FIELD))
return -ENOTSUPP; return -EOPNOTSUPP;
MLX5_SET(fte_match_set_lyr_2_4, headers_c, ip_protocol, MLX5_SET(fte_match_set_lyr_2_4, headers_c, ip_protocol,
0xff); 0xff);
...@@ -1845,7 +1845,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v, ...@@ -1845,7 +1845,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v,
case IB_FLOW_SPEC_UDP: case IB_FLOW_SPEC_UDP:
if (FIELDS_NOT_SUPPORTED(ib_spec->tcp_udp.mask, if (FIELDS_NOT_SUPPORTED(ib_spec->tcp_udp.mask,
LAST_TCP_UDP_FIELD)) LAST_TCP_UDP_FIELD))
return -ENOTSUPP; return -EOPNOTSUPP;
MLX5_SET(fte_match_set_lyr_2_4, headers_c, ip_protocol, MLX5_SET(fte_match_set_lyr_2_4, headers_c, ip_protocol,
0xff); 0xff);
...@@ -1865,7 +1865,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v, ...@@ -1865,7 +1865,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v,
case IB_FLOW_SPEC_VXLAN_TUNNEL: case IB_FLOW_SPEC_VXLAN_TUNNEL:
if (FIELDS_NOT_SUPPORTED(ib_spec->tunnel.mask, if (FIELDS_NOT_SUPPORTED(ib_spec->tunnel.mask,
LAST_TUNNEL_FIELD)) LAST_TUNNEL_FIELD))
return -ENOTSUPP; return -EOPNOTSUPP;
MLX5_SET(fte_match_set_misc, misc_params_c, vxlan_vni, MLX5_SET(fte_match_set_misc, misc_params_c, vxlan_vni,
ntohl(ib_spec->tunnel.mask.tunnel_id)); ntohl(ib_spec->tunnel.mask.tunnel_id));
......
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