diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2017-01-18 07:59:51 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-02-14 10:21:01 -0500 |
commit | 1ffd3a26f890222e49c4f4782763e2063026b611 (patch) | |
tree | b96e14c333a07fc56d7477f0d0af6d889e1b28cf | |
parent | 2ac693f9953a2787f942abcbea5d1dc22a310932 (diff) |
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: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/hw/mlx5/main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 2e85f73c3235..0c12c1d6735d 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c | |||
@@ -1704,7 +1704,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v, | |||
1704 | switch (ib_spec->type & ~IB_FLOW_SPEC_INNER) { | 1704 | switch (ib_spec->type & ~IB_FLOW_SPEC_INNER) { |
1705 | case IB_FLOW_SPEC_ETH: | 1705 | case IB_FLOW_SPEC_ETH: |
1706 | if (FIELDS_NOT_SUPPORTED(ib_spec->eth.mask, LAST_ETH_FIELD)) | 1706 | if (FIELDS_NOT_SUPPORTED(ib_spec->eth.mask, LAST_ETH_FIELD)) |
1707 | return -ENOTSUPP; | 1707 | return -EOPNOTSUPP; |
1708 | 1708 | ||
1709 | ether_addr_copy(MLX5_ADDR_OF(fte_match_set_lyr_2_4, headers_c, | 1709 | ether_addr_copy(MLX5_ADDR_OF(fte_match_set_lyr_2_4, headers_c, |
1710 | dmac_47_16), | 1710 | dmac_47_16), |
@@ -1752,7 +1752,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v, | |||
1752 | break; | 1752 | break; |
1753 | case IB_FLOW_SPEC_IPV4: | 1753 | case IB_FLOW_SPEC_IPV4: |
1754 | if (FIELDS_NOT_SUPPORTED(ib_spec->ipv4.mask, LAST_IPV4_FIELD)) | 1754 | if (FIELDS_NOT_SUPPORTED(ib_spec->ipv4.mask, LAST_IPV4_FIELD)) |
1755 | return -ENOTSUPP; | 1755 | return -EOPNOTSUPP; |
1756 | 1756 | ||
1757 | MLX5_SET(fte_match_set_lyr_2_4, headers_c, | 1757 | MLX5_SET(fte_match_set_lyr_2_4, headers_c, |
1758 | ethertype, 0xffff); | 1758 | ethertype, 0xffff); |
@@ -1784,7 +1784,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v, | |||
1784 | break; | 1784 | break; |
1785 | case IB_FLOW_SPEC_IPV6: | 1785 | case IB_FLOW_SPEC_IPV6: |
1786 | if (FIELDS_NOT_SUPPORTED(ib_spec->ipv6.mask, LAST_IPV6_FIELD)) | 1786 | if (FIELDS_NOT_SUPPORTED(ib_spec->ipv6.mask, LAST_IPV6_FIELD)) |
1787 | return -ENOTSUPP; | 1787 | return -EOPNOTSUPP; |
1788 | 1788 | ||
1789 | MLX5_SET(fte_match_set_lyr_2_4, headers_c, | 1789 | MLX5_SET(fte_match_set_lyr_2_4, headers_c, |
1790 | ethertype, 0xffff); | 1790 | ethertype, 0xffff); |
@@ -1825,7 +1825,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v, | |||
1825 | case IB_FLOW_SPEC_TCP: | 1825 | case IB_FLOW_SPEC_TCP: |
1826 | if (FIELDS_NOT_SUPPORTED(ib_spec->tcp_udp.mask, | 1826 | if (FIELDS_NOT_SUPPORTED(ib_spec->tcp_udp.mask, |
1827 | LAST_TCP_UDP_FIELD)) | 1827 | LAST_TCP_UDP_FIELD)) |
1828 | return -ENOTSUPP; | 1828 | return -EOPNOTSUPP; |
1829 | 1829 | ||
1830 | MLX5_SET(fte_match_set_lyr_2_4, headers_c, ip_protocol, | 1830 | MLX5_SET(fte_match_set_lyr_2_4, headers_c, ip_protocol, |
1831 | 0xff); | 1831 | 0xff); |
@@ -1845,7 +1845,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v, | |||
1845 | case IB_FLOW_SPEC_UDP: | 1845 | case IB_FLOW_SPEC_UDP: |
1846 | if (FIELDS_NOT_SUPPORTED(ib_spec->tcp_udp.mask, | 1846 | if (FIELDS_NOT_SUPPORTED(ib_spec->tcp_udp.mask, |
1847 | LAST_TCP_UDP_FIELD)) | 1847 | LAST_TCP_UDP_FIELD)) |
1848 | return -ENOTSUPP; | 1848 | return -EOPNOTSUPP; |
1849 | 1849 | ||
1850 | MLX5_SET(fte_match_set_lyr_2_4, headers_c, ip_protocol, | 1850 | MLX5_SET(fte_match_set_lyr_2_4, headers_c, ip_protocol, |
1851 | 0xff); | 1851 | 0xff); |
@@ -1865,7 +1865,7 @@ static int parse_flow_attr(u32 *match_c, u32 *match_v, | |||
1865 | case IB_FLOW_SPEC_VXLAN_TUNNEL: | 1865 | case IB_FLOW_SPEC_VXLAN_TUNNEL: |
1866 | if (FIELDS_NOT_SUPPORTED(ib_spec->tunnel.mask, | 1866 | if (FIELDS_NOT_SUPPORTED(ib_spec->tunnel.mask, |
1867 | LAST_TUNNEL_FIELD)) | 1867 | LAST_TUNNEL_FIELD)) |
1868 | return -ENOTSUPP; | 1868 | return -EOPNOTSUPP; |
1869 | 1869 | ||
1870 | MLX5_SET(fte_match_set_misc, misc_params_c, vxlan_vni, | 1870 | MLX5_SET(fte_match_set_misc, misc_params_c, vxlan_vni, |
1871 | ntohl(ib_spec->tunnel.mask.tunnel_id)); | 1871 | ntohl(ib_spec->tunnel.mask.tunnel_id)); |