Re: [PATCH 1/3 v4] IB/srp: Preparation for transmit ring response allocation

2010-08-16 Thread Bart Van Assche
On Sat, Aug 14, 2010 at 7:04 PM, David Dillow d...@thedillows.org wrote: On Sat, 2010-08-14 at 09:35 +0200, Bart Van Assche wrote: On Fri, Aug 13, 2010 at 8:24 PM, David Dillow d...@thedillows.org wrote: + +     rsv = (req_type == SRP_REQ_NORMAL) ? SRP_TSK_MGMT_RSV : 0;      

Re: [PATCH 1/3 v4] IB/srp: Preparation for transmit ring response allocation

2010-08-14 Thread Bart Van Assche
On Fri, Aug 13, 2010 at 8:24 PM, David Dillow d...@thedillows.org wrote: + +     rsv = (req_type == SRP_REQ_NORMAL) ? SRP_TSK_MGMT_RSV : 0;       srp_send_completion(target-send_cq, target); -     if (target-tx_head - target-tx_tail = SRP_SQ_SIZE) +     if (target-tx_head -

Re: [PATCH 1/3 v4] IB/srp: Preparation for transmit ring response allocation

2010-08-14 Thread David Dillow
On Sat, 2010-08-14 at 09:35 +0200, Bart Van Assche wrote: On Fri, Aug 13, 2010 at 8:24 PM, David Dillow d...@thedillows.org wrote: + + rsv = (req_type == SRP_REQ_NORMAL) ? SRP_TSK_MGMT_RSV : 0; srp_send_completion(target-send_cq, target); - if (target-tx_head -

Re: [PATCH 1/3 v4] IB/srp: Preparation for transmit ring response allocation

2010-08-13 Thread David Dillow
On Tue, 2010-08-10 at 20:33 +0200, Bart Van Assche wrote: @@ -820,9 +820,11 @@ static int srp_post_recv(struct srp_target_port *target) unsigned int next; int ret; + BUILD_BUG_ON_NOT_POWER_OF_2(SRP_RQ_MASK + 1); + Please put this together with the other build bug in the

[PATCH 1/3 v4] IB/srp: Preparation for transmit ring response allocation

2010-08-10 Thread Bart Van Assche
The information unit transmit ring (srp_target.tx_ring) in ib_srp is currently only used for allocating requests sent by the initiator to the target. This patch prepares using that ring buffer for allocation of both requests and responses. Also, this patch differentiates the uses of SRP_SQ_SIZE,