Roland Dreier [Tue, 22 May 2007 21:13:15 +0000 (14:13 -0700)]
Handle freeing doorbell records
Actually implement mlx4_free_db() that just naively searches through
all doorbell pages. Also add a doorbell type parameter to the
function to avoid searching through all CQ doorbell pages when we
really want to find an RQ doorbell.
Roland Dreier [Mon, 21 May 2007 03:12:15 +0000 (20:12 -0700)]
Pass send queue sizes from userspace to kernel
Update to handle kernel mlx4 ABI version 2: pass log_2 of send queue
WQE basic block size and log_2 of number of send queue basic blocks to
the kernel to avoid bugs caused by the kernel calculating a different
send queue WQE size. This will also allow us to use multiple BBs per
WQE if we want to someday.
Roland Dreier [Sun, 20 May 2007 18:06:44 +0000 (11:06 -0700)]
Use wc_wmb() when posting BlueFlame send WQEs
Use wc_wmb() after copying WQE to BlueFlame register to avoid having
WQEs reach the device out of order if the BlueFlame page is mapped with
write combining.
Fix inline send posting when posting more than one request
Need to set inl parameter to zero for each request when posting a list
of requests, so that the value of inl is correct for each work
request, and is not cumulative.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Roland Dreier [Fri, 13 Apr 2007 04:23:59 +0000 (21:23 -0700)]
Implement posting of RDMA and atomic operations
Clean up the definitions of remote address and atomic operations WQE
segments. Fill in the missing code that fills in these segments when
posting RDMA or atomic operations to a send queue.
Roland Dreier [Wed, 11 Apr 2007 06:16:59 +0000 (23:16 -0700)]
Multiple SRQ fixes
Several one-liner fixes to SRQ support:
- Scatter entry address is 64 bits, so use htonll() instead of
htonl() when filling in WQE.
- Minimum SRQ WQE size is 32 bytes, so use 5 as a minimum value of
wqe_shift.
- When initializing next_wqe_index values, use htons() to put indices
into big-endian byte order.
Roland Dreier [Tue, 10 Apr 2007 17:33:48 +0000 (10:33 -0700)]
Don't set last byte of GID for non-global address vectors
Previous generation HCAs needed the last byte of the GID set to 2 for
non-global address vectors, but ConnectX just ignores the remote GID
field for non-global AVs, so remove the unnecessary code that sets it.
Roland Dreier [Tue, 10 Apr 2007 03:36:47 +0000 (20:36 -0700)]
Implement handling for completions with error
Convert status from HCA's hardware values to libibverbs enum for
completions with error in mlx4_handle_error_cqe(). Also, there's no
way mlx4_handle_error_cqe() can fail, so there's no reason for it to
return a value.
Roland Dreier [Tue, 10 Apr 2007 03:20:44 +0000 (20:20 -0700)]
Simplify completion with error handling
The out-of-line function to handle error CQEs doesn't need as many
parameters as the libmthca version did, so get rid of everything
except the CQE pointer and the WC pointer.