33 #include <linux/kernel.h>
36 #include <linux/netdevice.h>
38 #include <linux/if_arp.h>
40 #include <linux/slab.h>
41 #include <linux/module.h>
74 rdsdebug(
"Query device failed for %s\n", device->
name);
88 rds_iwdev->
dev = device;
90 if (IS_ERR(rds_iwdev->
pd))
98 if (IS_ERR(rds_iwdev->
mr))
104 if (IS_ERR(rds_iwdev->
mr_pool)) {
128 static void rds_iw_remove_one(
struct ib_device *device)
137 spin_lock_irq(&rds_iwdev->
spinlock);
142 spin_unlock_irq(&rds_iwdev->
spinlock);
144 rds_iw_destroy_conns(rds_iwdev);
153 rdsdebug(
"Failed to dealloc pd %p\n", rds_iwdev->
pd);
163 .add = rds_iw_add_one,
164 .remove = rds_iw_remove_one
187 dev_addr = &ic->
i_cm_id->route.addr.dev_addr;
189 rdma_addr_get_sgid(dev_addr, (
union ib_gid *) &iinfo->
src_gid);
190 rdma_addr_get_dgid(dev_addr, (
union ib_gid *) &iinfo->
dst_gid);
201 static void rds_iw_ic_info(
struct socket *
sock,
unsigned int len,
206 rds_iw_conn_info_visitor,
232 return PTR_ERR(cm_id);
234 memset(&sin, 0,
sizeof(sin));
236 sin.sin_addr.s_addr =
addr;
245 rdsdebug(
"addr %pI4 ret %d node type %d\n",
247 cm_id->device ? cm_id->device->node_type : -1);
257 rds_iw_destroy_nodev_conns();
265 .laddr_check = rds_iw_laddr_check,
288 .t_prefer_loopback = 1,