diff options
author | Roland Dreier <roland@purestorage.com> | 2011-05-20 11:46:11 -0700 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2011-05-20 11:46:11 -0700 |
commit | b2cbae2c248776d81cc265ff7d48405b6a4cc463 (patch) | |
tree | fbd4f4e0812fbcc991670c81967e90bfdd9f80c0 /drivers/infiniband/core/device.c | |
parent | fd75c789abf7948e16fe50917a6acb809927719a (diff) | |
download | lwn-b2cbae2c248776d81cc265ff7d48405b6a4cc463.tar.gz lwn-b2cbae2c248776d81cc265ff7d48405b6a4cc463.zip |
RDMA: Add netlink infrastructure
Add basic RDMA netlink infrastructure that allows for registration of
RDMA clients for which data is to be exported and supplies message
construction callbacks.
Signed-off-by: Nir Muchtar <nirm@voltaire.com>
[ Reorganize a few things, add CONFIG_NET dependency. - Roland ]
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/core/device.c')
-rw-r--r-- | drivers/infiniband/core/device.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index 46a7a3febc12..4007f721d25d 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -38,6 +38,7 @@ #include <linux/slab.h> #include <linux/init.h> #include <linux/mutex.h> +#include <rdma/rdma_netlink.h> #include "core_priv.h" @@ -730,14 +731,23 @@ static int __init ib_core_init(void) goto err; } + ret = ibnl_init(); + if (ret) { + printk(KERN_WARNING "Couldn't init IB netlink interface\n"); + goto err_sysfs; + } + ret = ib_cache_setup(); if (ret) { printk(KERN_WARNING "Couldn't set up InfiniBand P_Key/GID cache\n"); - goto err_sysfs; + goto err_nl; } return 0; +err_nl: + ibnl_cleanup(); + err_sysfs: ib_sysfs_cleanup(); @@ -749,6 +759,7 @@ err: static void __exit ib_core_cleanup(void) { ib_cache_cleanup(); + ibnl_cleanup(); ib_sysfs_cleanup(); /* Make sure that any pending umem accounting work is done. */ destroy_workqueue(ib_wq); |