Re: [PATCH 2/9] IB: add a proper completion queue abstraction

From: Bart Van Assche
Date: Mon Nov 23 2015 - 17:33:28 EST

On 11/23/2015 02:18 PM, Jason Gunthorpe wrote:
On Mon, Nov 23, 2015 at 01:54:05PM -0800, Bart Van Assche wrote:
What I don't see is how SRP handles things when the
sendq fills up, ie the case where __srp_get_tx_iu() == NULL. It looks
like the driver starts to panic and generates printks. I can't tell if
it can survive that, but it doesn't look very good..

Hello Jason,

From srp_cm_rep_handler():

= min(ch->req_lim - SRP_TSK_MGMT_SQ_SIZE,

In other words, the SCSI core is told to ensure that the number of outstanding SCSI commands is one less than the number of elements in the ch->free_tx list. And since the SRP initiator serializes task management requests it is guaranteed that __srp_get_tx_iu() won't fail due to ch->free_tx being empty.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at