Skip to content

Commit

Permalink
RDMA/cxgb4: Do CIDX_INC updates every 1/16 CQ depth CQE reaps
Browse files Browse the repository at this point in the history
This avoids the CIDX_INC overflow issue with T4A2 when running
kernel RDMA applications.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
  • Loading branch information
Steve Wise authored and Roland Dreier committed Mar 14, 2011
1 parent 2942813 commit ffc3f74
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/infiniband/hw/cxgb4/t4.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,14 @@ static inline void t4_swcq_consume(struct t4_cq *cq)
static inline void t4_hwcq_consume(struct t4_cq *cq)
{
cq->bits_type_ts = cq->queue[cq->cidx].bits_type_ts;
if (++cq->cidx_inc == cq->size)
if (++cq->cidx_inc == (cq->size >> 4)) {
u32 val;

val = SEINTARM(0) | CIDXINC(cq->cidx_inc) | TIMERREG(7) |
INGRESSQID(cq->cqid);
writel(val, cq->gts);
cq->cidx_inc = 0;
}
if (++cq->cidx == cq->size) {
cq->cidx = 0;
cq->gen ^= 1;
Expand Down

0 comments on commit ffc3f74

Please sign in to comment.