diff mbox

Reducing the number of IB interrupts caused by the SRP initiator

Message ID 201001172008.16461.bart.vanassche@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Bart Van Assche Jan. 17, 2010, 7:08 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 54c8fe2..1f674b8 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -241,7 +241,7 @@  static int srp_create_target_ib(struct srp_target_port *target)
 	init_attr->cap.max_recv_wr     = SRP_RQ_SIZE;
 	init_attr->cap.max_recv_sge    = 1;
 	init_attr->cap.max_send_sge    = 1;
-	init_attr->sq_sig_type         = IB_SIGNAL_ALL_WR;
+	init_attr->sq_sig_type         = IB_SIGNAL_REQ_WR;
 	init_attr->qp_type             = IB_QPT_RC;
 	init_attr->send_cq             = target->cq;
 	init_attr->recv_cq             = target->cq;
@@ -1001,7 +1001,8 @@  static int __srp_post_send(struct srp_target_port *target,
 	wr.sg_list    = &list;
 	wr.num_sge    = 1;
 	wr.opcode     = IB_WR_SEND;
-	wr.send_flags = IB_SEND_SIGNALED;
+	wr.send_flags = target->tx_head - target->tx_tail == SRP_SQ_SIZE - 1
+		? IB_SEND_SIGNALED : 0;
 
 	ret = ib_post_send(target->qp, &wr, &bad_wr);