]> bbs.cooldavid.org Git - net-next-2.6.git/commit
RDMA/cxgb4: Avoid false GTS CIDX_INC overflows
authorSteve Wise <swise@opengridcomputing.com>
Thu, 10 Jun 2010 19:03:06 +0000 (19:03 +0000)
committerRoland Dreier <rolandd@cisco.com>
Tue, 6 Jul 2010 21:04:04 +0000 (14:04 -0700)
commit1973e8b8edea68d2408328d25b318ee7401293be
tree1bd38f30660409b7aa77a7801d0525a4247c2e3c
parentb21ef16a8b956aee2fb3d7fc9d24a0b4dae2ae72
RDMA/cxgb4: Avoid false GTS CIDX_INC overflows

The T4 IQ hw design assumes CIDX_INC credits will be returned on a
regular basis and always before the CIDX counter crosses over the PIDX
counter.  For RDMA CQs, however, returning CIDX_INC credits is only
needed and desired when and if the CQ is armed for notification.  This
can lead to a GTS write returning credits that causes the HW to reject
the credit update because it causes CIDX to pass PIDX.  Once this
happens, the CIDX/PIDX counters get out of whack and an application
can miss a notification and get stuck blocked awaiting a notification.

To avoid this, we allocate the HW IQ 2x times the requested size.
This seems to avoid the false overflow failures.  If we see more
issues with this, then we'll have to add code in the poll path to
return credits periodically like when the amount reaches 1/2 the queue
depth).  I would like to avoid this as it adds a PCI write transaction
for applications that never arm the CQ (like most MPIs).

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/cxgb4/cq.c