diff mbox

[v2,1/2] rdma: Allow demand loading of NETLINK_RDMA

Message ID 1502744259-16966-2-git-send-email-jgunthorpe@obsidianresearch.com (mailing list archive)
State Accepted
Headers show

Commit Message

Jason Gunthorpe Aug. 14, 2017, 8:57 p.m. UTC
Provide a module alias so that if userspace opens a netlink
socket for RDMA the kernel support is loaded automatically.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
---
 drivers/infiniband/core/netlink.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Leon Romanovsky Aug. 15, 2017, 9:20 a.m. UTC | #1
On Mon, Aug 14, 2017 at 02:57:38PM -0600, Jason Gunthorpe wrote:
> Provide a module alias so that if userspace opens a netlink
> socket for RDMA the kernel support is loaded automatically.
>
> Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> ---
>  drivers/infiniband/core/netlink.c | 3 +++
>  1 file changed, 3 insertions(+)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
diff mbox

Patch

diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
index 27352a35277011..f782697cf4d819 100644
--- a/drivers/infiniband/core/netlink.c
+++ b/drivers/infiniband/core/netlink.c
@@ -38,6 +38,7 @@ 
 #include <net/net_namespace.h>
 #include <net/sock.h>
 #include <rdma/rdma_netlink.h>
+#include <linux/module.h>
 #include "core_priv.h"
 
 #include "core_priv.h"
@@ -290,3 +291,5 @@  void rdma_nl_exit(void)
 
 	netlink_kernel_release(nls);
 }
+
+MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_RDMA);