Commit 515667f8 authored by Dennis Dalessandro's avatar Dennis Dalessandro Committed by Doug Ledford

IB/rdmavt: Add create queue pair functionality

Add create queue pair verbs call as well as supporting functions.
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Reviewed-by: default avatarHarish Chegondi <harish.chegondi@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 050eb7fb
This diff is collapsed.
...@@ -362,6 +362,7 @@ void rvt_unregister_device(struct rvt_dev_info *rdi) ...@@ -362,6 +362,7 @@ void rvt_unregister_device(struct rvt_dev_info *rdi)
ib_unregister_device(&rdi->ibdev); ib_unregister_device(&rdi->ibdev);
rvt_mr_exit(rdi); rvt_mr_exit(rdi);
rvt_qp_exit(rdi);
} }
EXPORT_SYMBOL(rvt_unregister_device); EXPORT_SYMBOL(rvt_unregister_device);
......
...@@ -222,7 +222,10 @@ struct rvt_driver_provided { ...@@ -222,7 +222,10 @@ struct rvt_driver_provided {
int (*port_callback)(struct ib_device *, u8, struct kobject *); int (*port_callback)(struct ib_device *, u8, struct kobject *);
const char * (*get_card_name)(struct rvt_dev_info *rdi); const char * (*get_card_name)(struct rvt_dev_info *rdi);
struct pci_dev * (*get_pci_dev)(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 */ /* Optional functions */
...@@ -230,6 +233,8 @@ struct rvt_driver_provided { ...@@ -230,6 +233,8 @@ struct rvt_driver_provided {
int (*check_ah)(struct ib_device *, struct ib_ah_attr *); int (*check_ah)(struct ib_device *, struct ib_ah_attr *);
void (*notify_new_ah)(struct ib_device *, struct ib_ah_attr *, void (*notify_new_ah)(struct ib_device *, struct ib_ah_attr *,
struct rvt_ah *); 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 { struct rvt_dev_info {
...@@ -262,7 +267,10 @@ struct rvt_dev_info { ...@@ -262,7 +267,10 @@ struct rvt_dev_info {
int flags; int flags;
struct rvt_ibport **ports; struct rvt_ibport **ports;
/* QP */
struct rvt_qp_ibdev *qp_dev; 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 */ /* memory maps */
struct list_head pending_mmaps; struct list_head pending_mmaps;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment