diff options
author | Maor Gottlieb <maorg@mellanox.com> | 2016-08-30 09:58:34 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-10-07 16:54:18 -0400 |
commit | a72c6a2b0e699fcbcf679b881d5af2683228ae98 (patch) | |
tree | 2d14d7d2bed9a36805b362406ed959ddfd6c08d1 /drivers/infiniband/core | |
parent | 989a3a8f91ba02f71b84ecde3b948388d8bf2200 (diff) |
IB/core: Add more fields to IPv6 flow specification
Add the following fields to IPv6 flow filter specification:
1. Traffic Class
2. Flow Label
3. Next Header
4. Hop Limit
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index b9fb256c25fa..cb3f515a2285 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c | |||
@@ -3158,6 +3158,10 @@ static int kern_spec_to_ib_spec(struct ib_uverbs_flow_spec *kern_spec, | |||
3158 | ib_spec->size = sizeof(struct ib_flow_spec_ipv6); | 3158 | ib_spec->size = sizeof(struct ib_flow_spec_ipv6); |
3159 | memcpy(&ib_spec->ipv6.val, kern_spec_val, actual_filter_sz); | 3159 | memcpy(&ib_spec->ipv6.val, kern_spec_val, actual_filter_sz); |
3160 | memcpy(&ib_spec->ipv6.mask, kern_spec_mask, actual_filter_sz); | 3160 | memcpy(&ib_spec->ipv6.mask, kern_spec_mask, actual_filter_sz); |
3161 | |||
3162 | if ((ntohl(ib_spec->ipv6.mask.flow_label)) >= BIT(20) || | ||
3163 | (ntohl(ib_spec->ipv6.val.flow_label)) >= BIT(20)) | ||
3164 | return -EINVAL; | ||
3161 | break; | 3165 | break; |
3162 | case IB_FLOW_SPEC_TCP: | 3166 | case IB_FLOW_SPEC_TCP: |
3163 | case IB_FLOW_SPEC_UDP: | 3167 | case IB_FLOW_SPEC_UDP: |