[rds-devel] [PATCH 4/4] rds/ib: align the max_recv_sge qp creation
attribute with the actual usage
Or Gerlitz
ogerlitz at voltaire.com
Mon Jan 14 01:59:35 PST 2008
The rds receive design always posts a work request with two SG elements,
adapt the qp creation code for that end.
Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
Index: ofa_1_3_kernel-20080113-0200/net/rds/ib.h
===================================================================
--- ofa_1_3_kernel-20080113-0200.orig/net/rds/ib.h
+++ ofa_1_3_kernel-20080113-0200/net/rds/ib.h
@@ -12,6 +12,7 @@
#define RDS_FMR_POOL_SIZE 2048
#define RDS_IB_MAX_SGE 29
+#define RDS_IB_RECV_SGE 2
/*
* IB posts RDS_FRAG_SIZE fragments of pages to the receive queues to
Index: ofa_1_3_kernel-20080113-0200/net/rds/ib_cm.c
===================================================================
--- ofa_1_3_kernel-20080113-0200.orig/net/rds/ib_cm.c
+++ ofa_1_3_kernel-20080113-0200/net/rds/ib_cm.c
@@ -174,7 +174,7 @@ static int rds_ib_setup_qp(struct rds_co
attr.cap.max_send_wr = ic->i_send_ring.w_nr + 1;
attr.cap.max_recv_wr = ic->i_recv_ring.w_nr + 1;
attr.cap.max_send_sge = rds_ibdev->max_sge;
- attr.cap.max_recv_sge = rds_ibdev->max_sge;
+ attr.cap.max_recv_sge = RDS_IB_RECV_SGE;
attr.sq_sig_type = IB_SIGNAL_REQ_WR;
attr.qp_type = IB_QPT_RC;
attr.send_cq = ic->i_send_cq;
Index: ofa_1_3_kernel-20080113-0200/net/rds/ib_recv.c
===================================================================
--- ofa_1_3_kernel-20080113-0200.orig/net/rds/ib_recv.c
+++ ofa_1_3_kernel-20080113-0200/net/rds/ib_recv.c
@@ -90,7 +90,7 @@ void rds_ib_recv_init_ring(struct rds_ib
recv->r_wr.next = NULL;
recv->r_wr.wr_id = i;
recv->r_wr.sg_list = recv->r_sge;
- recv->r_wr.num_sge = 2;
+ recv->r_wr.num_sge = RDS_IB_RECV_SGE;
recv->r_sge[0].addr = 0;
recv->r_sge[0].length = RDS_FRAG_SIZE;
More information about the rds-devel
mailing list