>-----Original Message-----
>From: Mike Christie [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, August 27, 2008 2:17 PM
>To: Dev, Vasu
>Cc: [email protected]
>Subject: Re: [Open-FCoE] [PATCH 3/4] libfc: Added exch release
>fc_exch_mgr_delete_ep()
>
>Dev, Vasu wrote:
>>> -----Original Message-----
>>> From: Mike Christie [mailto:[EMAIL PROTECTED]
>>>
>>> Ok so now I am really lost :) See the attached patch. It looks like
if
>>> fc_seq_lookup_recip returns FC_RJT_NONE then from the fc_exch_find
call
>>> it returns from fc_seq_lookup_recip with a hold on the ep.
>>
>> Correct, the ep returned from fc_seq_lookup_recip() will have one
>> exch hold and that will be used by upper layer as explained below in
>> detail.
>>
>>> So in
>>> fc_exch_recv_req we need to just release it?
>>
>> The exch hold from fc_seq_lookup_recip() will be released by upper
layer
>> response handler by calling fc_exch_done() but since fc_exch_done()
will
>
>But shouldn't there be a hold from when the ep was allocated and added
>to the mp->exches array? 

Yes and I was looking at that case only when fc_exch_resp() allocates
new exchange in fc_seq_lookup_recip() and that will be most likely code
path for initiator for exch originated from other side. In this case ep
will have only ref 1 but if fc_exch_find() is used in
fc_seq_lookup_recip() then ep will have additional exch ref. So you are
correct, the extra hold should be moved up when fc_exch_resp() is called
and then do only fc_exch_release() in fc_exch_recv_req() without any
addition hold. I'll make this change.

_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to