path: root/include
diff options
authorLeon Romanovsky <leonro@mellanox.com>2017-06-05 10:20:11 +0300
committerLeon Romanovsky <leon@kernel.org>2017-08-10 13:13:06 +0300
commitc9901724a2f14128ef6a57986babcbfbcf61a257 (patch)
treea7312ed62f5dee155077aeb4abaa33e055fd643a /include
parent9047811b776ce09ba06623dd2a846cc501f0065b (diff)
RDMA/netlink: Remove netlink clients infrastructure
RDMA netlink has a complicated infrastructure for dynamically registering and de-registering netlink clients to the NETLINK_RDMA group. The complicated portion of this code is not widely used because 2 of the 3 current clients are statically compiled together with netlink.c. The infrastructure, therefore, is deemed overkill. Refactor the code to eliminate the dynamically added clients. Now all clients are pre-registered in a client array at compile time, and at run time they merely check-in with the infrastructure to pass their callback table for inclusion in the pre-sized client array. This also allows for future cleanups and removal of unneeded code in the iwcm* netlink handler. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Chien Tin Tung <chien.tin.tung@intel.com>
Diffstat (limited to 'include')
1 files changed, 4 insertions, 9 deletions
diff --git a/include/rdma/rdma_netlink.h b/include/rdma/rdma_netlink.h
index 5b1466770917..aadf0ab963b2 100644
--- a/include/rdma/rdma_netlink.h
+++ b/include/rdma/rdma_netlink.h
@@ -11,23 +11,18 @@ struct ibnl_client_cbs {
- * Add a a client to the list of IB netlink exporters.
+ * Register client in RDMA netlink.
* @index: Index of the added client
- * @nops: Number of supported ops by the added client.
* @cb_table: A table for op->callback
- *
- * Returns 0 on success or a negative error code.
-int ibnl_add_client(int index, int nops,
- const struct ibnl_client_cbs cb_table[]);
+void rdma_nl_register(unsigned int index,
+ const struct ibnl_client_cbs cb_table[]);
* Remove a client from IB netlink.
* @index: Index of the removed IB client.
- *
- * Returns 0 on success or a negative error code.
-int ibnl_remove_client(int index);
+void rdma_nl_unregister(unsigned int index);
* Put a new message in a supplied skb.

Privacy Policy