From bc10ed7d3d19ff61427007b4d7bf98d3e57bb333 Mon Sep 17 00:00:00 2001 From: Kaike Wan Date: Fri, 14 Aug 2015 08:52:07 -0400 Subject: IB/core: Add rdma netlink helper functions This patch adds a function to check if listeners for a netlink multicast group are present. It also adds a function to receive netlink response messages. Signed-off-by: Kaike Wan Signed-off-by: John Fleck Signed-off-by: Ira Weiny Signed-off-by: Doug Ledford --- include/rdma/rdma_netlink.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/rdma/rdma_netlink.h') diff --git a/include/rdma/rdma_netlink.h b/include/rdma/rdma_netlink.h index 0790882e0c9b..585266144329 100644 --- a/include/rdma/rdma_netlink.h +++ b/include/rdma/rdma_netlink.h @@ -77,4 +77,11 @@ int ibnl_unicast(struct sk_buff *skb, struct nlmsghdr *nlh, int ibnl_multicast(struct sk_buff *skb, struct nlmsghdr *nlh, unsigned int group, gfp_t flags); +/** + * Check if there are any listeners to the netlink group + * @group: the netlink group ID + * Returns 0 on success or a negative for no listeners. + */ +int ibnl_chk_listeners(unsigned int group); + #endif /* _RDMA_NETLINK_H */ -- cgit v1.2.3