On Thu, Aug 09, 2018 at 05:29:37PM +0300, Yuval Bason wrote: > Implement the SRQ specific verbs and update the poll_cq verb to deal with > SRQ completions. > > Signed-off-by: Michal Kalderon <michal.kalderon@xxxxxxxxxx> > Signed-off-by: Yuval Bason <yuval.bason@xxxxxxxxxx> > --- > drivers/infiniband/hw/qedr/main.c | 5 + > drivers/infiniband/hw/qedr/qedr.h | 35 +++ > drivers/infiniband/hw/qedr/qedr_hsi_rdma.h | 11 + > drivers/infiniband/hw/qedr/verbs.c | 411 ++++++++++++++++++++++++++++- > drivers/infiniband/hw/qedr/verbs.h | 9 + > 5 files changed, 458 insertions(+), 13 deletions(-) <...> > +#define QEDR_SRQ_WQE_ELEM_SIZE sizeof(union rdma_srq_elm) IMHO, it is very bad practice to obfuscate standard plain C. > +#define RDMA_MAX_SGE_PER_SRQ (4) > +#define RDMA_MAX_SRQ_WQE_SIZE (RDMA_MAX_SGE_PER_SRQ + 1) > + > #define DB_ADDR_SHIFT(addr) ((addr) << DB_PWM_ADDR_OFFSET_SHIFT) > > static inline int qedr_ib_copy_to_udata(struct ib_udata *udata, void *src, > @@ -84,6 +88,19 @@ int qedr_iw_query_gid(struct ib_device *ibdev, u8 port, > return 0; > } <...> > > + > + num_elems = init_attr->attr.max_wr * RDMA_MAX_SRQ_WQE_SIZE; > + rc = dev->ops->common->chain_alloc(dev->cdev, > + QED_CHAIN_USE_TO_CONSUME_PRODUCE, > + QED_CHAIN_MODE_PBL, > + QED_CHAIN_CNT_TYPE_U32, > + num_elems, > + QEDR_SRQ_WQE_ELEM_SIZE, > + &hw_srq->pbl, NULL); Thanks
Attachment:
signature.asc
Description: PGP signature