RDMA/cxgb4: Support variable sized work requests
authorSteve Wise <swise@opengridcomputing.com>
Thu, 10 Jun 2010 19:03:00 +0000 (19:03 +0000)
committerRoland Dreier <rolandd@cisco.com>
Wed, 21 Jul 2010 18:16:20 +0000 (11:16 -0700)
commitd37ac31ddc24c1a0beed134278bc074c98812210
tree20b61b408fb31cd4b16d50c73d0445784a1255cd
parentd3c814e8b2a094dc3bcbe6a0d93ec4824b26e86a
RDMA/cxgb4: Support variable sized work requests

T4 EQ entries are in multiples of 64 bytes.  Currently the RDMA SQ and
RQ use fixed sized entries composed of 4 EQ entries for the SQ and 2
EQ entries for the RQ.  For optimial latency with small IO, we need to
change this so the HW only needs to DMA the EQ entries actually used
by a given work request.

Implementation:

- add wq_pidx counter to track where we are in the EQ.  cidx/pidx are
  used for the sw sq/rq tracking and flow control.

- the variable part of work requests is the SGL.  Add new functions to
  build the SGL and/or immediate data directly in the EQ memory
  wrapping when needed.

- adjust the min burst size for the EQ contexts to 64B.

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