summaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorDennis Dalessandro <dennis.dalessandro@intel.com>2016-01-22 12:50:17 -0800
committerDoug Ledford <dledford@redhat.com>2016-03-10 20:37:19 -0500
commit515667f8f8b48bdbcad61c5681291cb970e36ac3 (patch)
tree5a142df129505a787c1af7c6b6531988918eabf4 /include/rdma
parent050eb7fbe0ff2bcd95833ff180337116d5907483 (diff)
downloadop-kernel-dev-515667f8f8b48bdbcad61c5681291cb970e36ac3.zip
op-kernel-dev-515667f8f8b48bdbcad61c5681291cb970e36ac3.tar.gz
IB/rdmavt: Add create queue pair functionality
Add create queue pair verbs call as well as supporting functions. Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Harish Chegondi <harish.chegondi@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/rdma_vt.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h
index 3a78f20..3bdeac7 100644
--- a/include/rdma/rdma_vt.h
+++ b/include/rdma/rdma_vt.h
@@ -222,7 +222,10 @@ struct rvt_driver_provided {
int (*port_callback)(struct ib_device *, u8, struct kobject *);
const char * (*get_card_name)(struct rvt_dev_info *rdi);
struct pci_dev * (*get_pci_dev)(struct rvt_dev_info *rdi);
- void (*free_all_qps)(struct rvt_dev_info *rdi);
+ unsigned (*free_all_qps)(struct rvt_dev_info *rdi);
+ void * (*qp_priv_alloc)(struct rvt_dev_info *rdi, struct rvt_qp *qp);
+ void (*qp_priv_free)(struct rvt_dev_info *rdi, struct rvt_qp *qp);
+ void (*notify_qp_reset)(struct rvt_qp *qp);
/*--------------------*/
/* Optional functions */
@@ -230,6 +233,8 @@ struct rvt_driver_provided {
int (*check_ah)(struct ib_device *, struct ib_ah_attr *);
void (*notify_new_ah)(struct ib_device *, struct ib_ah_attr *,
struct rvt_ah *);
+ int (*alloc_qpn)(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt,
+ enum ib_qp_type type, u8 port);
};
struct rvt_dev_info {
@@ -262,7 +267,10 @@ struct rvt_dev_info {
int flags;
struct rvt_ibport **ports;
+ /* QP */
struct rvt_qp_ibdev *qp_dev;
+ u32 n_qps_allocated; /* number of QPs allocated for device */
+ spinlock_t n_qps_lock; /* keep track of number of qps */
/* memory maps */
struct list_head pending_mmaps;
OpenPOWER on IntegriCloud