sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget*/translations/zh_CN/scsi/scsi_fc_transportmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/zh_TW/scsi/scsi_fc_transportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/it_IT/scsi/scsi_fc_transportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ja_JP/scsi/scsi_fc_transportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ko_KR/scsi/scsi_fc_transportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/sp_SP/scsi/scsi_fc_transportmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhD/var/lib/git/docbuild/linux/Documentation/scsi/scsi_fc_transport.rsthKubhsection)}(hhh](htitle)}(hSCSI FC Transporth]hSCSI FC Transport}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hDate: 11/18/2008h]hDate: 11/18/2008}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hKernel Revisions for features::h]hKernel Revisions for features:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh literal_block)}(h=rports : <> vports : 2.6.22 bsg support : 2.6.30 (?TBD?)h]h=rports : <> vports : 2.6.22 bsg support : 2.6.30 (?TBD?)}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhK hhhhubh)}(hhh](h)}(h Introductionh]h Introduction}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hThis file documents the features and components of the SCSI FC Transport. It also provides documents the API between the transport and FC LLDDs.h]hThis file documents the features and components of the SCSI FC Transport. It also provides documents the API between the transport and FC LLDDs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h"The FC transport can be found at::h]h!The FC transport can be found at:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h{drivers/scsi/scsi_transport_fc.c include/scsi/scsi_transport_fc.h include/scsi/scsi_netlink_fc.h include/scsi/scsi_bsg_fc.hh]h{drivers/scsi/scsi_transport_fc.c include/scsi/scsi_transport_fc.h include/scsi/scsi_netlink_fc.h include/scsi/scsi_bsg_fc.h}hj$sbah}(h]h ]h"]h$]h&]hhuh1hhhhKhhhhubh)}(h>This file is found at Documentation/scsi/scsi_fc_transport.rsth]h>This file is found at Documentation/scsi/scsi_fc_transport.rst}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h] introductionah ]h"] introductionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hFC Remote Ports (rports)h]hFC Remote Ports (rports)}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhhhhhK ubh)}(h<< To Be Supplied >>h]h<< To Be Supplied >>}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjHhhubeh}(h]fc-remote-ports-rportsah ]h"]fc remote ports (rports)ah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hFC Virtual Ports (vports)h]hFC Virtual Ports (vports)}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohhhhhK%ubh)}(hhh](h)}(hOverviewh]hOverview}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK(ubh block_quote)}(hX New FC standards have defined mechanisms which allows for a single physical port to appear on as multiple communication ports. Using the N_Port Id Virtualization (NPIV) mechanism, a point-to-point connection to a Fabric can be assigned more than 1 N_Port_ID. Each N_Port_ID appears as a separate port to other endpoints on the fabric, even though it shares one physical link to the switch for communication. Each N_Port_ID can have a unique view of the fabric based on fabric zoning and array lun-masking (just like a normal non-NPIV adapter). Using the Virtual Fabric (VF) mechanism, adding a fabric header to each frame allows the port to interact with the Fabric Port to join multiple fabrics. The port will obtain an N_Port_ID on each fabric it joins. Each fabric will have its own unique view of endpoints and configuration parameters. NPIV may be used together with VF so that the port can obtain multiple N_Port_IDs on each virtual fabric. The FC transport is now recognizing a new object - a vport. A vport is an entity that has a world-wide unique World Wide Port Name (wwpn) and World Wide Node Name (wwnn). The transport also allows for the FC4's to be specified for the vport, with FCP_Initiator being the primary role expected. Once instantiated by one of the above methods, it will have a distinct N_Port_ID and view of fabric endpoints and storage entities. The fc_host associated with the physical adapter will export the ability to create vports. The transport will create the vport object within the Linux device tree, and instruct the fc_host's driver to instantiate the virtual port. Typically, the driver will create a new scsi_host instance on the vport, resulting in a unique namespace for the vport. Thus, whether a FC port is based on a physical port or on a virtual port, each will appear as a unique scsi_host with its own target and lun space. .. Note:: At this time, the transport is written to create only NPIV-based vports. However, consideration was given to VF-based vports and it should be a minor change to add support if needed. The remaining discussion will concentrate on NPIV. .. Note:: World Wide Name assignment (and uniqueness guarantees) are left up to an administrative entity controlling the vport. For example, if vports are to be associated with virtual machines, a XEN mgmt utility would be responsible for creating wwpn/wwnn's for the vport, using its own naming authority and OUI. (Note: it already does this for virtual MAC addresses). h](h)}(hXNew FC standards have defined mechanisms which allows for a single physical port to appear on as multiple communication ports. Using the N_Port Id Virtualization (NPIV) mechanism, a point-to-point connection to a Fabric can be assigned more than 1 N_Port_ID. Each N_Port_ID appears as a separate port to other endpoints on the fabric, even though it shares one physical link to the switch for communication. Each N_Port_ID can have a unique view of the fabric based on fabric zoning and array lun-masking (just like a normal non-NPIV adapter). Using the Virtual Fabric (VF) mechanism, adding a fabric header to each frame allows the port to interact with the Fabric Port to join multiple fabrics. The port will obtain an N_Port_ID on each fabric it joins. Each fabric will have its own unique view of endpoints and configuration parameters. NPIV may be used together with VF so that the port can obtain multiple N_Port_IDs on each virtual fabric.h]hXNew FC standards have defined mechanisms which allows for a single physical port to appear on as multiple communication ports. Using the N_Port Id Virtualization (NPIV) mechanism, a point-to-point connection to a Fabric can be assigned more than 1 N_Port_ID. Each N_Port_ID appears as a separate port to other endpoints on the fabric, even though it shares one physical link to the switch for communication. Each N_Port_ID can have a unique view of the fabric based on fabric zoning and array lun-masking (just like a normal non-NPIV adapter). Using the Virtual Fabric (VF) mechanism, adding a fabric header to each frame allows the port to interact with the Fabric Port to join multiple fabrics. The port will obtain an N_Port_ID on each fabric it joins. Each fabric will have its own unique view of endpoints and configuration parameters. NPIV may be used together with VF so that the port can obtain multiple N_Port_IDs on each virtual fabric.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjubh)}(hXThe FC transport is now recognizing a new object - a vport. A vport is an entity that has a world-wide unique World Wide Port Name (wwpn) and World Wide Node Name (wwnn). The transport also allows for the FC4's to be specified for the vport, with FCP_Initiator being the primary role expected. Once instantiated by one of the above methods, it will have a distinct N_Port_ID and view of fabric endpoints and storage entities. The fc_host associated with the physical adapter will export the ability to create vports. The transport will create the vport object within the Linux device tree, and instruct the fc_host's driver to instantiate the virtual port. Typically, the driver will create a new scsi_host instance on the vport, resulting in a unique namespace for the vport. Thus, whether a FC port is based on a physical port or on a virtual port, each will appear as a unique scsi_host with its own target and lun space.h]hXThe FC transport is now recognizing a new object - a vport. A vport is an entity that has a world-wide unique World Wide Port Name (wwpn) and World Wide Node Name (wwnn). The transport also allows for the FC4’s to be specified for the vport, with FCP_Initiator being the primary role expected. Once instantiated by one of the above methods, it will have a distinct N_Port_ID and view of fabric endpoints and storage entities. The fc_host associated with the physical adapter will export the ability to create vports. The transport will create the vport object within the Linux device tree, and instruct the fc_host’s driver to instantiate the virtual port. Typically, the driver will create a new scsi_host instance on the vport, resulting in a unique namespace for the vport. Thus, whether a FC port is based on a physical port or on a virtual port, each will appear as a unique scsi_host with its own target and lun space.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjubhnote)}(hAt this time, the transport is written to create only NPIV-based vports. However, consideration was given to VF-based vports and it should be a minor change to add support if needed. The remaining discussion will concentrate on NPIV.h]h)}(hAt this time, the transport is written to create only NPIV-based vports. However, consideration was given to VF-based vports and it should be a minor change to add support if needed. The remaining discussion will concentrate on NPIV.h]hAt this time, the transport is written to create only NPIV-based vports. However, consideration was given to VF-based vports and it should be a minor change to add support if needed. The remaining discussion will concentrate on NPIV.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKHhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hXhWorld Wide Name assignment (and uniqueness guarantees) are left up to an administrative entity controlling the vport. For example, if vports are to be associated with virtual machines, a XEN mgmt utility would be responsible for creating wwpn/wwnn's for the vport, using its own naming authority and OUI. (Note: it already does this for virtual MAC addresses).h]h)}(hXhWorld Wide Name assignment (and uniqueness guarantees) are left up to an administrative entity controlling the vport. For example, if vports are to be associated with virtual machines, a XEN mgmt utility would be responsible for creating wwpn/wwnn's for the vport, using its own naming authority and OUI. (Note: it already does this for virtual MAC addresses).h]hXjWorld Wide Name assignment (and uniqueness guarantees) are left up to an administrative entity controlling the vport. For example, if vports are to be associated with virtual machines, a XEN mgmt utility would be responsible for creating wwpn/wwnn’s for the vport, using its own naming authority and OUI. (Note: it already does this for virtual MAC addresses).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK*hjhhubeh}(h]overviewah ]h"]overviewah$]h&]uh1hhjohhhhhK(ubh)}(hhh](h)}(hDevice Trees and Vport Objects:h]hDevice Trees and Vport Objects:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKWubj)}(hX_Today, the device tree typically contains the scsi_host object, with rports and scsi target objects underneath it. Currently the FC transport creates the vport object and places it under the scsi_host object corresponding to the physical adapter. The LLDD will allocate a new scsi_host for the vport and link its object under the vport. The remainder of the tree under the vports scsi_host is the same as the non-NPIV case. The transport is written currently to easily allow the parent of the vport to be something other than the scsi_host. This could be used in the future to link the object onto a vm-specific device tree. If the vport's parent is not the physical port's scsi_host, a symbolic link to the vport object will be placed in the physical port's scsi_host. Here's what to expect in the device tree : The typical Physical Port's Scsi_Host:: /sys/devices/.../host17/ and it has the typical descendant tree:: /sys/devices/.../host17/rport-17:0-0/target17:0:0/17:0:0:0: and then the vport is created on the Physical Port:: /sys/devices/.../host17/vport-17:0-0 and the vport's Scsi_Host is then created:: /sys/devices/.../host17/vport-17:0-0/host18 and then the rest of the tree progresses, such as:: /sys/devices/.../host17/vport-17:0-0/host18/rport-18:0-0/target18:0:0/18:0:0:0: Here's what to expect in the sysfs tree:: scsi_hosts: /sys/class/scsi_host/host17 physical port's scsi_host /sys/class/scsi_host/host18 vport's scsi_host fc_hosts: /sys/class/fc_host/host17 physical port's fc_host /sys/class/fc_host/host18 vport's fc_host fc_vports: /sys/class/fc_vports/vport-17:0-0 the vport's fc_vport fc_rports: /sys/class/fc_remote_ports/rport-17:0-0 rport on the physical port /sys/class/fc_remote_ports/rport-18:0-0 rport on the vport h](h)}(hXToday, the device tree typically contains the scsi_host object, with rports and scsi target objects underneath it. Currently the FC transport creates the vport object and places it under the scsi_host object corresponding to the physical adapter. The LLDD will allocate a new scsi_host for the vport and link its object under the vport. The remainder of the tree under the vports scsi_host is the same as the non-NPIV case. The transport is written currently to easily allow the parent of the vport to be something other than the scsi_host. This could be used in the future to link the object onto a vm-specific device tree. If the vport's parent is not the physical port's scsi_host, a symbolic link to the vport object will be placed in the physical port's scsi_host.h]hXToday, the device tree typically contains the scsi_host object, with rports and scsi target objects underneath it. Currently the FC transport creates the vport object and places it under the scsi_host object corresponding to the physical adapter. The LLDD will allocate a new scsi_host for the vport and link its object under the vport. The remainder of the tree under the vports scsi_host is the same as the non-NPIV case. The transport is written currently to easily allow the parent of the vport to be something other than the scsi_host. This could be used in the future to link the object onto a vm-specific device tree. If the vport’s parent is not the physical port’s scsi_host, a symbolic link to the vport object will be placed in the physical port’s scsi_host.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhjubh)}(h*Here's what to expect in the device tree :h]h,Here’s what to expect in the device tree :}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjubj)}(hXThe typical Physical Port's Scsi_Host:: /sys/devices/.../host17/ and it has the typical descendant tree:: /sys/devices/.../host17/rport-17:0-0/target17:0:0/17:0:0:0: and then the vport is created on the Physical Port:: /sys/devices/.../host17/vport-17:0-0 and the vport's Scsi_Host is then created:: /sys/devices/.../host17/vport-17:0-0/host18 and then the rest of the tree progresses, such as:: /sys/devices/.../host17/vport-17:0-0/host18/rport-18:0-0/target18:0:0/18:0:0:0: h](h)}(h'The typical Physical Port's Scsi_Host::h]h(The typical Physical Port’s Scsi_Host:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhj$ubh)}(h/sys/devices/.../host17/h]h/sys/devices/.../host17/}hj6sbah}(h]h ]h"]h$]h&]hhuh1hhhhKjhj$ubh)}(h(and it has the typical descendant tree::h]h'and it has the typical descendant tree:}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhj$ubh)}(h;/sys/devices/.../host17/rport-17:0-0/target17:0:0/17:0:0:0:h]h;/sys/devices/.../host17/rport-17:0-0/target17:0:0/17:0:0:0:}hjRsbah}(h]h ]h"]h$]h&]hhuh1hhhhKnhj$ubh)}(h4and then the vport is created on the Physical Port::h]h3and then the vport is created on the Physical Port:}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphj$ubh)}(h$/sys/devices/.../host17/vport-17:0-0h]h$/sys/devices/.../host17/vport-17:0-0}hjnsbah}(h]h ]h"]h$]h&]hhuh1hhhhKrhj$ubh)}(h+and the vport's Scsi_Host is then created::h]h,and the vport’s Scsi_Host is then created:}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthj$ubh)}(h+/sys/devices/.../host17/vport-17:0-0/host18h]h+/sys/devices/.../host17/vport-17:0-0/host18}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhKvhj$ubh)}(h3and then the rest of the tree progresses, such as::h]h2and then the rest of the tree progresses, such as:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhj$ubh)}(hO/sys/devices/.../host17/vport-17:0-0/host18/rport-18:0-0/target18:0:0/18:0:0:0:h]hO/sys/devices/.../host17/vport-17:0-0/host18/rport-18:0-0/target18:0:0/18:0:0:0:}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhKzhj$ubeh}(h]h ]h"]h$]h&]uh1jhhhKhhjubh)}(h)Here's what to expect in the sysfs tree::h]h*Here’s what to expect in the sysfs tree:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hjubh)}(hXscsi_hosts: /sys/class/scsi_host/host17 physical port's scsi_host /sys/class/scsi_host/host18 vport's scsi_host fc_hosts: /sys/class/fc_host/host17 physical port's fc_host /sys/class/fc_host/host18 vport's fc_host fc_vports: /sys/class/fc_vports/vport-17:0-0 the vport's fc_vport fc_rports: /sys/class/fc_remote_ports/rport-17:0-0 rport on the physical port /sys/class/fc_remote_ports/rport-18:0-0 rport on the vporth]hXscsi_hosts: /sys/class/scsi_host/host17 physical port's scsi_host /sys/class/scsi_host/host18 vport's scsi_host fc_hosts: /sys/class/fc_host/host17 physical port's fc_host /sys/class/fc_host/host18 vport's fc_host fc_vports: /sys/class/fc_vports/vport-17:0-0 the vport's fc_vport fc_rports: /sys/class/fc_remote_ports/rport-17:0-0 rport on the physical port /sys/class/fc_remote_ports/rport-18:0-0 rport on the vport}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhK~hjubeh}(h]h ]h"]h$]h&]uh1jhhhKYhjhhubeh}(h]device-trees-and-vport-objectsah ]h"]device trees and vport objects:ah$]h&]uh1hhjohhhhhKWubh)}(hhh](h)}(hVport Attributesh]hVport Attributes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(hX The new fc_vport class object has the following attributes node_name: Read_Only The WWNN of the vport port_name: Read_Only The WWPN of the vport roles: Read_Only Indicates the FC4 roles enabled on the vport. symbolic_name: Read_Write A string, appended to the driver's symbolic port name string, which is registered with the switch to identify the vport. For example, a hypervisor could set this string to "Xen Domain 2 VM 5 Vport 2", and this set of identifiers can be seen on switch management screens to identify the port. vport_delete: Write_Only When written with a "1", will tear down the vport. vport_disable: Write_Only When written with a "1", will transition the vport to a disabled. state. The vport will still be instantiated with the Linux kernel, but it will not be active on the FC link. When written with a "0", will enable the vport. vport_last_state: Read_Only Indicates the previous state of the vport. See the section below on "Vport States". vport_state: Read_Only Indicates the state of the vport. See the section below on "Vport States". vport_type: Read_Only Reflects the FC mechanism used to create the virtual port. Only NPIV is supported currently. For the fc_host class object, the following attributes are added for vports: max_npiv_vports: Read_Only Indicates the maximum number of NPIV-based vports that the driver/adapter can support on the fc_host. npiv_vports_inuse: Read_Only Indicates how many NPIV-based vports have been instantiated on the fc_host. vport_create: Write_Only A "simple" create interface to instantiate a vport on an fc_host. A ":" string is written to the attribute. The transport then instantiates the vport object and calls the LLDD to create the vport with the role of FCP_Initiator. Each WWN is specified as 16 hex characters and may *not* contain any prefixes (e.g. 0x, x, etc). vport_delete: Write_Only A "simple" delete interface to teardown a vport. A ":" string is written to the attribute. The transport will locate the vport on the fc_host with the same WWNs and tear it down. Each WWN is specified as 16 hex characters and may *not* contain any prefixes (e.g. 0x, x, etc). h](h)}(h:The new fc_vport class object has the following attributesh]h:The new fc_vport class object has the following attributes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hX.node_name: Read_Only The WWNN of the vport port_name: Read_Only The WWPN of the vport roles: Read_Only Indicates the FC4 roles enabled on the vport. symbolic_name: Read_Write A string, appended to the driver's symbolic port name string, which is registered with the switch to identify the vport. For example, a hypervisor could set this string to "Xen Domain 2 VM 5 Vport 2", and this set of identifiers can be seen on switch management screens to identify the port. vport_delete: Write_Only When written with a "1", will tear down the vport. vport_disable: Write_Only When written with a "1", will transition the vport to a disabled. state. The vport will still be instantiated with the Linux kernel, but it will not be active on the FC link. When written with a "0", will enable the vport. vport_last_state: Read_Only Indicates the previous state of the vport. See the section below on "Vport States". vport_state: Read_Only Indicates the state of the vport. See the section below on "Vport States". vport_type: Read_Only Reflects the FC mechanism used to create the virtual port. Only NPIV is supported currently. h]hdefinition_list)}(hhh](hdefinition_list_item)}(h[node_name: Read_Only The WWNN of the vport h](hterm)}(hDnode_name: Read_Onlyh]hDnode_name: Read_Only}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh definition)}(hhh]h)}(hThe WWNN of the vporth]hThe WWNN of the vport}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj(ubah}(h]h ]h"]h$]h&]uh1j&hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(h[port_name: Read_Only The WWPN of the vport h](j)}(hDport_name: Read_Onlyh]hDport_name: Read_Only}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjEubj')}(hhh]h)}(hThe WWPN of the vporth]hThe WWPN of the vport}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjWubah}(h]h ]h"]h$]h&]uh1j&hjEubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hsroles: Read_Only Indicates the FC4 roles enabled on the vport. h](j)}(hDroles: Read_Onlyh]hDroles: Read_Only}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjtubj')}(hhh]h)}(h-Indicates the FC4 roles enabled on the vport.h]h-Indicates the FC4 roles enabled on the vport.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j&hjtubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hXjsymbolic_name: Read_Write A string, appended to the driver's symbolic port name string, which is registered with the switch to identify the vport. For example, a hypervisor could set this string to "Xen Domain 2 VM 5 Vport 2", and this set of identifiers can be seen on switch management screens to identify the port. h](j)}(hEsymbolic_name: Read_Writeh]hEsymbolic_name: Read_Write}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj')}(hhh]h)}(hX#A string, appended to the driver's symbolic port name string, which is registered with the switch to identify the vport. For example, a hypervisor could set this string to "Xen Domain 2 VM 5 Vport 2", and this set of identifiers can be seen on switch management screens to identify the port.h]hX)A string, appended to the driver’s symbolic port name string, which is registered with the switch to identify the vport. For example, a hypervisor could set this string to “Xen Domain 2 VM 5 Vport 2”, and this set of identifiers can be seen on switch management screens to identify the port.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j&hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hyvport_delete: Write_Only When written with a "1", will tear down the vport. h](j)}(hEvport_delete: Write_Onlyh]hEvport_delete: Write_Only}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj')}(hhh]h)}(h2When written with a "1", will tear down the vport.h]h6When written with a “1”, will tear down the vport.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j&hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hX&vport_disable: Write_Only When written with a "1", will transition the vport to a disabled. state. The vport will still be instantiated with the Linux kernel, but it will not be active on the FC link. When written with a "0", will enable the vport. h](j)}(hEvport_disable: Write_Onlyh]hEvport_disable: Write_Only}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj')}(hhh]h)}(hWhen written with a "1", will transition the vport to a disabled. state. The vport will still be instantiated with the Linux kernel, but it will not be active on the FC link. When written with a "0", will enable the vport.h]hWhen written with a “1”, will transition the vport to a disabled. state. The vport will still be instantiated with the Linux kernel, but it will not be active on the FC link. When written with a “0”, will enable the vport.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j&hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hvport_last_state: Read_Only Indicates the previous state of the vport. See the section below on "Vport States". h](j)}(hDvport_last_state: Read_Onlyh]hDvport_last_state: Read_Only}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj0ubj')}(hhh]h)}(hTIndicates the previous state of the vport. See the section below on "Vport States".h]hXIndicates the previous state of the vport. See the section below on “Vport States”.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjBubah}(h]h ]h"]h$]h&]uh1j&hj0ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hvport_state: Read_Only Indicates the state of the vport. See the section below on "Vport States". h](j)}(hDvport_state: Read_Onlyh]hDvport_state: Read_Only}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj_ubj')}(hhh]h)}(hKIndicates the state of the vport. See the section below on "Vport States".h]hOIndicates the state of the vport. See the section below on “Vport States”.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjqubah}(h]h ]h"]h$]h&]uh1j&hj_ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hvport_type: Read_Only Reflects the FC mechanism used to create the virtual port. Only NPIV is supported currently. h](j)}(hDvport_type: Read_Onlyh]hDvport_type: Read_Only}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj')}(hhh]h)}(h\Reflects the FC mechanism used to create the virtual port. Only NPIV is supported currently.h]h\Reflects the FC mechanism used to create the virtual port. Only NPIV is supported currently.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j&hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubeh}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh)}(hLFor the fc_host class object, the following attributes are added for vports:h]hLFor the fc_host class object, the following attributes are added for vports:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hX`max_npiv_vports: Read_Only Indicates the maximum number of NPIV-based vports that the driver/adapter can support on the fc_host. npiv_vports_inuse: Read_Only Indicates how many NPIV-based vports have been instantiated on the fc_host. vport_create: Write_Only A "simple" create interface to instantiate a vport on an fc_host. A ":" string is written to the attribute. The transport then instantiates the vport object and calls the LLDD to create the vport with the role of FCP_Initiator. Each WWN is specified as 16 hex characters and may *not* contain any prefixes (e.g. 0x, x, etc). vport_delete: Write_Only A "simple" delete interface to teardown a vport. A ":" string is written to the attribute. The transport will locate the vport on the fc_host with the same WWNs and tear it down. Each WWN is specified as 16 hex characters and may *not* contain any prefixes (e.g. 0x, x, etc). h]j )}(hhh](j)}(hmax_npiv_vports: Read_Only Indicates the maximum number of NPIV-based vports that the driver/adapter can support on the fc_host. h](j)}(hDmax_npiv_vports: Read_Onlyh]hDmax_npiv_vports: Read_Only}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj')}(hhh]h)}(heIndicates the maximum number of NPIV-based vports that the driver/adapter can support on the fc_host.h]heIndicates the maximum number of NPIV-based vports that the driver/adapter can support on the fc_host.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j&hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hnpiv_vports_inuse: Read_Only Indicates how many NPIV-based vports have been instantiated on the fc_host. h](j)}(hDnpiv_vports_inuse: Read_Onlyh]hDnpiv_vports_inuse: Read_Only}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj')}(hhh]h)}(hKIndicates how many NPIV-based vports have been instantiated on the fc_host.h]hKIndicates how many NPIV-based vports have been instantiated on the fc_host.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j&hj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hXvport_create: Write_Only A "simple" create interface to instantiate a vport on an fc_host. A ":" string is written to the attribute. The transport then instantiates the vport object and calls the LLDD to create the vport with the role of FCP_Initiator. Each WWN is specified as 16 hex characters and may *not* contain any prefixes (e.g. 0x, x, etc). h](j)}(hEvport_create: Write_Onlyh]hEvport_create: Write_Only}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj<ubj')}(hhh]h)}(hXQA "simple" create interface to instantiate a vport on an fc_host. A ":" string is written to the attribute. The transport then instantiates the vport object and calls the LLDD to create the vport with the role of FCP_Initiator. Each WWN is specified as 16 hex characters and may *not* contain any prefixes (e.g. 0x, x, etc).h](hX,A “simple” create interface to instantiate a vport on an fc_host. A “:” string is written to the attribute. The transport then instantiates the vport object and calls the LLDD to create the vport with the role of FCP_Initiator. Each WWN is specified as 16 hex characters and may }(hjQhhhNhNubhemphasis)}(h*not*h]hnot}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jYhjQubh( contain any prefixes (e.g. 0x, x, etc).}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjNubah}(h]h ]h"]h$]h&]uh1j&hj<ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hXhvport_delete: Write_Only A "simple" delete interface to teardown a vport. A ":" string is written to the attribute. The transport will locate the vport on the fc_host with the same WWNs and tear it down. Each WWN is specified as 16 hex characters and may *not* contain any prefixes (e.g. 0x, x, etc). h](j)}(hEvport_delete: Write_Onlyh]hEvport_delete: Write_Only}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj')}(hhh]h)}(hX A "simple" delete interface to teardown a vport. A ":" string is written to the attribute. The transport will locate the vport on the fc_host with the same WWNs and tear it down. Each WWN is specified as 16 hex characters and may *not* contain any prefixes (e.g. 0x, x, etc).h](hA “simple” delete interface to teardown a vport. A “:” string is written to the attribute. The transport will locate the vport on the fc_host with the same WWNs and tear it down. Each WWN is specified as 16 hex characters and may }(hjhhhNhNubjZ)}(h*not*h]hnot}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jYhjubh( contain any prefixes (e.g. 0x, x, etc).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j&hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]vport-attributesah ]h"]vport attributesah$]h&]uh1hhjohhhhhKubh)}(hhh](h)}(h Vport Statesh]h Vport States}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(hXVport instantiation consists of two parts: - Creation with the kernel and LLDD. This means all transport and driver data structures are built up, and device objects created. This is equivalent to a driver "attach" on an adapter, which is independent of the adapter's link state. - Instantiation of the vport on the FC link via ELS traffic, etc. This is equivalent to a "link up" and successful link initialization. Further information can be found in the interfaces section below for Vport Creation. Once a vport has been instantiated with the kernel/LLDD, a vport state can be reported via the sysfs attribute. The following states exist: FC_VPORT_UNKNOWN - Unknown An temporary state, typically set only while the vport is being instantiated with the kernel and LLDD. FC_VPORT_ACTIVE - Active The vport has been successfully been created on the FC link. It is fully functional. FC_VPORT_DISABLED - Disabled The vport instantiated, but "disabled". The vport is not instantiated on the FC link. This is equivalent to a physical port with the link "down". FC_VPORT_LINKDOWN - Linkdown The vport is not operational as the physical link is not operational. FC_VPORT_INITIALIZING - Initializing The vport is in the process of instantiating on the FC link. The LLDD will set this state just prior to starting the ELS traffic to create the vport. This state will persist until the vport is successfully created (state becomes FC_VPORT_ACTIVE) or it fails (state is one of the values below). As this state is transitory, it will not be preserved in the "vport_last_state". FC_VPORT_NO_FABRIC_SUPP - No Fabric Support The vport is not operational. One of the following conditions were encountered: - The FC topology is not Point-to-Point - The FC port is not connected to an F_Port - The F_Port has indicated that NPIV is not supported. FC_VPORT_NO_FABRIC_RSCS - No Fabric Resources The vport is not operational. The Fabric failed FDISC with a status indicating that it does not have sufficient resources to complete the operation. FC_VPORT_FABRIC_LOGOUT - Fabric Logout The vport is not operational. The Fabric has LOGO'd the N_Port_ID associated with the vport. FC_VPORT_FABRIC_REJ_WWN - Fabric Rejected WWN The vport is not operational. The Fabric failed FDISC with a status indicating that the WWN's are not valid. FC_VPORT_FAILED - VPort Failed The vport is not operational. This is a catchall for all other error conditions. The following state table indicates the different state transitions: +------------------+--------------------------------+---------------------+ | State | Event | New State | +==================+================================+=====================+ | n/a | Initialization | Unknown | +------------------+--------------------------------+---------------------+ | Unknown: | Link Down | Linkdown | | +--------------------------------+---------------------+ | | Link Up & Loop | No Fabric Support | | +--------------------------------+---------------------+ | | Link Up & no Fabric | No Fabric Support | | +--------------------------------+---------------------+ | | Link Up & FLOGI response | No Fabric Support | | | indicates no NPIV support | | | +--------------------------------+---------------------+ | | Link Up & FDISC being sent | Initializing | | +--------------------------------+---------------------+ | | Disable request | Disable | +------------------+--------------------------------+---------------------+ | Linkdown: | Link Up | Unknown | +------------------+--------------------------------+---------------------+ | Initializing: | FDISC ACC | Active | | +--------------------------------+---------------------+ | | FDISC LS_RJT w/ no resources | No Fabric Resources | | +--------------------------------+---------------------+ | | FDISC LS_RJT w/ invalid | Fabric Rejected WWN | | | pname or invalid nport_id | | | +--------------------------------+---------------------+ | | FDISC LS_RJT failed for | Vport Failed | | | other reasons | | | +--------------------------------+---------------------+ | | Link Down | Linkdown | | +--------------------------------+---------------------+ | | Disable request | Disable | +------------------+--------------------------------+---------------------+ | Disable: | Enable request | Unknown | +------------------+--------------------------------+---------------------+ | Active: | LOGO received from fabric | Fabric Logout | | +--------------------------------+---------------------+ | | Link Down | Linkdown | | +--------------------------------+---------------------+ | | Disable request | Disable | +------------------+--------------------------------+---------------------+ | Fabric Logout: | Link still up | Unknown | +------------------+--------------------------------+---------------------+ h](h)}(h*Vport instantiation consists of two parts:h]h*Vport instantiation consists of two parts:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hX|- Creation with the kernel and LLDD. This means all transport and driver data structures are built up, and device objects created. This is equivalent to a driver "attach" on an adapter, which is independent of the adapter's link state. - Instantiation of the vport on the FC link via ELS traffic, etc. This is equivalent to a "link up" and successful link initialization. h]h bullet_list)}(hhh](h list_item)}(hCreation with the kernel and LLDD. This means all transport and driver data structures are built up, and device objects created. This is equivalent to a driver "attach" on an adapter, which is independent of the adapter's link state.h]h)}(hCreation with the kernel and LLDD. This means all transport and driver data structures are built up, and device objects created. This is equivalent to a driver "attach" on an adapter, which is independent of the adapter's link state.h]hCreation with the kernel and LLDD. This means all transport and driver data structures are built up, and device objects created. This is equivalent to a driver “attach” on an adapter, which is independent of the adapter’s link state.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hInstantiation of the vport on the FC link via ELS traffic, etc. This is equivalent to a "link up" and successful link initialization. h]h)}(hInstantiation of the vport on the FC link via ELS traffic, etc. This is equivalent to a "link up" and successful link initialization.h]hInstantiation of the vport on the FC link via ELS traffic, etc. This is equivalent to a “link up” and successful link initialization.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bullet-uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh)}(hTFurther information can be found in the interfaces section below for Vport Creation.h]hTFurther information can be found in the interfaces section below for Vport Creation.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hOnce a vport has been instantiated with the kernel/LLDD, a vport state can be reported via the sysfs attribute. The following states exist:h]hOnce a vport has been instantiated with the kernel/LLDD, a vport state can be reported via the sysfs attribute. The following states exist:}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hXFC_VPORT_UNKNOWN - Unknown An temporary state, typically set only while the vport is being instantiated with the kernel and LLDD. FC_VPORT_ACTIVE - Active The vport has been successfully been created on the FC link. It is fully functional. FC_VPORT_DISABLED - Disabled The vport instantiated, but "disabled". The vport is not instantiated on the FC link. This is equivalent to a physical port with the link "down". FC_VPORT_LINKDOWN - Linkdown The vport is not operational as the physical link is not operational. FC_VPORT_INITIALIZING - Initializing The vport is in the process of instantiating on the FC link. The LLDD will set this state just prior to starting the ELS traffic to create the vport. This state will persist until the vport is successfully created (state becomes FC_VPORT_ACTIVE) or it fails (state is one of the values below). As this state is transitory, it will not be preserved in the "vport_last_state". FC_VPORT_NO_FABRIC_SUPP - No Fabric Support The vport is not operational. One of the following conditions were encountered: - The FC topology is not Point-to-Point - The FC port is not connected to an F_Port - The F_Port has indicated that NPIV is not supported. FC_VPORT_NO_FABRIC_RSCS - No Fabric Resources The vport is not operational. The Fabric failed FDISC with a status indicating that it does not have sufficient resources to complete the operation. FC_VPORT_FABRIC_LOGOUT - Fabric Logout The vport is not operational. The Fabric has LOGO'd the N_Port_ID associated with the vport. FC_VPORT_FABRIC_REJ_WWN - Fabric Rejected WWN The vport is not operational. The Fabric failed FDISC with a status indicating that the WWN's are not valid. FC_VPORT_FAILED - VPort Failed The vport is not operational. This is a catchall for all other error conditions. h]j )}(hhh](j)}(hFC_VPORT_UNKNOWN - Unknown An temporary state, typically set only while the vport is being instantiated with the kernel and LLDD. h](j)}(h%FC_VPORT_UNKNOWN - Unknownh]h%FC_VPORT_UNKNOWN - Unknown}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjiubj')}(hhh]h)}(hfAn temporary state, typically set only while the vport is being instantiated with the kernel and LLDD.h]hfAn temporary state, typically set only while the vport is being instantiated with the kernel and LLDD.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{ubah}(h]h ]h"]h$]h&]uh1j&hjiubeh}(h]h ]h"]h$]h&]uh1jhhhKhjfubj)}(hzFC_VPORT_ACTIVE - Active The vport has been successfully been created on the FC link. It is fully functional. h](j)}(h$FC_VPORT_ACTIVE - Activeh]h$FC_VPORT_ACTIVE - Active}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj')}(hhh]h)}(hTThe vport has been successfully been created on the FC link. It is fully functional.h]hTThe vport has been successfully been created on the FC link. It is fully functional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j&hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjfubj)}(hFC_VPORT_DISABLED - Disabled The vport instantiated, but "disabled". The vport is not instantiated on the FC link. This is equivalent to a physical port with the link "down". h](j)}(h&FC_VPORT_DISABLED - Disabledh]h&FC_VPORT_DISABLED - Disabled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj')}(hhh]h)}(hThe vport instantiated, but "disabled". The vport is not instantiated on the FC link. This is equivalent to a physical port with the link "down".h]hThe vport instantiated, but “disabled”. The vport is not instantiated on the FC link. This is equivalent to a physical port with the link “down”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j&hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjfubj)}(hmFC_VPORT_LINKDOWN - Linkdown The vport is not operational as the physical link is not operational. h](j)}(h&FC_VPORT_LINKDOWN - Linkdownh]h&FC_VPORT_LINKDOWN - Linkdown}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj')}(hhh]h)}(hEThe vport is not operational as the physical link is not operational.h]hEThe vport is not operational as the physical link is not operational.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j&hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjfubj)}(hXFC_VPORT_INITIALIZING - Initializing The vport is in the process of instantiating on the FC link. The LLDD will set this state just prior to starting the ELS traffic to create the vport. This state will persist until the vport is successfully created (state becomes FC_VPORT_ACTIVE) or it fails (state is one of the values below). As this state is transitory, it will not be preserved in the "vport_last_state". h](j)}(h*FC_VPORT_INITIALIZING - Initializingh]h*FC_VPORT_INITIALIZING - Initializing}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj%ubj')}(hhh]h)}(hXwThe vport is in the process of instantiating on the FC link. The LLDD will set this state just prior to starting the ELS traffic to create the vport. This state will persist until the vport is successfully created (state becomes FC_VPORT_ACTIVE) or it fails (state is one of the values below). As this state is transitory, it will not be preserved in the "vport_last_state".h]hX{The vport is in the process of instantiating on the FC link. The LLDD will set this state just prior to starting the ELS traffic to create the vport. This state will persist until the vport is successfully created (state becomes FC_VPORT_ACTIVE) or it fails (state is one of the values below). As this state is transitory, it will not be preserved in the “vport_last_state”.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj7ubah}(h]h ]h"]h$]h&]uh1j&hj%ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjfubj)}(hXFC_VPORT_NO_FABRIC_SUPP - No Fabric Support The vport is not operational. One of the following conditions were encountered: - The FC topology is not Point-to-Point - The FC port is not connected to an F_Port - The F_Port has indicated that NPIV is not supported. h](j)}(h/FC_VPORT_NO_FABRIC_SUPP - No Fabric Supporth]h/FC_VPORT_NO_FABRIC_SUPP - No Fabric Support}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjTubj')}(hhh](h)}(hOThe vport is not operational. One of the following conditions were encountered:h]hOThe vport is not operational. One of the following conditions were encountered:}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjfubj)}(h- The FC topology is not Point-to-Point - The FC port is not connected to an F_Port - The F_Port has indicated that NPIV is not supported. h]j)}(hhh](j)}(h%The FC topology is not Point-to-Pointh]h)}(hjh]h%The FC topology is not Point-to-Point}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj~ubah}(h]h ]h"]h$]h&]uh1jhj{ubj)}(h)The FC port is not connected to an F_Porth]h)}(hjh]h)The FC port is not connected to an F_Port}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj{ubj)}(h5The F_Port has indicated that NPIV is not supported. h]h)}(h4The F_Port has indicated that NPIV is not supported.h]h4The F_Port has indicated that NPIV is not supported.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj{ubeh}(h]h ]h"]h$]h&]j>j?uh1jhhhKhjwubah}(h]h ]h"]h$]h&]uh1jhhhKhjfubeh}(h]h ]h"]h$]h&]uh1j&hjTubeh}(h]h ]h"]h$]h&]uh1jhhhKhjfubj)}(hFC_VPORT_NO_FABRIC_RSCS - No Fabric Resources The vport is not operational. The Fabric failed FDISC with a status indicating that it does not have sufficient resources to complete the operation. h](j)}(h1FC_VPORT_NO_FABRIC_RSCS - No Fabric Resourcesh]h1FC_VPORT_NO_FABRIC_RSCS - No Fabric Resources}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj')}(hhh]h)}(hThe vport is not operational. The Fabric failed FDISC with a status indicating that it does not have sufficient resources to complete the operation.h]hThe vport is not operational. The Fabric failed FDISC with a status indicating that it does not have sufficient resources to complete the operation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j&hjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjfubj)}(hFC_VPORT_FABRIC_LOGOUT - Fabric Logout The vport is not operational. The Fabric has LOGO'd the N_Port_ID associated with the vport. h](j)}(h+FC_VPORT_FABRIC_LOGOUT - Fabric Logouth]h+FC_VPORT_FABRIC_LOGOUT - Fabric Logout}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubj')}(hhh]h)}(h\The vport is not operational. The Fabric has LOGO'd the N_Port_ID associated with the vport.h]h^The vport is not operational. The Fabric has LOGO’d the N_Port_ID associated with the vport.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j&hj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhjfubj)}(hFC_VPORT_FABRIC_REJ_WWN - Fabric Rejected WWN The vport is not operational. The Fabric failed FDISC with a status indicating that the WWN's are not valid. h](j)}(h1FC_VPORT_FABRIC_REJ_WWN - Fabric Rejected WWNh]h1FC_VPORT_FABRIC_REJ_WWN - Fabric Rejected WWN}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM hj:ubj')}(hhh]h)}(hlThe vport is not operational. The Fabric failed FDISC with a status indicating that the WWN's are not valid.h]hnThe vport is not operational. The Fabric failed FDISC with a status indicating that the WWN’s are not valid.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjLubah}(h]h ]h"]h$]h&]uh1j&hj:ubeh}(h]h ]h"]h$]h&]uh1jhhhM hjfubj)}(h}FC_VPORT_FAILED - VPort Failed The vport is not operational. This is a catchall for all other error conditions. h](j)}(h*FC_VPORT_FAILED - VPort Failedh]h*FC_VPORT_FAILED - VPort Failed}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjiubj')}(hhh]h)}(hPThe vport is not operational. This is a catchall for all other error conditions.h]hPThe vport is not operational. This is a catchall for all other error conditions.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{ubah}(h]h ]h"]h$]h&]uh1j&hjiubeh}(h]h ]h"]h$]h&]uh1jhhhMhjfubeh}(h]h ]h"]h$]h&]uh1j hjbubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh)}(hDThe following state table indicates the different state transitions:h]hDThe following state table indicates the different state transitions:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hX +------------------+--------------------------------+---------------------+ | State | Event | New State | +==================+================================+=====================+ | n/a | Initialization | Unknown | +------------------+--------------------------------+---------------------+ | Unknown: | Link Down | Linkdown | | +--------------------------------+---------------------+ | | Link Up & Loop | No Fabric Support | | +--------------------------------+---------------------+ | | Link Up & no Fabric | No Fabric Support | | +--------------------------------+---------------------+ | | Link Up & FLOGI response | No Fabric Support | | | indicates no NPIV support | | | +--------------------------------+---------------------+ | | Link Up & FDISC being sent | Initializing | | +--------------------------------+---------------------+ | | Disable request | Disable | +------------------+--------------------------------+---------------------+ | Linkdown: | Link Up | Unknown | +------------------+--------------------------------+---------------------+ | Initializing: | FDISC ACC | Active | | +--------------------------------+---------------------+ | | FDISC LS_RJT w/ no resources | No Fabric Resources | | +--------------------------------+---------------------+ | | FDISC LS_RJT w/ invalid | Fabric Rejected WWN | | | pname or invalid nport_id | | | +--------------------------------+---------------------+ | | FDISC LS_RJT failed for | Vport Failed | | | other reasons | | | +--------------------------------+---------------------+ | | Link Down | Linkdown | | +--------------------------------+---------------------+ | | Disable request | Disable | +------------------+--------------------------------+---------------------+ | Disable: | Enable request | Unknown | +------------------+--------------------------------+---------------------+ | Active: | LOGO received from fabric | Fabric Logout | | +--------------------------------+---------------------+ | | Link Down | Linkdown | | +--------------------------------+---------------------+ | | Disable request | Disable | +------------------+--------------------------------+---------------------+ | Fabric Logout: | Link still up | Unknown | +------------------+--------------------------------+---------------------+ h]htable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hStateh]hState}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hEventh]hEvent}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjubuj)}(hhh]h)}(h New Stateh]h New State}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubhtbody)}(hhh](j)}(hhh](j)}(hhh]h)}(hn/ah]hn/a}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjE ubah}(h]h ]h"]h$]h&]uh1jhjB ubj)}(hhh]h)}(hInitializationh]hInitialization}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\ ubah}(h]h ]h"]h$]h&]uh1jhjB ubj)}(hhh]h)}(hUnknownh]hUnknown}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjs ubah}(h]h ]h"]h$]h&]uh1jhjB ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(hUnknown:h]hUnknown:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]morerowsKuh1jhj ubj)}(hhh]h)}(h Link Downh]h Link Down}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hLinkdownh]hLinkdown}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(hLink Up & Looph]hLink Up & Loop}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hNo Fabric Supporth]hNo Fabric Support}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(hLink Up & no Fabrich]hLink Up & no Fabric}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hNo Fabric Supporth]hNo Fabric Support}(hj3 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0 ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(h2Link Up & FLOGI response indicates no NPIV supporth]h2Link Up & FLOGI response indicates no NPIV support}(hjS hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjP ubah}(h]h ]h"]h$]h&]uh1jhjM ubj)}(hhh]h)}(hNo Fabric Supporth]hNo Fabric Support}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjg ubah}(h]h ]h"]h$]h&]uh1jhjM ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(hLink Up & FDISC being senth]hLink Up & FDISC being sent}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h Initializingh]h Initializing}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(hDisable requesth]hDisable request}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hDisableh]hDisable}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(h Linkdown:h]h Linkdown:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hLink Uph]hLink Up}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hUnknownh]hUnknown}(hj& hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj# ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(h Initializing:h]h Initializing:}(hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjC ubah}(h]h ]h"]h$]h&]morerowsKuh1jhj@ ubj)}(hhh]h)}(h FDISC ACCh]h FDISC ACC}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hj[ ubah}(h]h ]h"]h$]h&]uh1jhj@ ubj)}(hhh]h)}(hActiveh]hActive}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjr ubah}(h]h ]h"]h$]h&]uh1jhj@ ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(hFDISC LS_RJT w/ no resourcesh]hFDISC LS_RJT w/ no resources}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hNo Fabric Resourcesh]hNo Fabric Resources}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(h1FDISC LS_RJT w/ invalid pname or invalid nport_idh]h1FDISC LS_RJT w/ invalid pname or invalid nport_id}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hFabric Rejected WWNh]hFabric Rejected WWN}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(h%FDISC LS_RJT failed for other reasonsh]h%FDISC LS_RJT failed for other reasons}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h Vport Failedh]h Vport Failed}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(h Link Downh]h Link Down}(hj: hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hj7 ubah}(h]h ]h"]h$]h&]uh1jhj4 ubj)}(hhh]h)}(hLinkdownh]hLinkdown}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjN ubah}(h]h ]h"]h$]h&]uh1jhj4 ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(hDisable requesth]hDisable request}(hjq hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hjn ubah}(h]h ]h"]h$]h&]uh1jhjk ubj)}(hhh]h)}(hDisableh]hDisable}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hj ubah}(h]h ]h"]h$]h&]uh1jhjk ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(hDisable:h]hDisable:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hEnable requesth]hEnable request}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hUnknownh]hUnknown}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(hActive:h]hActive:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hj ubah}(h]h ]h"]h$]h&]morerowsKuh1jhj ubj)}(hhh]h)}(hLOGO received from fabrich]hLOGO received from fabric}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h Fabric Logouth]h Fabric Logout}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hj" ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(h Link Downh]h Link Down}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjB ubah}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh]h)}(hLinkdownh]hLinkdown}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjY ubah}(h]h ]h"]h$]h&]uh1jhj? ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(hDisable requesth]hDisable request}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjy ubah}(h]h ]h"]h$]h&]uh1jhjv ubj)}(hhh]h)}(hDisableh]hDisable}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj ubah}(h]h ]h"]h$]h&]uh1jhjv ubeh}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh](j)}(hhh]h)}(hFabric Logout:h]hFabric Logout:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h Link still uph]h Link still up}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hUnknownh]hUnknown}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj? ubeh}(h]h ]h"]h$]h&]uh1j= hjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubh)}(h LLDD Interfacesh]hTransport <-> LLDD Interfaces}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hhhhhMMubh)}(hVport support by LLDD:h]hVport support by LLDD:}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhj>hhubj)}(hXThe LLDD indicates support for vports by supplying a vport_create() function in the transport template. The presence of this function will cause the creation of the new attributes on the fc_host. As part of the physical port completing its initialization relative to the transport, it should set the max_npiv_vports attribute to indicate the maximum number of vports the driver and/or adapter supports. h]h)}(hXThe LLDD indicates support for vports by supplying a vport_create() function in the transport template. The presence of this function will cause the creation of the new attributes on the fc_host. As part of the physical port completing its initialization relative to the transport, it should set the max_npiv_vports attribute to indicate the maximum number of vports the driver and/or adapter supports.h]hXThe LLDD indicates support for vports by supplying a vport_create() function in the transport template. The presence of this function will cause the creation of the new attributes on the fc_host. As part of the physical port completing its initialization relative to the transport, it should set the max_npiv_vports attribute to indicate the maximum number of vports the driver and/or adapter supports.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhj]ubah}(h]h ]h"]h$]h&]uh1jhhhMQhj>hhubh)}(hVport Creation:h]hVport Creation:}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhj>hhubj)}(hXThe LLDD vport_create() syntax is:: int vport_create(struct fc_vport *vport, bool disable) where: ======= =========================================================== vport Is the newly allocated vport object disable If "true", the vport is to be created in a disabled stated. If "false", the vport is to be enabled upon creation. ======= =========================================================== When a request is made to create a new vport (via sgio/netlink, or the vport_create fc_host attribute), the transport will validate that the LLDD can support another vport (e.g. max_npiv_vports > npiv_vports_inuse). If not, the create request will be failed. If space remains, the transport will increment the vport count, create the vport object, and then call the LLDD's vport_create() function with the newly allocated vport object. As mentioned above, vport creation is divided into two parts: - Creation with the kernel and LLDD. This means all transport and driver data structures are built up, and device objects created. This is equivalent to a driver "attach" on an adapter, which is independent of the adapter's link state. - Instantiation of the vport on the FC link via ELS traffic, etc. This is equivalent to a "link up" and successful link initialization. The LLDD's vport_create() function will not synchronously wait for both parts to be fully completed before returning. It must validate that the infrastructure exists to support NPIV, and complete the first part of vport creation (data structure build up) before returning. We do not hinge vport_create() on the link-side operation mainly because: - The link may be down. It is not a failure if it is. It simply means the vport is in an inoperable state until the link comes up. This is consistent with the link bouncing post vport creation. - The vport may be created in a disabled state. - This is consistent with a model where: the vport equates to a FC adapter. The vport_create is synonymous with driver attachment to the adapter, which is independent of link state. .. Note:: special error codes have been defined to delineate infrastructure failure cases for quicker resolution. The expected behavior for the LLDD's vport_create() function is: - Validate Infrastructure: - If the driver or adapter cannot support another vport, whether due to improper firmware, (a lie about) max_npiv, or a lack of some other resource - return VPCERR_UNSUPPORTED. - If the driver validates the WWN's against those already active on the adapter and detects an overlap - return VPCERR_BAD_WWN. - If the driver detects the topology is loop, non-fabric, or the FLOGI did not support NPIV - return VPCERR_NO_FABRIC_SUPP. - Allocate data structures. If errors are encountered, such as out of memory conditions, return the respective negative Exxx error code. - If the role is FCP Initiator, the LLDD is to : - Call scsi_host_alloc() to allocate a scsi_host for the vport. - Call scsi_add_host(new_shost, &vport->dev) to start the scsi_host and bind it as a child of the vport device. - Initializes the fc_host attribute values. - Kick of further vport state transitions based on the disable flag and link state - and return success (zero). LLDD Implementers Notes: - It is suggested that there be a different fc_function_templates for the physical port and the virtual port. The physical port's template would have the vport_create, vport_delete, and vport_disable functions, while the vports would not. - It is suggested that there be different scsi_host_templates for the physical port and virtual port. Likely, there are driver attributes, embedded into the scsi_host_template, that are applicable for the physical port only (link speed, topology setting, etc). This ensures that the attributes are applicable to the respective scsi_host. h](h)}(h#The LLDD vport_create() syntax is::h]h"The LLDD vport_create() syntax is:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjubh)}(h6int vport_create(struct fc_vport *vport, bool disable)h]h6int vport_create(struct fc_vport *vport, bool disable)}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhM]hjubh)}(hwhere:h]hwhere:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hjubj)}(hX@======= =========================================================== vport Is the newly allocated vport object disable If "true", the vport is to be created in a disabled stated. If "false", the vport is to be enabled upon creation. ======= =========================================================== h]j)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK;uh1jhjubj> )}(hhh](j)}(hhh](j)}(hhh]h)}(hvporth]hvport}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h#Is the newly allocated vport objecth]h#Is the newly allocated vport object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hdisableh]hdisable}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMchj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hqIf "true", the vport is to be created in a disabled stated. If "false", the vport is to be enabled upon creation.h]hyIf “true”, the vport is to be created in a disabled stated. If “false”, the vport is to be enabled upon creation.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMchj#ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j= hjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMahjubh)}(hXWhen a request is made to create a new vport (via sgio/netlink, or the vport_create fc_host attribute), the transport will validate that the LLDD can support another vport (e.g. max_npiv_vports > npiv_vports_inuse). If not, the create request will be failed. If space remains, the transport will increment the vport count, create the vport object, and then call the LLDD's vport_create() function with the newly allocated vport object.h]hXWhen a request is made to create a new vport (via sgio/netlink, or the vport_create fc_host attribute), the transport will validate that the LLDD can support another vport (e.g. max_npiv_vports > npiv_vports_inuse). If not, the create request will be failed. If space remains, the transport will increment the vport count, create the vport object, and then call the LLDD’s vport_create() function with the newly allocated vport object.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghjubh)}(h=As mentioned above, vport creation is divided into two parts:h]h=As mentioned above, vport creation is divided into two parts:}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhjubj)}(hX|- Creation with the kernel and LLDD. This means all transport and driver data structures are built up, and device objects created. This is equivalent to a driver "attach" on an adapter, which is independent of the adapter's link state. - Instantiation of the vport on the FC link via ELS traffic, etc. This is equivalent to a "link up" and successful link initialization. h]j)}(hhh](j)}(hCreation with the kernel and LLDD. This means all transport and driver data structures are built up, and device objects created. This is equivalent to a driver "attach" on an adapter, which is independent of the adapter's link state.h]h)}(hCreation with the kernel and LLDD. This means all transport and driver data structures are built up, and device objects created. This is equivalent to a driver "attach" on an adapter, which is independent of the adapter's link state.h]hCreation with the kernel and LLDD. This means all transport and driver data structures are built up, and device objects created. This is equivalent to a driver “attach” on an adapter, which is independent of the adapter’s link state.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphj|ubah}(h]h ]h"]h$]h&]uh1jhjyubj)}(hInstantiation of the vport on the FC link via ELS traffic, etc. This is equivalent to a "link up" and successful link initialization. h]h)}(hInstantiation of the vport on the FC link via ELS traffic, etc. This is equivalent to a "link up" and successful link initialization.h]hInstantiation of the vport on the FC link via ELS traffic, etc. This is equivalent to a “link up” and successful link initialization.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthjubah}(h]h ]h"]h$]h&]uh1jhjyubeh}(h]h ]h"]h$]h&]j>j?uh1jhhhMphjuubah}(h]h ]h"]h$]h&]uh1jhhhMphjubh)}(hX[The LLDD's vport_create() function will not synchronously wait for both parts to be fully completed before returning. It must validate that the infrastructure exists to support NPIV, and complete the first part of vport creation (data structure build up) before returning. We do not hinge vport_create() on the link-side operation mainly because:h]hX]The LLDD’s vport_create() function will not synchronously wait for both parts to be fully completed before returning. It must validate that the infrastructure exists to support NPIV, and complete the first part of vport creation (data structure build up) before returning. We do not hinge vport_create() on the link-side operation mainly because:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjubj)}(hX- The link may be down. It is not a failure if it is. It simply means the vport is in an inoperable state until the link comes up. This is consistent with the link bouncing post vport creation. - The vport may be created in a disabled state. - This is consistent with a model where: the vport equates to a FC adapter. The vport_create is synonymous with driver attachment to the adapter, which is independent of link state. h]j)}(hhh](j)}(hThe link may be down. It is not a failure if it is. It simply means the vport is in an inoperable state until the link comes up. This is consistent with the link bouncing post vport creation.h]h)}(hThe link may be down. It is not a failure if it is. It simply means the vport is in an inoperable state until the link comes up. This is consistent with the link bouncing post vport creation.h]hThe link may be down. It is not a failure if it is. It simply means the vport is in an inoperable state until the link comes up. This is consistent with the link bouncing post vport creation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h-The vport may be created in a disabled state.h]h)}(hjh]h-The vport may be created in a disabled state.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hThis is consistent with a model where: the vport equates to a FC adapter. The vport_create is synonymous with driver attachment to the adapter, which is independent of link state. h]h)}(hThis is consistent with a model where: the vport equates to a FC adapter. The vport_create is synonymous with driver attachment to the adapter, which is independent of link state.h]hThis is consistent with a model where: the vport equates to a FC adapter. The vport_create is synonymous with driver attachment to the adapter, which is independent of link state.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]j>j?uh1jhhhM}hjubah}(h]h ]h"]h$]h&]uh1jhhhM}hjubj)}(hgspecial error codes have been defined to delineate infrastructure failure cases for quicker resolution.h]h)}(hgspecial error codes have been defined to delineate infrastructure failure cases for quicker resolution.h]hgspecial error codes have been defined to delineate infrastructure failure cases for quicker resolution.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h@The expected behavior for the LLDD's vport_create() function is:h]hBThe expected behavior for the LLDD’s vport_create() function is:}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hX- Validate Infrastructure: - If the driver or adapter cannot support another vport, whether due to improper firmware, (a lie about) max_npiv, or a lack of some other resource - return VPCERR_UNSUPPORTED. - If the driver validates the WWN's against those already active on the adapter and detects an overlap - return VPCERR_BAD_WWN. - If the driver detects the topology is loop, non-fabric, or the FLOGI did not support NPIV - return VPCERR_NO_FABRIC_SUPP. - Allocate data structures. If errors are encountered, such as out of memory conditions, return the respective negative Exxx error code. - If the role is FCP Initiator, the LLDD is to : - Call scsi_host_alloc() to allocate a scsi_host for the vport. - Call scsi_add_host(new_shost, &vport->dev) to start the scsi_host and bind it as a child of the vport device. - Initializes the fc_host attribute values. - Kick of further vport state transitions based on the disable flag and link state - and return success (zero). h]j)}(hhh](j)}(hXValidate Infrastructure: - If the driver or adapter cannot support another vport, whether due to improper firmware, (a lie about) max_npiv, or a lack of some other resource - return VPCERR_UNSUPPORTED. - If the driver validates the WWN's against those already active on the adapter and detects an overlap - return VPCERR_BAD_WWN. - If the driver detects the topology is loop, non-fabric, or the FLOGI did not support NPIV - return VPCERR_NO_FABRIC_SUPP. h](h)}(hValidate Infrastructure:h]hValidate Infrastructure:}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjMubj)}(hX- If the driver or adapter cannot support another vport, whether due to improper firmware, (a lie about) max_npiv, or a lack of some other resource - return VPCERR_UNSUPPORTED. - If the driver validates the WWN's against those already active on the adapter and detects an overlap - return VPCERR_BAD_WWN. - If the driver detects the topology is loop, non-fabric, or the FLOGI did not support NPIV - return VPCERR_NO_FABRIC_SUPP. h]j)}(hhh](j)}(hIf the driver or adapter cannot support another vport, whether due to improper firmware, (a lie about) max_npiv, or a lack of some other resource - return VPCERR_UNSUPPORTED.h]j )}(hhh]j)}(hIf the driver or adapter cannot support another vport, whether due to improper firmware, (a lie about) max_npiv, or a lack of some other resource - return VPCERR_UNSUPPORTED.h](j)}(h>If the driver or adapter cannot support another vport, whetherh]h>If the driver or adapter cannot support another vport, whether}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjmubj')}(hhh]h)}(hodue to improper firmware, (a lie about) max_npiv, or a lack of some other resource - return VPCERR_UNSUPPORTED.h]hodue to improper firmware, (a lie about) max_npiv, or a lack of some other resource - return VPCERR_UNSUPPORTED.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j&hjmubeh}(h]h ]h"]h$]h&]uh1jhhhMhjjubah}(h]h ]h"]h$]h&]uh1j hjfubah}(h]h ]h"]h$]h&]uh1jhjcubj)}(hIf the driver validates the WWN's against those already active on the adapter and detects an overlap - return VPCERR_BAD_WWN.h]j )}(hhh]j)}(h}If the driver validates the WWN's against those already active on the adapter and detects an overlap - return VPCERR_BAD_WWN.h](j)}(hAIf the driver validates the WWN's against those already active onh]hCIf the driver validates the WWN’s against those already active on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj')}(hhh]h)}(h;the adapter and detects an overlap - return VPCERR_BAD_WWN.h]h;the adapter and detects an overlap - return VPCERR_BAD_WWN.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j&hjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhjcubj)}(h|If the driver detects the topology is loop, non-fabric, or the FLOGI did not support NPIV - return VPCERR_NO_FABRIC_SUPP. h]j )}(hhh]j)}(hzIf the driver detects the topology is loop, non-fabric, or the FLOGI did not support NPIV - return VPCERR_NO_FABRIC_SUPP. h](j)}(h>If the driver detects the topology is loop, non-fabric, or theh]h>If the driver detects the topology is loop, non-fabric, or the}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj')}(hhh]h)}(h:FLOGI did not support NPIV - return VPCERR_NO_FABRIC_SUPP.h]h:FLOGI did not support NPIV - return VPCERR_NO_FABRIC_SUPP.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j&hjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]j>j?uh1jhhhMhj_ubah}(h]h ]h"]h$]h&]uh1jhhhMhjMubeh}(h]h ]h"]h$]h&]uh1jhjJubj)}(hAllocate data structures. If errors are encountered, such as out of memory conditions, return the respective negative Exxx error code.h]j )}(hhh]j)}(hAllocate data structures. If errors are encountered, such as out of memory conditions, return the respective negative Exxx error code.h](j)}(h@Allocate data structures. If errors are encountered, such as outh]h@Allocate data structures. If errors are encountered, such as out}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjEubj')}(hhh]h)}(hEof memory conditions, return the respective negative Exxx error code.h]hEof memory conditions, return the respective negative Exxx error code.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjWubah}(h]h ]h"]h$]h&]uh1j&hjEubeh}(h]h ]h"]h$]h&]uh1jhhhMhjBubah}(h]h ]h"]h$]h&]uh1j hj>ubah}(h]h ]h"]h$]h&]uh1jhjJubj)}(hXIf the role is FCP Initiator, the LLDD is to : - Call scsi_host_alloc() to allocate a scsi_host for the vport. - Call scsi_add_host(new_shost, &vport->dev) to start the scsi_host and bind it as a child of the vport device. - Initializes the fc_host attribute values. h](h)}(h.If the role is FCP Initiator, the LLDD is to :h]h.If the role is FCP Initiator, the LLDD is to :}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(h- Call scsi_host_alloc() to allocate a scsi_host for the vport. - Call scsi_add_host(new_shost, &vport->dev) to start the scsi_host and bind it as a child of the vport device. - Initializes the fc_host attribute values. h]j)}(hhh](j)}(h=Call scsi_host_alloc() to allocate a scsi_host for the vport.h]h)}(hjh]h=Call scsi_host_alloc() to allocate a scsi_host for the vport.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hmCall scsi_add_host(new_shost, &vport->dev) to start the scsi_host and bind it as a child of the vport device.h]h)}(hmCall scsi_add_host(new_shost, &vport->dev) to start the scsi_host and bind it as a child of the vport device.h]hmCall scsi_add_host(new_shost, &vport->dev) to start the scsi_host and bind it as a child of the vport device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h*Initializes the fc_host attribute values. h]h)}(h)Initializes the fc_host attribute values.h]h)Initializes the fc_host attribute values.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]j>j?uh1jhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjJubj)}(hpKick of further vport state transitions based on the disable flag and link state - and return success (zero). h]j )}(hhh]j)}(hnKick of further vport state transitions based on the disable flag and link state - and return success (zero). h](j)}(hEKick of further vport state transitions based on the disable flag andh]hEKick of further vport state transitions based on the disable flag and}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjubj')}(hhh]h)}(h'link state - and return success (zero).h]h'link state - and return success (zero).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j&hjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1jhjJubeh}(h]h ]h"]h$]h&]j>j?uh1jhhhMhjFubah}(h]h ]h"]h$]h&]uh1jhhhMhjubh)}(hLLDD Implementers Notes:h]hLLDD Implementers Notes:}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh](j)}(hIt is suggested that there be a different fc_function_templates for the physical port and the virtual port. The physical port's template would have the vport_create, vport_delete, and vport_disable functions, while the vports would not.h]h)}(hIt is suggested that there be a different fc_function_templates for the physical port and the virtual port. The physical port's template would have the vport_create, vport_delete, and vport_disable functions, while the vports would not.h]hIt is suggested that there be a different fc_function_templates for the physical port and the virtual port. The physical port’s template would have the vport_create, vport_delete, and vport_disable functions, while the vports would not.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQubah}(h]h ]h"]h$]h&]uh1jhjNubj)}(hXQIt is suggested that there be different scsi_host_templates for the physical port and virtual port. Likely, there are driver attributes, embedded into the scsi_host_template, that are applicable for the physical port only (link speed, topology setting, etc). This ensures that the attributes are applicable to the respective scsi_host. h]h)}(hXOIt is suggested that there be different scsi_host_templates for the physical port and virtual port. Likely, there are driver attributes, embedded into the scsi_host_template, that are applicable for the physical port only (link speed, topology setting, etc). This ensures that the attributes are applicable to the respective scsi_host.h]hXOIt is suggested that there be different scsi_host_templates for the physical port and virtual port. Likely, there are driver attributes, embedded into the scsi_host_template, that are applicable for the physical port only (link speed, topology setting, etc). This ensures that the attributes are applicable to the respective scsi_host.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjiubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]j>j?uh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhhhM[hj>hhubh)}(hVport Disable/Enable:h]hVport Disable/Enable:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>hhubj)}(hXThe LLDD vport_disable() syntax is:: int vport_disable(struct fc_vport *vport, bool disable) where: ======= ======================================= vport Is vport to be enabled or disabled disable If "true", the vport is to be disabled. If "false", the vport is to be enabled. ======= ======================================= When a request is made to change the disabled state on a vport, the transport will validate the request against the existing vport state. If the request is to disable and the vport is already disabled, the request will fail. Similarly, if the request is to enable, and the vport is not in a disabled state, the request will fail. If the request is valid for the vport state, the transport will call the LLDD to change the vport's state. Within the LLDD, if a vport is disabled, it remains instantiated with the kernel and LLDD, but it is not active or visible on the FC link in any way. (see Vport Creation and the 2 part instantiation discussion). The vport will remain in this state until it is deleted or re-enabled. When enabling a vport, the LLDD reinstantiates the vport on the FC link - essentially restarting the LLDD statemachine (see Vport States above). h](h)}(h$The LLDD vport_disable() syntax is::h]h#The LLDD vport_disable() syntax is:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h7int vport_disable(struct fc_vport *vport, bool disable)h]h7int vport_disable(struct fc_vport *vport, bool disable)}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhMhjubh)}(hwhere:h]hwhere:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(h======= ======================================= vport Is vport to be enabled or disabled disable If "true", the vport is to be disabled. If "false", the vport is to be enabled. ======= ======================================= h]j)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK'uh1jhjubj> )}(hhh](j)}(hhh](j)}(hhh]h)}(hvporth]hvport}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h"Is vport to be enabled or disabledh]h"Is vport to be enabled or disabled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hdisableh]hdisable}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jhj!ubj)}(hhh]h)}(hOIf "true", the vport is to be disabled. If "false", the vport is to be enabled.h]hWIf “true”, the vport is to be disabled. If “false”, the vport is to be enabled.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj;ubah}(h]h ]h"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j= hjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubh)}(hXWhen a request is made to change the disabled state on a vport, the transport will validate the request against the existing vport state. If the request is to disable and the vport is already disabled, the request will fail. Similarly, if the request is to enable, and the vport is not in a disabled state, the request will fail. If the request is valid for the vport state, the transport will call the LLDD to change the vport's state.h]hXWhen a request is made to change the disabled state on a vport, the transport will validate the request against the existing vport state. If the request is to disable and the vport is already disabled, the request will fail. Similarly, if the request is to enable, and the vport is not in a disabled state, the request will fail. If the request is valid for the vport state, the transport will call the LLDD to change the vport’s state.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hXWithin the LLDD, if a vport is disabled, it remains instantiated with the kernel and LLDD, but it is not active or visible on the FC link in any way. (see Vport Creation and the 2 part instantiation discussion). The vport will remain in this state until it is deleted or re-enabled. When enabling a vport, the LLDD reinstantiates the vport on the FC link - essentially restarting the LLDD statemachine (see Vport States above).h]hXWithin the LLDD, if a vport is disabled, it remains instantiated with the kernel and LLDD, but it is not active or visible on the FC link in any way. (see Vport Creation and the 2 part instantiation discussion). The vport will remain in this state until it is deleted or re-enabled. When enabling a vport, the LLDD reinstantiates the vport on the FC link - essentially restarting the LLDD statemachine (see Vport States above).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhj>hhubh)}(hVport Deletion:h]hVport Deletion:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>hhubj)}(hXXThe LLDD vport_delete() syntax is:: int vport_delete(struct fc_vport *vport) where: vport: Is vport to delete When a request is made to delete a vport (via sgio/netlink, or via the fc_host or fc_vport vport_delete attributes), the transport will call the LLDD to terminate the vport on the FC link, and teardown all other datastructures and references. If the LLDD completes successfully, the transport will teardown the vport objects and complete the vport removal. If the LLDD delete request fails, the vport object will remain, but will be in an indeterminate state. Within the LLDD, the normal code paths for a scsi_host teardown should be followed. E.g. If the vport has a FCP Initiator role, the LLDD will call fc_remove_host() for the vports scsi_host, followed by scsi_remove_host() and scsi_host_put() for the vports scsi_host. h](h)}(h#The LLDD vport_delete() syntax is::h]h"The LLDD vport_delete() syntax is:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h(int vport_delete(struct fc_vport *vport)h]h(int vport_delete(struct fc_vport *vport)}hjsbah}(h]h ]h"]h$]h&]hhuh1hhhhMhjubh)}(hwhere:h]hwhere:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hvport: Is vport to delete h]h)}(hvport: Is vport to deleteh]hvport: Is vport to delete}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubh)}(hXWhen a request is made to delete a vport (via sgio/netlink, or via the fc_host or fc_vport vport_delete attributes), the transport will call the LLDD to terminate the vport on the FC link, and teardown all other datastructures and references. If the LLDD completes successfully, the transport will teardown the vport objects and complete the vport removal. If the LLDD delete request fails, the vport object will remain, but will be in an indeterminate state.h]hXWhen a request is made to delete a vport (via sgio/netlink, or via the fc_host or fc_vport vport_delete attributes), the transport will call the LLDD to terminate the vport on the FC link, and teardown all other datastructures and references. If the LLDD completes successfully, the transport will teardown the vport objects and complete the vport removal. If the LLDD delete request fails, the vport object will remain, but will be in an indeterminate state.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hX Within the LLDD, the normal code paths for a scsi_host teardown should be followed. E.g. If the vport has a FCP Initiator role, the LLDD will call fc_remove_host() for the vports scsi_host, followed by scsi_remove_host() and scsi_host_put() for the vports scsi_host.h]hX Within the LLDD, the normal code paths for a scsi_host teardown should be followed. E.g. If the vport has a FCP Initiator role, the LLDD will call fc_remove_host() for the vports scsi_host, followed by scsi_remove_host() and scsi_host_put() for the vports scsi_host.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhj>hhubj )}(hhh]j)}(hXOther: fc_host port_type attribute: There is a new fc_host port_type value - FC_PORTTYPE_NPIV. This value must be set on all vport-based fc_hosts. Normally, on a physical port, the port_type attribute would be set to NPORT, NLPORT, etc based on the topology type and existence of the fabric. As this is not applicable to a vport, it makes more sense to report the FC mechanism used to create the vport. Driver unload: FC drivers are required to call fc_remove_host() prior to calling scsi_remove_host(). This allows the fc_host to tear down all remote ports prior the scsi_host being torn down. The fc_remove_host() call was updated to remove all vports for the fc_host as well. h](j)}(hOther:h]hOther:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubj')}(hhh]j )}(hhh](j)}(hXfc_host port_type attribute: There is a new fc_host port_type value - FC_PORTTYPE_NPIV. This value must be set on all vport-based fc_hosts. Normally, on a physical port, the port_type attribute would be set to NPORT, NLPORT, etc based on the topology type and existence of the fabric. As this is not applicable to a vport, it makes more sense to report the FC mechanism used to create the vport. h](j)}(hfc_host port_type attribute:h]hfc_host port_type attribute:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj$ubj')}(hhh]h)}(hXoThere is a new fc_host port_type value - FC_PORTTYPE_NPIV. This value must be set on all vport-based fc_hosts. Normally, on a physical port, the port_type attribute would be set to NPORT, NLPORT, etc based on the topology type and existence of the fabric. As this is not applicable to a vport, it makes more sense to report the FC mechanism used to create the vport.h]hXoThere is a new fc_host port_type value - FC_PORTTYPE_NPIV. This value must be set on all vport-based fc_hosts. Normally, on a physical port, the port_type attribute would be set to NPORT, NLPORT, etc based on the topology type and existence of the fabric. As this is not applicable to a vport, it makes more sense to report the FC mechanism used to create the vport.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1j&hj$ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj!ubj)}(hXDriver unload: FC drivers are required to call fc_remove_host() prior to calling scsi_remove_host(). This allows the fc_host to tear down all remote ports prior the scsi_host being torn down. The fc_remove_host() call was updated to remove all vports for the fc_host as well. h](j)}(hDriver unload:h]hDriver unload:}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhjSubj')}(hhh]h)}(hXFC drivers are required to call fc_remove_host() prior to calling scsi_remove_host(). This allows the fc_host to tear down all remote ports prior the scsi_host being torn down. The fc_remove_host() call was updated to remove all vports for the fc_host as well.h]hXFC drivers are required to call fc_remove_host() prior to calling scsi_remove_host(). This allows the fc_host to tear down all remote ports prior the scsi_host being torn down. The fc_remove_host() call was updated to remove all vports for the fc_host as well.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjeubah}(h]h ]h"]h$]h&]uh1j&hjSubeh}(h]h ]h"]h$]h&]uh1jhhhMhj!ubeh}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1j&hj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj>hhhNhNubeh}(h]transport-lldd-interfacesah ]h"]transport <-> lldd interfacesah$]h&]uh1hhjohhhhhMMubh)}(hhh](h)}(hTransport supplied functionsh]hTransport supplied functions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hIThe following functions are supplied by the FC-transport for use by LLDs.h]hIThe following functions are supplied by the FC-transport for use by LLDs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(h================== ========================= fc_vport_create create a vport fc_vport_terminate detach and remove a vport ================== ========================= h]j)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj> )}(hhh](j)}(hhh](j)}(hhh]h)}(hfc_vport_createh]hfc_vport_create}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hcreate a vporth]hcreate a vport}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hfc_vport_terminateh]hfc_vport_terminate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hdetach and remove a vporth]hdetach and remove a vport}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j= hjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubh)}(h Details::h]hDetails:}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX/** * fc_vport_create - Admin App or LLDD requests creation of a vport * @shost: scsi host the virtual port is connected to. * @ids: The world wide names, FC4 port roles, etc for * the virtual port. * * Notes: * This routine assumes no locks are held on entry. */ struct fc_vport * fc_vport_create(struct Scsi_Host *shost, struct fc_vport_identifiers *ids) /** * fc_vport_terminate - Admin App or LLDD requests termination of a vport * @vport: fc_vport to be terminated * * Calls the LLDD vport_delete() function, then deallocates and removes * the vport from the shost and object tree. * * Notes: * This routine assumes no locks are held on entry. */ int fc_vport_terminate(struct fc_vport *vport)h]hX/** * fc_vport_create - Admin App or LLDD requests creation of a vport * @shost: scsi host the virtual port is connected to. * @ids: The world wide names, FC4 port roles, etc for * the virtual port. * * Notes: * This routine assumes no locks are held on entry. */ struct fc_vport * fc_vport_create(struct Scsi_Host *shost, struct fc_vport_identifiers *ids) /** * fc_vport_terminate - Admin App or LLDD requests termination of a vport * @vport: fc_vport to be terminated * * Calls the LLDD vport_delete() function, then deallocates and removes * the vport from the shost and object tree. * * Notes: * This routine assumes no locks are held on entry. */ int fc_vport_terminate(struct fc_vport *vport)}hjwsbah}(h]h ]h"]h$]h&]hhuh1hhhhMhjhhubeh}(h]transport-supplied-functionsah ]h"]transport supplied functionsah$]h&]uh1hhjohhhhhMubeh}(h]fc-virtual-ports-vportsah ]h"]fc virtual ports (vports)ah$]h&]uh1hhhhhhhhK%ubh)}(hhh](h)}(h,FC BSG support (CT & ELS passthru, and more)h]h,FC BSG support (CT & ELS passthru, and more)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(h<< To Be Supplied >>h]h<< To Be Supplied >>}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]'fc-bsg-support-ct-els-passthru-and-moreah ]h"],fc bsg support (ct & els passthru, and more)ah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hCreditsh]hCredits}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM&ubh)}(h7The following people have contributed to this document:h]h7The following people have contributed to this document:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hjhhubh)}(h$James Smart james.smart@broadcom.comh](h James Smart }(hjhhhNhNubh reference)}(hjames.smart@broadcom.comh]hjames.smart@broadcom.com}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:james.smart@broadcom.comuh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhM.hjhhubeh}(h]creditsah ]h"]creditsah$]h&]uh1hhhhhhhhM&ubeh}(h]scsi-fc-transportah ]h"]scsi fc transportah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj-error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjEjBjljijjjjjjjjj;j8jjjjjjjju nametypes}(jjEjljjjjj;jjjjuh}(jhjBhjijHjjojjjjjjj8jjj>jjjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.