diff options
author | Steve Wise <swise@opengridcomputing.com> | 2011-03-11 17:30:42 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2011-03-14 15:09:11 -0400 |
commit | ffc3f7487ff0b32500b319c770475383f6f6efab (patch) | |
tree | 64beb59d6b0b843316a47bdae156a24893254380 /drivers/infiniband | |
parent | 294281373999e7fff393c04eb16092a8f00ad5aa (diff) |
RDMA/cxgb4: Do CIDX_INC updates every 1/16 CQ depth CQE reaps
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>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/t4.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/t4.h b/drivers/infiniband/hw/cxgb4/t4.h index 70004425d695..24af12fc8228 100644 --- a/drivers/infiniband/hw/cxgb4/t4.h +++ b/drivers/infiniband/hw/cxgb4/t4.h | |||
@@ -507,8 +507,14 @@ static inline void t4_swcq_consume(struct t4_cq *cq) | |||
507 | static inline void t4_hwcq_consume(struct t4_cq *cq) | 507 | static inline void t4_hwcq_consume(struct t4_cq *cq) |
508 | { | 508 | { |
509 | cq->bits_type_ts = cq->queue[cq->cidx].bits_type_ts; | 509 | cq->bits_type_ts = cq->queue[cq->cidx].bits_type_ts; |
510 | if (++cq->cidx_inc == cq->size) | 510 | if (++cq->cidx_inc == (cq->size >> 4)) { |
511 | u32 val; | ||
512 | |||
513 | val = SEINTARM(0) | CIDXINC(cq->cidx_inc) | TIMERREG(7) | | ||
514 | INGRESSQID(cq->cqid); | ||
515 | writel(val, cq->gts); | ||
511 | cq->cidx_inc = 0; | 516 | cq->cidx_inc = 0; |
517 | } | ||
512 | if (++cq->cidx == cq->size) { | 518 | if (++cq->cidx == cq->size) { |
513 | cq->cidx = 0; | 519 | cq->cidx = 0; |
514 | cq->gen ^= 1; | 520 | cq->gen ^= 1; |