aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2017-06-12 16:00:19 +0300
committerLeon Romanovsky <leon@kernel.org>2017-08-10 13:18:45 +0300
commite3a2b93dddad315f01a4b67faee738954c084072 (patch)
tree6194df37cb3f0e4eda9fbff7e0c7bd4c39733125 /include
parent5d7ee40907507e8439044f415f3e1de216a26dea (diff)
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')
-rw-r--r--include/rdma/rdma_netlink.h6
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,
};
/**

Privacy Policy