aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma/ib_verbs.h
diff options
context:
space:
mode:
authorKamal Heib <kamalheib1@gmail.com>2019-04-29 14:59:06 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-05-03 10:56:56 -0300
commitdd05cb828d0ebecd3d772075fccb85ec3618bedf (patch)
treef209a5fe272c5c41638b3ea7bb024193dea441d5 /include/rdma/ib_verbs.h
parentRDMA/core: Do not invoke init_port on compat devices (diff)
downloadlinux-dev-dd05cb828d0ebecd3d772075fccb85ec3618bedf.tar.xz
linux-dev-dd05cb828d0ebecd3d772075fccb85ec3618bedf.zip
RDMA: Get rid of iw_cm_verbs
Integrate iw_cm_verbs data members into ib_device_ops and ib_device structs, this is done to achieve the following: 1) Avoid memory related bugs durring error unwind 2) Make the code more cleaner 3) Reduce code duplication Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to '')
-rw-r--r--include/rdma/ib_verbs.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index de8724e5a727..4312899231ca 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -2221,8 +2221,6 @@ struct ib_cache {
struct ib_event_handler event_handler;
};
-struct iw_cm_verbs;
-
struct ib_port_immutable {
int pkey_tbl_len;
int gid_tbl_len;
@@ -2304,6 +2302,8 @@ struct ib_counters_read_attr {
};
struct uverbs_attr_bundle;
+struct iw_cm_id;
+struct iw_cm_conn_param;
#define INIT_RDMA_OBJ_SIZE(ib_struct, drv_struct, member) \
.size_##ib_struct = \
@@ -2581,6 +2581,19 @@ struct ib_device_ops {
*/
void (*dealloc_driver)(struct ib_device *dev);
+ /* iWarp CM callbacks */
+ void (*iw_add_ref)(struct ib_qp *qp);
+ void (*iw_rem_ref)(struct ib_qp *qp);
+ struct ib_qp *(*iw_get_qp)(struct ib_device *device, int qpn);
+ int (*iw_connect)(struct iw_cm_id *cm_id,
+ struct iw_cm_conn_param *conn_param);
+ int (*iw_accept)(struct iw_cm_id *cm_id,
+ struct iw_cm_conn_param *conn_param);
+ int (*iw_reject)(struct iw_cm_id *cm_id, const void *pdata,
+ u8 pdata_len);
+ int (*iw_create_listen)(struct iw_cm_id *cm_id, int backlog);
+ int (*iw_destroy_listen)(struct iw_cm_id *cm_id);
+
DECLARE_RDMA_OBJ_SIZE(ib_ah);
DECLARE_RDMA_OBJ_SIZE(ib_pd);
DECLARE_RDMA_OBJ_SIZE(ib_srq);
@@ -2621,8 +2634,6 @@ struct ib_device {
int num_comp_vectors;
- struct iw_cm_verbs *iwcm;
-
struct module *owner;
union {
struct device dev;
@@ -2675,6 +2686,10 @@ struct ib_device {
struct mutex compat_devs_mutex;
/* Maintains compat devices for each net namespace */
struct xarray compat_devs;
+
+ /* Used by iWarp CM */
+ char iw_ifname[IFNAMSIZ];
+ u32 iw_driver_flags;
};
struct ib_client {