On Wed, 2009-06-24 at 15:20 -0700, Vasu Dev wrote:
> On Wed, 2009-06-24 at 14:18 -0700, Robert Love wrote:
> > On Wed, 2009-06-24 at 14:01 -0700, Vasu Dev wrote:
> > > On Wed, 2009-06-24 at 12:33 -0700, Robert Love wrote:
> > > > On Tue, 2009-06-23 at 10:44 -0700, Vasu Dev wrote:
> > > > > Modifies current code to use EM anchor list in EM allocation, EM free,
> > > > > EM reset, exch allocation and exch lookup code paths.
> > > > > 
> > > > >  1. Modifies fc_exch_mgr_alloc to accept EM match function and then
> > > > >     have allocated EM added to the lport using fc_exch_mgr_add API
> > > > >     while also updating EM kref for newly added EM.
> > > > > 
> > > > >  2. Updates fc_exch_mgr_free API to accept only lport pointer instead
> > > > >     EM and then have this API free all EMs of the lport from EM anchor
> > > > >     list.
> > > > > 
> > > > >  3. Removes single lport pointer link from the EM, which was used in
> > > > >     associating lport pointer in newly allocated exchange. Instead 
> > > > > have
> > > > >     lport pointer passed along new exchange allocation call path and
> > > > >     then store passed lport pointer in newly allocated exchange, this
> > > > >     will allow a single EM instance to be used across more than one
> > > > >     lport and used in EM reset to reset only lport specific exchanges.
> > > > > 
> > > > >  4. Modifies fc_exch_mgr_reset to reset all EMs from the EM anchor 
> > > > > list
> > > > >     of the lport, adds additional exch lport pointer (ep->lp) check 
> > > > > for
> > > > >     shared EM case to reset exchange specific to a lport requested 
> > > > > reset.
> > > > > 
> > > > >  5. Updates exch allocation API fc_exch_alloc to use EM anchor list 
> > > > > and
> > > > >     its anchor match func pointer. The fc_exch_alloc will walk the 
> > > > > list
> > > > >     of EMs until it finds a match, a match will be either null match
> > > > >     func pointer or call to match function returning true value.
> > > > > 
> > > > >  6. Updates fc_exch_recv to accept incoming frame on local port using
> > > > >     only lport pointer and frame pointer without specifying EM 
> > > > > instance
> > > > >     of incoming frame. Instead modified fc_exch_recv to locate EM for 
> > > > > the
> > > > >     incoming frame by matching xid of incoming frame against a EM xid 
> > > > > range.
> > > > >     This change was required to use EM list in libfc Rx path and 
> > > > > after this
> > > > >     change the lport fc_exch_mgr pointer emp is not needed anymore, so
> > > > >     removed emp pointer.
> > > > > 
> > > > >  7. Updates fnic for removed lport emp pointer and above modified 
> > > > > libfc APIs
> > > > >     fc_exch_recv, fc_exch_mgr_alloc and fc_exch_mgr_free.
> > > > > 
> > > > >  8. Removes exch_get and exch_put from libfc_function_template as 
> > > > > these
> > > > >     are no longer needed with EM anchor list and its match function 
> > > > > use.
> > > > >     Also removes its default function fc_exch_get.
> > > > > 
> > > > > Signed-off-by: Vasu Dev <[email protected]>
> > > > > ---
> > > > > 
> > > > >  drivers/scsi/fcoe/fcoe.c      |   16 +--
> > > > >  drivers/scsi/fcoe/libfcoe.c   |    2 
> > > > >  drivers/scsi/fnic/fnic_fcs.c  |    2 
> > > > >  drivers/scsi/fnic/fnic_main.c |   10 +-
> > > > >  drivers/scsi/libfc/fc_exch.c  |  193 
> > > > > +++++++++++++++++++++++++----------------
> > > > >  include/scsi/libfc.h          |   53 ++---------
> > > > >  6 files changed, 140 insertions(+), 136 deletions(-)
> > > > > 
> > > > 
> > > > <snip>
> > > > 
> > > > > diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
> > > > > index ef4a73a..403123d 100644
> > > > > --- a/include/scsi/libfc.h
> > > > > +++ b/include/scsi/libfc.h
> > > > > @@ -87,9 +87,8 @@ do {                                                
> > > > >                         \
> > > > >  
> > > > >  #define FC_EM_DBG(em, fmt, args...)                                  
> > > > > \
> > > > >       FC_CHECK_LOGGING(FC_EM_LOGGING,                                 
> > > > > \
> > > > > -                      printk(KERN_INFO "em: %6x: " fmt,              
> > > > > \
> > > > > -                             fc_host_port_id(em->lp->host),          
> > > > > \
> > > > > -                             ##args);)
> > > > > +                      printk(KERN_INFO "em: min_xid 0x:%x" fmt,      
> > > > > \
> > > > > +                             em->min_xid, ##args);)
> > > > 
> > > > This change is unintentional, right? I can take care of it, I just want
> > > > to make sure...
> > > > 
> > > 
> > > This was required since now lport pointer lp is completely removed from
> > > EM which was used by this macro. Instead modified this macro to use
> > > em->min_xid as identifier for this EM macro. 
> > > 
> > > This change was there in early posts of this series also, so not
> > > unintentional and not new to recently revised/updates to this series.
> > > 
> > > I think this macro should completely go away and instead EM layer should
> > > be using LPORT DEBUG macro since one EM could belong to multiple lport
> > > after shared EM and that would be more helpful in debugging.
> > > 
> > Agreed, I just resent this series with one additional patch that removes
> > this macro. 
> 
> Good that you finished this change quickly. Thanks.
> 
> Though I wasn't suggesting you to do this change with other alternate
> suggested above.
> 
Yeah, I know you weren't. I was just trying to be helpful. It was an
easy change and I want to get these patches committed.

> > The other patches are adjusted for the change and the series
> > applies to the current fcoe-next.git. If you give me approval, I'll
> > commit them to fcoe-next.git.
> > 
> 
> All looks good, I also did quick diff to original post to ensure no
> additional unintentional change in new post.
> 
Great, thanks.


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

Reply via email to