summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/qedr/qedr.h
diff options
context:
space:
mode:
authorKalderon, Michal <Michal.Kalderon@cavium.com>2017-07-26 14:41:56 +0300
committerDoug Ledford <dledford@redhat.com>2017-08-18 19:27:14 +0300
commite411e0587e0ddb6dae69944fac72f5d15ca89507 (patch)
tree5af71abee392ce7c71327b8da5d83b841689cb1a /drivers/infiniband/hw/qedr/qedr.h
parentde0089e692a92ce5180eec6a79f1f79153e3c669 (diff)
downloadlinux-e411e0587e0ddb6dae69944fac72f5d15ca89507.tar.xz
RDMA/qedr: Add iWARP connection management functions
Implements the iWARP connection management functions: connect, accept, create listener and destroy listener Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com> Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com> Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/qedr/qedr.h')
-rw-r--r--drivers/infiniband/hw/qedr/qedr.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qedr/qedr.h b/drivers/infiniband/hw/qedr/qedr.h
index 5dd82d1651be..06cb96d86332 100644
--- a/drivers/infiniband/hw/qedr/qedr.h
+++ b/drivers/infiniband/hw/qedr/qedr.h
@@ -60,6 +60,7 @@
#define QEDR_MSG_SQ " SQ"
#define QEDR_MSG_QP " QP"
#define QEDR_MSG_GSI " GSI"
+#define QEDR_MSG_IWARP " IW"
#define QEDR_CQ_MAGIC_NUMBER (0x11223344)
@@ -167,6 +168,9 @@ struct qedr_dev {
enum qed_rdma_type rdma_type;
spinlock_t idr_lock; /* Protect qpidr data-structure */
struct idr qpidr;
+ struct workqueue_struct *iwarp_wq;
+ u16 iwarp_max_mtu;
+
unsigned long enet_state;
};
@@ -344,7 +348,7 @@ enum qedr_qp_err_bitmap {
struct qedr_qp {
struct ib_qp ibqp; /* must be first */
struct qedr_dev *dev;
-
+ struct qedr_iw_ep *ep;
struct qedr_qp_hwq_info sq;
struct qedr_qp_hwq_info rq;
@@ -402,6 +406,7 @@ struct qedr_qp {
struct qedr_userq usq;
struct qedr_userq urq;
atomic_t refcnt;
+ bool destroyed;
};
struct qedr_ah {
@@ -482,6 +487,21 @@ static inline int qedr_get_dmac(struct qedr_dev *dev,
return 0;
}
+struct qedr_iw_listener {
+ struct qedr_dev *dev;
+ struct iw_cm_id *cm_id;
+ int backlog;
+ void *qed_handle;
+};
+
+struct qedr_iw_ep {
+ struct qedr_dev *dev;
+ struct iw_cm_id *cm_id;
+ struct qedr_qp *qp;
+ void *qed_context;
+ u8 during_connect;
+};
+
static inline
struct qedr_ucontext *get_qedr_ucontext(struct ib_ucontext *ibucontext)
{