[openib-general] Re: problem with SDP/AIO on mem-free HCA
Libor Michalek
libor at topspin.com
Fri Apr 1 14:54:14 PST 2005
On Fri, Apr 01, 2005 at 08:27:19AM -0800, Roland Dreier wrote:
> Fab> If you are blessed with a Tavor PRM, see section 8.2.1.6 (in
> Fab> PRM 1.0.0). It states that a length of zero in a data
> Fab> segment indicates a 2GB transfer (MSb is used as a flag to
> Fab> indicate normal vs. inline data segments). A zero-byte
> Fab> request must not reference any data segments.
>
> Yup, that must be the problem. I guess mthca can skip over 0-length
> data segments. Another option would be to say that such work requests
> aren't allowed. Not sure which way I think we should go. I need to
> talk to Libor and find out why SDP is generating such requests.
Roland,
Can you try this patch, it should close a gap to prevent a zero
length IOCB from getting into the receive data path.
Thanks.
-Libor
Index: sdp_recv.c
===================================================================
--- sdp_recv.c (revision 2094)
+++ sdp_recv.c (working copy)
@@ -297,13 +297,13 @@
* if there is no more advertised space, queue the
* advertisment for completion
*/
- if (advt->size <= 0)
+ if (!advt->size)
sdp_advt_q_put(&conn->src_actv,
sdp_advt_q_get(&conn->src_pend));
/*
* if there is no more iocb space queue the it for completion
*/
- if (iocb->len <= 0) {
+ if (!iocb->len) {
iocb = sdp_iocb_q_get_head(&conn->r_pend);
if (!iocb) {
sdp_dbg_warn(conn, "read IOCB disappeared. <%d>",
@@ -1368,26 +1371,11 @@
* RDMA advertisements are checked to determine if remote
* data is pending and accessible.
*/
- if (!(copied < low_water) &&
- !conn->src_recv) {
-#if 0 /* performance cheat. LM */
- if (!(conn->snk_zthresh > size)) {
+ if (copied == size)
+ break;
- conn->nond_recv--;
-
- result = sdp_send_ctrl_snk_avail(conn,
- 0, 0, 0);
- if (result < 0) {
- /*
- * since the message did not go out,
- * back out the non_discard counter
- */
- conn->nond_recv++;
- }
- }
-#endif
+ if (!(copied < low_water) && !conn->src_recv)
break;
- }
/*
* check connection errors, and then wait for more data.
* check status. POSIX 1003.1g order.
More information about the general
mailing list