Professional Documents
Culture Documents
Node Port Initialization PDF
Node Port Initialization PDF
Fibre Channel
Switched Fabric
Robert W. Kembel
INC.
TUCSON
All rights reserved. Except for brief passages to be published in a review or as citation of authority, no part of this book may be reproduced or transmitted in any form or by any means
electronic or mechanical, including photocopying, recording, or by any information storage and
retrieval system, without prior written permission from the publisher.
If trademarks or tradenames of any companies or products have been used within this book,
no such uses are intended to convey endorsement or other affiliations with the book. Any
brand names or products used within this book are trademarks or registered trademarks of
their respective holders.
Though the author and publisher have made every attempt to ensure the accuracy and completeness of the information contained in this book, they assume no responsibility for errors,
inaccuracies, omissions, or any inconsistency therein. The reader is strongly advised to refer
to the appropriate standards documents before beginning any design activities.
Cover design by David Fischer, Fischer Graphic Services.
ISBN 0-931836-71-9
Other books in the Fibre Channel Consultant series:
Fibre Channel A Comprehensive Introduction, ISBN 0-931836-84-0
Fibre Channel Arbitrated Loop, ISBN 0-931836-82-4
Published by:
Northwest Learning Associates, Inc.
3061 N. Willow Creek Drive
Tucson, AZ 85712
520-881-0877, Fax: 520-881-0632
www.NLAbooks.com
email: inquiries@NLAbooks.com
Printed in the United States of America
Second Edition
10 9 8 7 6 5 4 3
ii
361
Want RLIR?
NO
Negotiate
Speed?
NO
YES
Perform Speed
Negotiation
Discover
Node Ports?
NO
YES
Determine N/NL_Port
Mode
Login with
Ports?
NO
YES
YES
NO
Pro
cess Login
Required?
NO
Want RSCN?
YES
NO
Private NL_Port?
YES
YES
YES
FC-4 Specific
Actions?
NO
YES
363
Is Node
Port Loop
Capable?
YES
Attempt FC-AL Loop
Initialization
Was
Loop Init.
Successful?
NO
Only 2
Ports on the
Loop?
NO
Is Port
Non-Loop
Capable?
NO
YES
NO
(or dont know)
NO
Was
FC-PH Init.
Successful?
YES
YES
Is Port
Non-Loop
Capable?
NO
YES
Perform FC-PH Link
Initialization
Attempt FC-PH Link
Initialization
NO
Was
FC-PH Init.
Successful?
Was
FC-PH Init.
Successful?
YES
NO
YES
NO
ERR_INIT =
1?
NO
Was
Loop Init.
Successful?
YES
Wait
YES
NL_Port Mode
N_Port Mode
Port
A
LIP
IDLE
Time-out
OLS
LR
LRR
IDLEs
IDLEs
Port
B
365
The problem with leaving the loop circuit open is that some NL_Port implementations may not
behave as expected.
If the NL_Port is a half-duplex design, it normally cannot send and receive data frames during
the same loop circuit. If the half-duplex port is opened, it prepares to receive frames and is unable to send any data frames during this loop circuit. If the loop circuit is left open indefinitely,
the half-duplex port can never send any data frames. If a half-duplex port opens the loop circuit, it opens a half-duplex circuit preventing the open recipient from sending data frames.
Even if both NL_Ports are capable of full-duplex operation, they still may not behave as expected if the loop circuit is left open. While a port may be capable of sending or receiving data
frames during a loop circuit, it may not be capable of supporting data transfers in both directions during the same loop circuit. This can occur if the port has single data-transfer function
(such as a direct memory access, or DMA) that is initialized on a per-circuit basis.
The problem an NL_Port encounters on a two-ported loop is that there is no way to determine
the capabilities of the other port. Consequently, most arbitrated loop ports default to opening
and closing loop circuits as required.
Because of the ambiguity concerning the capabilities of the other port, a loop port may attempt
to operate in point-to-point mode when there are only two ports on the loop. Therefore the decision to attempt point-to-point mode operation is more about determining the capabilities of
the other port than the overhead of the loop protocols.
To determine if the other port is capable of non-loop mode operation, a node port may begin a
new loop initialization by transmitting the Loop Initialization Primitive sequence (LIP). When it
receives LIP, the port knows the other port has entered the initialization process. The node
port may then transmit the Offline Sequence (OLS) to begin non-loop initialization (starting a
new loop initialization is necessary because OLS is only recognized by a loop port during the
loop initialization process).
If there is only one other port on the loop and that port is non-loop capable, it responds to OLS
by transmitting Link Reset (LR). The node port responds to LR by transmitting Link Reset Response (LRR). The other port then transmits idles and the node port responds by also transmitting idles completing the point-to-point mode initialization. At this point the node port can
assume N_Port behavior and perform fabric login (FLOGI).
If there is more than one other port on the loop, but that port was not detected for some reason
(e.g., one or more loop ports in non-participating mode), the point-to-point initialization will not
be successful.
When the loop port restarts loop initialization and transmits the Offline Sequence (OLS), the
next port on the loop responds to OLS by sending Link Reset (LR), but the third port does not
recognize LR while in the loop initialization process. The port that is transmitting OLS times
out waiting for LR and assumes point-to-point mode is not supported by this configuration. It
may then begin a third loop initialization to return to arbitrated loop mode. This initialization
should complete successfully with the same results as the first loop initialization
366
367
NL_Port Mode
Is this a Public
NL_Port?
NO
N_Port Mode
YES
Is the
Loop Map
Available?
NO
Send OPN to
AL_PA=x00
YES
NO
NO
Is
AL_PA=x00
Present?
YES
NO
P_RJT
for Class-ofService?
YES
YES
Another Class
Available?
NO
Point-to-Point
(Private NL_Port)
YES
YES
(F/NL Port)
Was
FLOGI
Successful?
ACCept
indicate N_Port?
NO
Fabric Behavior
(Public NL_Port)
State change registration with the Fabric Controller is not port-specific a port registers to be
notified of all state changes. When a port receives an RSCN, the RSCN contains one or more
addresses indicating ports that have had a state change event.
The RSCN recipient must examine the address of the affected port and determine if it is interested in the state of that port. If so, it may want to verify its current login state with the affected
port, if possible, or release resources associated with that port if the port is no longer accessible. If the port in not interested in the affected port, the RSCN notification is accepted, but no
further action is necessary.
369
Private NL_Port
Loop Map
Available?
Public NL_Port
Fabric N_Port
YES
NO
Register Port
Information
NO
Add Entries to Device
Map
YES
Add (merge) Entry to
Device Map
YES
YES
More
AL_PAs to Do?
NO
YES
Port a Public
NL_Port?
Want
to Discover
Private
NO
NO
Discovery Complete
Some ports do not support building the loop map. If any port on the loop does not support this
procedure, no loop map is available. In this case, a port may attempt to discover other ports on
the loop by scanning all possible loop addresses (somewhat analogous to scanning a SCSI
bus to detect attached devices).
The standard does not specify how a loop port discovers other ports on the same loop when
no loop map is available. One possible approach is for a port to win arbitration and attempt to
open a loop circuit with one of the AL_PAs. If the open is successful, a port has been discovered and represents a device that may be accessed. If the open is unsuccessful, no device exists at that AL_PA and scanning can proceed to the next AL_PA.
Ports operating in an environment based on device discovery need to make information regarding discovered ports available to the operating system. This is normally done by device
driver software written specifically for that port and operating system combination.
Device Discovery in a Fabric Topology. Discovering other ports in a fabric topology is not
as simple as looking at a loop map or scanning allowed addresses. The fabric provides a 24bit address space with over 16 million possible addresses. Scanning is simply not practical. In
this case, devices are normally discovered by querying the Fibre Channel Name Server (a
sub-function of the Directory Server).
N_Ports and public NL_Ports login with the fabric and should register information with the
Name Server. Because some NL_Ports implementations did not register information with the
Name Server, many fabrics automatically register information during the fabric login process
(this behavior is not required by the standards).
Because private NL_Ports do not login with the fabric, the Name Server may not contain information about private ports. In this case, public NL_Ports may need to use both the loop map,
or scanning, and the Name Server to discover all devices. When both methods are used, the
port must ensure it does not duplicate information when a port is discovered by both methods.
371
support of the SCSI protocol. If zoning is in effect (see Zoning on page 14), information returned by the Name Server is limited to other ports within the same zone(s) as the requestor.
Node ports must perform port login (PLOGI) with the Name Server before they can register or
retrieve information from the Name Server database. When a port completes its registration or
query operations, it should log out with the Name Server to free up login-related resources.
Registered information is maintained in the Name Server after the logout as long as the associated port is still accessible by the fabric.
The standard allows either port to initiate the PLOGI operation, or both ports could simultaneously attempt to login with each other. If this occurs, one of the ports will accept the PLOGI
and the other will send LS_RJT with a reason code of command already in progress. The decision to accept or reject the login is based on the Port_Names of the two node ports.
Some protocols may specify which node port initiates the N_Port login (PLOGI) extended link
service. For example, the SCSI-FCP protocol assumes the SCSI initiator will originate the
PLOGI and the SCSI target waits for that to occur. This allows the initiator to determine which
ports it wishes to communicate with and initiate login with only those ports.
Fabric Login
different steps:
Link Initialization and port mode determination
Fabric login (FLOGI)
Registering to receive state change notifications (SCR)
Registering to receive link incident records
Registering with the Name Server
Querying the Name Server
Logging-in with other node ports (PLOGI)
Performing Process Login (PRLI)
Performing protocol-specific actions
fabric
Fabric login also assigns a ports address
All 24-bits for an N_Port
Upper 16-bits for an NL_Port (least significant 8 bits are the AL_PA acquired during
loop initialization)
Fabric login is mandatory for N_Ports
Fabric login is optional for NL_Ports
NL_Port that does not perform fabric login is
called a private NL_Port
NL_Port that does perform fabric login is
called a public NL_Port
Link Initialization
Chapter Summary
373
Port/Device Discovery
available devices
Most SCSI environments use a discovery
process
The means to discover devices depends on
the Fibre Channel topology
In point-to-point discovery is trivial
In an arbitrated loop ports may use the loop
map (if available) or scan the loop
In a fabric environment, ports are discovered
by querying the Name Server
specific information
For example, support for use of optional
information units
Each FC-4 specifies if Process Login is used,
and if so, for what purpose
Process Login is required by the SCSI_FCP
protocol mapping
Protocol-Specific Actions
actions
SCSI initiators may send an INQUIRY command to determine the device class
FICON channels establish logical paths with
the attach control units
374