diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2017-06-12 15:00:19 +0200 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2017-08-10 12:18:45 +0200 |
commit | e3a2b93dddad315f01a4b67faee738954c084072 (patch) | |
tree | 6194df37cb3f0e4eda9fbff7e0c7bd4c39733125 /include/rdma | |
parent | RDMA/iwcm: Remove extra EXPORT_SYMBOLS (diff) | |
download | linux-e3a2b93dddad315f01a4b67faee738954c084072.tar.xz linux-e3a2b93dddad315f01a4b67faee738954c084072.zip |
RDMA/netlink: Add flag to consolidate common handling
Add ability to provide flags to control RDMA netlink callbacks
and convert addr.c and sa_query.c to be first users of such
infrastructure. It allows to move their CAP_NET_ADMIN checks
into netlink core.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/rdma_netlink.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/rdma/rdma_netlink.h b/include/rdma/rdma_netlink.h index c124d8e43fc8..6ea36ec45401 100644 --- a/include/rdma/rdma_netlink.h +++ b/include/rdma/rdma_netlink.h @@ -7,6 +7,12 @@ struct ibnl_client_cbs { int (*dump)(struct sk_buff *skb, struct netlink_callback *nlcb); + u8 flags; +}; + +enum rdma_nl_flags { + /* Require CAP_NET_ADMIN */ + RDMA_NL_ADMIN_PERM = 1 << 0, }; /** |