Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159002
b: refs/heads/master
c: e11d912
h: refs/heads/master
v: v3
  • Loading branch information
Andy Grover authored and David S. Miller committed Jul 20, 2009
1 parent d7ffd19 commit 07d3b90
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9099707ded4b3aeda7b1a6c1c87076bd18578d24
refs/heads/master: e11d912a7dd4dfe388f38ba3080a6d067a57b23d
18 changes: 12 additions & 6 deletions trunk/net/rds/ib_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ void rds_ib_cm_connect_complete(struct rds_connection *conn, struct rdma_cm_even
RDS_PROTOCOL_MINOR(conn->c_version),
ic->i_flowctl ? ", flow control" : "");

/*
* Init rings and fill recv. this needs to wait until protocol negotiation
* is complete, since ring layout is different from 3.0 to 3.1.
*/
rds_ib_send_init_ring(ic);
rds_ib_recv_init_ring(ic);
/* Post receive buffers - as a side effect, this will update
* the posted credit count. */
rds_ib_recv_refill(conn, GFP_KERNEL, GFP_HIGHUSER, 1);

/* Tune RNR behavior */
rds_ib_tune_rnr(ic, &qp_attr);

Expand Down Expand Up @@ -324,22 +334,18 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
rdsdebug("send allocation failed\n");
goto out;
}
rds_ib_send_init_ring(ic);
memset(ic->i_sends, 0, ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work));

ic->i_recvs = vmalloc(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work));
if (ic->i_recvs == NULL) {
ret = -ENOMEM;
rdsdebug("recv allocation failed\n");
goto out;
}
memset(ic->i_recvs, 0, ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work));

rds_ib_recv_init_ring(ic);
rds_ib_recv_init_ack(ic);

/* Post receive buffers - as a side effect, this will update
* the posted credit count. */
rds_ib_recv_refill(conn, GFP_KERNEL, GFP_HIGHUSER, 1);

rdsdebug("conn %p pd %p mr %p cq %p %p\n", conn, ic->i_pd, ic->i_mr,
ic->i_send_cq, ic->i_recv_cq);

Expand Down

0 comments on commit 07d3b90

Please sign in to comment.