rdma/cxgb4: Add support for kernel mode SRQ's

This patch implements the srq specific verbs such as create/destroy/modify
and post_srq_recv. And adds srq specific structures and defines to t4.h
and uapi.

Also updates the cq poll logic to deal with completions that are
associated with the SRQ's.

This patch also handles kernel mode SRQ_LIMIT events as well as flushed
SRQ buffers

Signed-off-by: Raju Rangoju <rajur@chelsio.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
Raju Rangoju
2018-07-25 21:22:14 +05:30
committed by Jason Gunthorpe
parent 7fc7a7cffa
commit 6a0b6174d3
8 changed files with 929 additions and 167 deletions

View File

@@ -491,7 +491,6 @@ static inline void t4_rq_produce(struct t4_wq *wq, u8 len16)
static inline void t4_rq_consume(struct t4_wq *wq)
{
wq->rq.in_use--;
wq->rq.msn++;
if (++wq->rq.cidx == wq->rq.size)
wq->rq.cidx = 0;
}
@@ -641,12 +640,14 @@ static inline void t4_ring_rq_db(struct t4_wq *wq, u16 inc,
static inline int t4_wq_in_error(struct t4_wq *wq)
{
return wq->rq.queue[wq->rq.size].status.qp_err;
return *wq->qp_errp;
}
static inline void t4_set_wq_in_error(struct t4_wq *wq)
static inline void t4_set_wq_in_error(struct t4_wq *wq, u32 srqidx)
{
wq->rq.queue[wq->rq.size].status.qp_err = 1;
if (srqidx)
*wq->srqidxp = srqidx;
*wq->qp_errp = 1;
}
static inline void t4_disable_wq_db(struct t4_wq *wq)