From 8b248b67c1e69f1b403043d080e2beeccda8ccb1 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 24 Oct 2010 18:32:14 +0000 Subject: [PATCH] ib_srpt: Added a comment. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2459 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 7b5ca1d10..f9c122543 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2327,6 +2327,10 @@ static int srpt_cm_req_recv(struct ib_cm_id *cm_id, memcpy(ch->t_port_id, req->target_port_id, 16); ch->sport = &sdev->port[param->port - 1]; ch->cm_id = cm_id; + /* + * Avoid QUEUE_FULL conditions by limiting the number of buffers used + * for the SRP protocol to the SCST SCSI command queue size. + */ ch->rq_size = min(SRPT_RQ_SIZE, scst_get_max_lun_commands(NULL, 0)); atomic_set(&ch->processing_compl, 0); atomic_set(&ch->state, RDMA_CHANNEL_CONNECTING);