diff options
author | Yuval Bason <yuval.bason@cavium.com> | 2018-08-09 17:29:36 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-08-14 16:31:54 -0600 |
commit | 1212767e23bbaba164cc7ea3a64115b3ae335063 (patch) | |
tree | d526b210df07807a76ea5329f8c811e742b7f5b2 /drivers/infiniband/hw/qedr/qedr.h | |
parent | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 (diff) | |
download | op-kernel-dev-1212767e23bbaba164cc7ea3a64115b3ae335063.zip op-kernel-dev-1212767e23bbaba164cc7ea3a64115b3ae335063.tar.gz |
qedr: Add wrapping generic structure for qpidr and adjust idr routines.
Today, we are using idr mechanism for QP's only.
This patch prepares the qedr_idr stuctures and the idr routines for
both QP's and SRQ's.
Signed-off-by: Yuval Bason <yuval.bason@cavium.com>
Signed-off-by: Michal Kalderon <michal.kalderon@cavium.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/qedr/qedr.h')
-rw-r--r-- | drivers/infiniband/hw/qedr/qedr.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/qedr/qedr.h b/drivers/infiniband/hw/qedr/qedr.h index 86d4511..5d0b75e 100644 --- a/drivers/infiniband/hw/qedr/qedr.h +++ b/drivers/infiniband/hw/qedr/qedr.h @@ -122,6 +122,11 @@ struct qedr_device_attr { #define QEDR_ENET_STATE_BIT (0) +struct qedr_idr { + spinlock_t idr_lock; /* Protect idr data-structure */ + struct idr idr; +}; + struct qedr_dev { struct ib_device ibdev; struct qed_dev *cdev; @@ -165,8 +170,7 @@ struct qedr_dev { struct qedr_cq *gsi_rqcq; struct qedr_qp *gsi_qp; enum qed_rdma_type rdma_type; - spinlock_t idr_lock; /* Protect qpidr data-structure */ - struct idr qpidr; + struct qedr_idr qpidr; struct workqueue_struct *iwarp_wq; u16 iwarp_max_mtu; |