diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-03 17:33:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-03 17:33:42 -0400 |
commit | 3bb5da3837cc1aa17736b05139c9a22c3794851a (patch) | |
tree | c92d5684a866542b1cb20641607ac1643ce03a47 /net/sunrpc | |
parent | 7feb49c82a74bc7c091b8ab2a3f96baa33d08ece (diff) | |
parent | 9597362d354f8655ece324b01d0c640a0e99c077 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c index ab54a736486e..c22d6b6f2db4 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | |||
@@ -237,14 +237,12 @@ static void rdma_set_ctxt_sge(struct svc_rdma_op_ctxt *ctxt, | |||
237 | 237 | ||
238 | static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count) | 238 | static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count) |
239 | { | 239 | { |
240 | #ifdef RDMA_TRANSPORT_IWARP | ||
241 | if ((RDMA_TRANSPORT_IWARP == | 240 | if ((RDMA_TRANSPORT_IWARP == |
242 | rdma_node_get_transport(xprt->sc_cm_id-> | 241 | rdma_node_get_transport(xprt->sc_cm_id-> |
243 | device->node_type)) | 242 | device->node_type)) |
244 | && sge_count > 1) | 243 | && sge_count > 1) |
245 | return 1; | 244 | return 1; |
246 | else | 245 | else |
247 | #endif | ||
248 | return min_t(int, sge_count, xprt->sc_max_sge); | 246 | return min_t(int, sge_count, xprt->sc_max_sge); |
249 | } | 247 | } |
250 | 248 | ||
@@ -324,15 +322,6 @@ next_sge: | |||
324 | ctxt->direction = DMA_FROM_DEVICE; | 322 | ctxt->direction = DMA_FROM_DEVICE; |
325 | clear_bit(RDMACTXT_F_READ_DONE, &ctxt->flags); | 323 | clear_bit(RDMACTXT_F_READ_DONE, &ctxt->flags); |
326 | clear_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); | 324 | clear_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); |
327 | if ((ch+1)->rc_discrim == 0) { | ||
328 | /* | ||
329 | * Checked in sq_cq_reap to see if we need to | ||
330 | * be enqueued | ||
331 | */ | ||
332 | set_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); | ||
333 | ctxt->next = hdr_ctxt; | ||
334 | hdr_ctxt->next = head; | ||
335 | } | ||
336 | 325 | ||
337 | /* Prepare READ WR */ | 326 | /* Prepare READ WR */ |
338 | memset(&read_wr, 0, sizeof read_wr); | 327 | memset(&read_wr, 0, sizeof read_wr); |
@@ -350,7 +339,17 @@ next_sge: | |||
350 | rdma_set_ctxt_sge(ctxt, &sge[ch_sge_ary[ch_no].start], | 339 | rdma_set_ctxt_sge(ctxt, &sge[ch_sge_ary[ch_no].start], |
351 | &sgl_offset, | 340 | &sgl_offset, |
352 | read_wr.num_sge); | 341 | read_wr.num_sge); |
353 | 342 | if (((ch+1)->rc_discrim == 0) && | |
343 | (read_wr.num_sge == ch_sge_ary[ch_no].count)) { | ||
344 | /* | ||
345 | * Mark the last RDMA_READ with a bit to | ||
346 | * indicate all RPC data has been fetched from | ||
347 | * the client and the RPC needs to be enqueued. | ||
348 | */ | ||
349 | set_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); | ||
350 | ctxt->next = hdr_ctxt; | ||
351 | hdr_ctxt->next = head; | ||
352 | } | ||
354 | /* Post the read */ | 353 | /* Post the read */ |
355 | err = svc_rdma_send(xprt, &read_wr); | 354 | err = svc_rdma_send(xprt, &read_wr); |
356 | if (err) { | 355 | if (err) { |