public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: James Smart <James.Smart@Emulex.Com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: FC transport: Calling fc_remote_port_add for online port
Date: Mon, 29 Jun 2009 15:52:04 +0200	[thread overview]
Message-ID: <20090629135204.GA12016@schmichrtp.de.ibm.com> (raw)
In-Reply-To: <4A44FA1C.9080207@emulex.com>

On Fri, Jun 26, 2009 at 12:41:00PM -0400, James Smart wrote:
> The LLD should never be calling fc_remote_port_add() twice without an  
> intervening fc_remote_port_delete(). Which is another way of saying -  
> yes, it's what you say relative to the rport state values.
>
> The idea is - the LLD is tracking an external port structure, using  
> <portid, <wwnn,wwpn>> to track identity, and is keeping a "present" and  
> "not-present" case. If a new port is deemed "present", it calls  
> fc_remote_port_add() and when connectivity  is lost (aka goes to "not  
> present") to that port, it calls fc_remote_port_delete(). It should be  
> very straight forward.
>
> The rport structure itself, to aid the midlayer,  to hide temporary  
> connectivity losses due to link bounces, controller resets, etc - may  
> stay around after the delete call, and midlayer calls may enter the  
> driver for it, but the transport via helper functions, should pick them  
> off and reject them. Eventually, when the rport exceeds its max  
> connectivity loss hide value (devloss_tmo), the devloss_tmo_callbk() is  
> made to tell the driver the rport is truly gone (if it cares), and all  
> the midlayer structures and scsi objects below the rport are terminated.  
>  After this point, for target id bindings, we keep the rport structure 
> around - but only as a generic container to hold the binding values. For 
> all intents and purposes, there's no relationship to the old rport or the 
> old rport pointer value any more.  And if a port eventually comes back 
> that matches the bindings, we flip the binding container back into a real 
> rport structure as if we had just allocated it.
>
> -- james s

Thanks for clarifying this. So a LLD has to always follow the
add-delete sequence.

BTW: I think it could be useful to have this information about the
interface between LLD and FC transport in
Documentation/scsi/scsi_fc_transport.txt

--
Christof Schmitt

      reply	other threads:[~2009-06-29 13:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-26 15:23 FC transport: Calling fc_remote_port_add for online port Christof Schmitt
2009-06-26 16:41 ` James Smart
2009-06-29 13:52   ` Christof Schmitt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090629135204.GA12016@schmichrtp.de.ibm.com \
    --to=christof.schmitt@de.ibm.com \
    --cc=James.Smart@Emulex.Com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox