diff options
author | Matan Barak <matanb@mellanox.com> | 2018-03-28 09:27:44 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-04-04 21:06:24 +0300 |
commit | 766d8551ada05326f0cafc5fc0bd32a666cebeed (patch) | |
tree | 34173f611ad7a8c9660ccfad3c87e6a07d1bdadd /drivers/infiniband/core/uverbs.h | |
parent | 8510020d2916b9f7d8e406aa2fb2d35fbe692f4d (diff) | |
download | linux-766d8551ada05326f0cafc5fc0bd32a666cebeed.tar.xz |
IB/uverbs: Refactor kern_spec_to_ib_spec_filter
The current implementation of kern_spec_to_ib_spec_filter, which takes
a uAPI based flow steering specification and creates the respective kernel
API flow steering structure, gets a ib_uverbs_flow_spec structure.
The new flow_action uAPI gets a match mask and filter from user-space
which aren't encoded in the flow steering's ib_uverbs_flow_spec structure.
Exporting the logic out of kern_spec_to_ib_spec_filter to get user-space
blobs rather than ib_uverbs_flow_spec structure.
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs.h')
-rw-r--r-- | drivers/infiniband/core/uverbs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs.h b/drivers/infiniband/core/uverbs.h index d20828afa05c..0fabedf446fb 100644 --- a/drivers/infiniband/core/uverbs.h +++ b/drivers/infiniband/core/uverbs.h @@ -254,6 +254,12 @@ struct ib_uverbs_flow_spec { }; }; +int ib_uverbs_kern_spec_to_ib_spec_filter(enum ib_flow_spec_type type, + const void *kern_spec_mask, + const void *kern_spec_val, + size_t kern_filter_sz, + union ib_flow_spec *ib_spec); + extern const struct uverbs_object_def UVERBS_OBJECT(UVERBS_OBJECT_DEVICE); extern const struct uverbs_object_def UVERBS_OBJECT(UVERBS_OBJECT_PD); extern const struct uverbs_object_def UVERBS_OBJECT(UVERBS_OBJECT_MR); |