diff options
author | Ram Amrani <Ram.Amrani@cavium.com> | 2016-10-10 13:15:38 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-10-14 15:00:10 -0400 |
commit | 048867793046e6bd665869816f4702fc49cc9a18 (patch) | |
tree | b2f77791a0ed8134e2fb47d1422ac582115bd307 /drivers/infiniband/hw/qedr/qedr.h | |
parent | 1d1424c8f834e4e3b8792d310a94b0e2e8f59b4c (diff) |
qedr: Add GSI support
Add support for GSI over light L2.
Signed-off-by: Rajesh Borundia <rajesh.borundia@cavium.com>
Signed-off-by: Ram Amrani <Ram.Amrani@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.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/qedr/qedr.h b/drivers/infiniband/hw/qedr/qedr.h index 0b404d87921f..620badd7d4fb 100644 --- a/drivers/infiniband/hw/qedr/qedr.h +++ b/drivers/infiniband/hw/qedr/qedr.h @@ -55,6 +55,7 @@ #define QEDR_MSG_RQ " RQ" #define QEDR_MSG_SQ " SQ" #define QEDR_MSG_QP " QP" +#define QEDR_MSG_GSI " GSI" #define QEDR_CQ_MAGIC_NUMBER (0x11223344) @@ -148,6 +149,10 @@ struct qedr_dev { u8 num_hwfns; uint wq_multiplier; u8 gsi_ll2_mac_address[ETH_ALEN]; + int gsi_qp_created; + struct qedr_cq *gsi_sqcq; + struct qedr_cq *gsi_rqcq; + struct qedr_qp *gsi_qp; }; #define QEDR_MAX_SQ_PBL (0x8000) @@ -246,6 +251,9 @@ struct qedr_cq { u16 icid; + /* Lock to protect completion handler */ + spinlock_t comp_handler_lock; + /* Lock to protect multiplem CQ's */ spinlock_t cq_lock; u8 arm_flags; @@ -292,6 +300,7 @@ struct qedr_qp_hwq_info { u16 prod; u16 cons; u16 wqe_cons; + u16 gsi_cons; u16 max_wr; /* DB */ @@ -366,6 +375,7 @@ struct qedr_qp { struct ib_sge sg_list[RDMA_MAX_SGE_PER_RQ_WQE]; u8 wqe_size; + u8 smac[ETH_ALEN]; u16 vlan_id; int rc; } *rqe_wr_id; @@ -473,6 +483,11 @@ static inline struct qedr_qp *get_qedr_qp(struct ib_qp *ibqp) return container_of(ibqp, struct qedr_qp, ibqp); } +static inline struct qedr_ah *get_qedr_ah(struct ib_ah *ibah) +{ + return container_of(ibah, struct qedr_ah, ibah); +} + static inline struct qedr_mr *get_qedr_mr(struct ib_mr *ibmr) { return container_of(ibmr, struct qedr_mr, ibmr); |