summaryrefslogtreecommitdiff
path: root/net/rds/ib_recv.c
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-01-14 03:32:24 +0300
committerAndy Grover <andy.grover@oracle.com>2010-09-09 05:11:50 +0400
commit919ced4ce7d6ac62dd5be62d8993fe22a527d53a (patch)
treef201cb777e39cee0fa030ebf0e71558b3227b9c9 /net/rds/ib_recv.c
parent6f3d05db0da0b874afd2dd229bed715133532f8d (diff)
downloadlinux-919ced4ce7d6ac62dd5be62d8993fe22a527d53a.tar.xz
RDS/IB: Remove ib_[header/data]_sge() functions
These functions were to cope with differently ordered sg entries depending on RDS 3.0 or 3.1+. Now that we've dropped 3.0 compatibility we no longer need them. Also, modify usage sites for these to refer to sge[0] or [1] directly. Reorder code to initialize header sgs first. Signed-off-by: Andy Grover <andy.grover@oracle.com>
Diffstat (limited to 'net/rds/ib_recv.c')
-rw-r--r--net/rds/ib_recv.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index a68a3a721c6c..e9fe08a86c40 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -95,15 +95,15 @@ void rds_ib_recv_init_ring(struct rds_ib_connection *ic)
recv->r_wr.sg_list = recv->r_sge;
recv->r_wr.num_sge = RDS_IB_RECV_SGE;
- sge = rds_ib_data_sge(ic, recv->r_sge);
- sge->addr = 0;
- sge->length = RDS_FRAG_SIZE;
- sge->lkey = ic->i_mr->lkey;
-
- sge = rds_ib_header_sge(ic, recv->r_sge);
+ sge = &recv->r_sge[0];
sge->addr = ic->i_recv_hdrs_dma + (i * sizeof(struct rds_header));
sge->length = sizeof(struct rds_header);
sge->lkey = ic->i_mr->lkey;
+
+ sge = &recv->r_sge[1];
+ sge->addr = 0;
+ sge->length = RDS_FRAG_SIZE;
+ sge->lkey = ic->i_mr->lkey;
}
}
@@ -190,14 +190,14 @@ static int rds_ib_recv_refill_one(struct rds_connection *conn,
recv->r_frag->f_offset = ic->i_frag.f_offset;
recv->r_frag->f_mapped = dma_addr;
- sge = rds_ib_data_sge(ic, recv->r_sge);
- sge->addr = dma_addr;
- sge->length = RDS_FRAG_SIZE;
-
- sge = rds_ib_header_sge(ic, recv->r_sge);
+ sge = &recv->r_sge[0];
sge->addr = ic->i_recv_hdrs_dma + (recv - ic->i_recvs) * sizeof(struct rds_header);
sge->length = sizeof(struct rds_header);
+ sge = &recv->r_sge[1];
+ sge->addr = dma_addr;
+ sge->length = RDS_FRAG_SIZE;
+
get_page(recv->r_frag->f_page);
if (ic->i_frag.f_offset < RDS_PAGE_LAST_OFF) {