FC Functions

sth::fc_config

Purpose

Configures Fibre Channel (FC) nodes for the specified Spirent HLTAPI port. FC is a gigabit-speed network technology primarily used for storage networking.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::fc_config
    [-mode {create|modify|reset}  M]
    [-port_handle <port_handle>]
    [-handle <FC device handle>]
      [-host_type {initiator | target | both}]
      [-login_delay <1-1000>]
      [-logout_delay <1-1000>]
      [-nport_count <1-2000>]
      [-wwnn <aa:bb:cc:dd:ee:ff:gg:hh>]
      [-wwpn <aa:bb:cc:dd:ee:ff:gg:hh>]
      [-wwpn_step <aa:bb:cc:dd:ee:ff:gg:hh>]
      [-use_interface {true|false}]
      [-wwnn_step <64-bit hexadecimal>]
      [-wwnn_port  <64-bit hexadecimal>]
      [-wwnn_port_step  <64-bit hexadecimal>]
      [-retry_count <NUMERIC>]
      [-retry_timer  <NUMERIC>]
      [-remote_retry_count  <NUMERIC>]
      [-remote_retry_timer  <NUMERIC>]
      [-reset_link {true|false}]
      [-fc_topology {VN_N_PORT_TO_VN_N_PORT|N_PORT_TO_F_PORT}]
      [-ed_tov <NUMERIC>]
      [-ra_tov_host <NUMERIC>]
      [-ra_tov_port <NUMERIC>]
      [-rxcredit_port <NUMERIC>]
      [-rxcredit_host <NUMERIC>]
      [-domain_id <NUMERIC>]
      [-domain_id_step <1-255>]
      [-host_per_port <1-1000>]
      [-create_traffic {true|false}]
      [-group_method {AGGREGATE|HOST}]
      [-traffic_flow {LEFT_TO_RIGHT|RIGHT_TO_LEFT|BIDIRECTIONAL|BACKBONE}]
      [-traffic_flow_size <12-16383>]
      [-traffic_percent_ports <0-100>]

Arguments

-port_handle

Specifies the handle of the port on which to configure FC emulation. This argument is Mandatory for the create mode. Please refer to the description of the -mode argument.

-handle

Specifies the handle of the FC device(s). The handle is returned by the sth::fc_config function. This argument is Mandatory only for the modify and the reset modes.

-mode

Specifies the action to be taken. This argument is Mandatory . Possible values are described below:

create - Starts emulating FC device(s) on the port
     specified by the -port_handle argument.

modify - Changes the configuration parameters for the
     FC device(s) identified by the -handle
     argument.

reset - Deletes the FC device(s) identified by the
     -handle argument.
-host_type

Specifies whether hosts will register the name server as a initiator, target, or both. The default value is initiator. Possible values are described below:

initiator - Indicates the Small Computer System
       Interface (SCSI) Initiator. The SCSI is a
       set of standards for physically connecting and
       transferring data between computers and peripheral
       devices.

target  - Indicates the SCSI Target.

both   - Indicates both the SCSI Initiator and the
         SCSI Target.
-logout_delay

Specifies the logout delay timer that defines the interval between logout actions when two or more logout functions are performed. The value of this argument will be applied when several logout messages are sent. Possible values range from 1(ms) to 1000(ms). The default is 10(ms).

-login_delay

Specifies the login delay timer that defines the interval between login actions when two or more login functions are performed. The value of this argument will be applied when several login messages are sent. Possible values range from 1(ms) to 1000(ms). The default is 10(ms).

-nport_count

Specifies the number of the N_Ports to be created. The default value is 1.

-wwnn

Indicates the starting World Wide Node Name (WWNN) of the FC hosts. The value of this argument must be a 64-bit hexadecimal value. The default is 10:00:10:94:00:00:00:01.

-wwpn

Starting the WWPN of the FC devices. A WWPN is a World Wide Name assigned to a port in a Fibre Channel fabric. Used on storage area networks, it performs a function equivalent to the MAC address in the Ethernet protocol. It intends to be a unique identifier in the network. The value of this argument must be a 64-bit hexadecimal value. The default is 20:00:10:94:00:00:00:01.

-wwpn_step

Specifies the WWPN step for the FC hosts. The step must be a 64-bit hexadecimal value. The default is 00:00:00:00:00:00:00:01.

-use_interface

Spirent Extension (for Spirent HLTAPI only).

Enables or disables World Wide Port Name (WWPN) for FC N_port and FC F_port. Possible values are true (enable) and false (disable). The default value is false.

-wwnn_step

Spirent Extension (for Spirent HLTAPI only).

Specifies the step value by which to generate additional World Wide Node Names (WWNNs). The value must be a 64-bit hexadecimal. The default value is 00:00:00:00:00:00:00:01.

-wwnn_port

Spirent Extension (for Spirent HLTAPI only).

Specifies the starting WWNN value for the port. The value must be a 64-bit hexadecimal. The default value is 20:00:10:94:00:00:00:01.

-wwnn_port_step

Spirent Extension (for Spirent HLTAPI only).

Specifies the step value by which to generate additional WWPNs for the port. The value must be a 64-bit hexadecimal. The default value is 00:00:00:00:00:00:00:01.

-retry_count

Spirent Extension (for Spirent HLTAPI only).

Specifies the number of times to retry the login process. The default value is 0.

-retry_timer

Spirent Extension (for Spirent HLTAPI only).

Specifies the login retry interval, in milliseconds. The default value is 10.

-remote_retry_count

Spirent Extension (for Spirent HLTAPI only).

Specifies the number of times to retry remote discovery. The default value is 100.

-remote_retry_timer

Spirent Extension (for Spirent HLTAPI only).

Specifies the remote discovery retry interval, in milliseconds. The default value is 1000.

Spirent Extension (for Spirent HLTAPI only).

When enabled, the physical link will be reset upon logout. Possible values are true (enable) and false (disable). The default value is false.

-fc_topology

Spirent Extension (for Spirent HLTAPI only).

Specifies the type of topology to create. Possible values are:

Possible Values:

VN_N_PORT_TO_VN_N_PORT   VN/N_Port to VN/N_Port
N_PORT_TO_F_PORT         N_Port to F_Port

The default value is VN_N_PORT_TO_VN_N_PORT

-ed_tov

Spirent Extension (for Spirent HLTAPI only).

Specifies the error detection timeout value, in milliseconds. This value determines the life of an individual FC frame in any particular Fabric element. The default value is 2000.

-ra_tov_host

Spirent Extension (for Spirent HLTAPI only).

Specifies the resource allocation timeout value for the host, in milliseconds. The default value is 10000.

-ra_tov_port

Spirent Extension (for Spirent HLTAPI only).

Specifies the resource allocation timeout value for the port, in milliseconds. The default value is 10000.

-rxcredit_port

Spirent Extension (for Spirent HLTAPI only).

Specifies the number of frames that the port can receive. The default value is 3.

-rxcredit_host

Spirent Extension (for Spirent HLTAPI only).

Specifies the number of frames that the host can receive. The default value is 3.

-domain_id

Spirent Extension (for Spirent HLTAPI only).

Specifies the domain ID of the switch. The default value is 16.

-domain_id_step

Spirent Extension (for Spirent HLTAPI only).

Specifies the step value by which to generate subsequent domain IDs. Possible values range from 1 to 255. The default value is 1.

-host_per_port

Spirent Extension (for Spirent HLTAPI only).

Specifies the number of hosts per port. Possible values range from 1 to 1000. The default value is 1.

-create_traffic

Spirent Extension (for Spirent HLTAPI only).

Determines whether to create traffic. Possible values are true and false. The default value is true.

-group_method

Spirent Extension (for Spirent HLTAPI only).

Determines how streams are grouped into blocks. Possible values are:

AGGREGATE    Aggregates all streams into one streamblock for
             each side of the configuration

HOST         Creates one streamblock for each host in
             each direction
-traffic_flow

Spirent Extension (for Spirent HLTAPI only).

Specifies the direction of traffic flows. Possible values are:

LEFT_TO_RIGHT      Traffic flow is from left side ports to right side ports
RIGHT_TO_LEFT      Traffic flow is from right side ports to left side ports
BIDIRECTIONAL      Bi-directional traffic
BACKBONE           Backbone traffic

The default value is BIDIRECTIONAL.

-traffic_flow_size

Spirent Extension (for Spirent HLTAPI only).

Specifies the size of frames to be generated. Possible values range from 12 to 16383. The default value is 2112.

-traffic_percent_ports

Spirent Extension (for Spirent HLTAPI only).

Specifies the percentage of traffic load to be generated on each port. Possible values range from 0 to 100. The default value is 10.0.

Arguments Unsupported by Save as HLTAPI

The sth::fc_config function is not currently supported by Save as HLTAPI. To test with this function, you must configure it manually in the script generated using Save as HLTAPI.

Return Values

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

handle   The FC device handle

status    Success (1) or failure (0) of the operation.

procName    The function name

log       An error message (if the operation failed).

Description

The sth::fc_config function creates or modifies an emulated FC device block. Use the -mode argument to specify the action to perform. (See the -mode argument description of the actions.)

When you create a FC device, you must use the -port_handle argument to specify the Spirent HLTAPI port that the emulated FC device will use for FC communication. (The port handle value is contained in the keyed list returned by the sth::connect function.)

Examples

To create a FC device:

set returnedString [sth::fc_config -port_handle    port1   \
                     -mode         create  \
                     -nport_count   2 \
                     -wwpn        "20:00:00:10:94:00:00:01" \
                     -wwpn_step    "00:00:00:00:00:00:00:01" \
                     -wwnn        "10:00:00:10:94:00:00:01" \
                     -host_type     "initiator" \
                     -login_delay   10 \
                     -logout_delay  10 \
                                                                ]

To modify a FC device:

set returnedString [sth::fc_config  -handle          $fcDevice   \
                         -mode            modify  \
                         -host_type       "target" \
                                  ]

To reset a FC device:

set returnedString [sth::fc_config    -handle  $fcDevice  -mode  reset]

Sample Output:

#  Create FC device
  {status 1} {handle host1} {procName fc_config}
#  Modify FC device
  {status 1} {handle host1} {procName fc_config}
#  Reset FC device
  {status 1} {procName fc_config}

End of Procedure Header

sth::fc_control

Purpose

Starts FC Login/Logout process on the specified FC devices, deletes FC protocol, starts, or stops FC on F_PORT.

Synopsis

Note

M indicates that the argument is Mandatory .

 sth::fc_control
      [-handle  {FC_device_handle_list}  M]
      [-action {login|logout|delete|start|stop}  M]

Argument
-handle

Identifies a list of FC devices executing the action. This argument is Mandatory . It is returned from the sth::fc_config function.

-action

Specifies the action to perform on the device specified by the -handle argument. This argument is Mandatory . Possible values are login and logout; they are described below:

login    Starts the FC login process

logout   Starts the FC logout process

delete Deletes the FC protocol on the specified device

start  Starts the FC protocol on F_PORT

stop   Stops the FC protocol on F_PORT

Return Values

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

status     Success (1) or failure (0) of the operation

procName   Name of the function

log        An error message (if the operation failed)

Description

The sth::fc_control function controls the FC test. When you call the sth::fc_control function, you must specify a handle.

Examples

The following segment is an example for sth::fc_control:

set returnedString [sth::fcoe_control    -handle  $fcDevice -action login]

Sample Output:

{status 1} {handle host1} {procName fc_control}

End of Procedure Header

sth::fc_stats

Purpose

Returns the specified FC device statistics. The statistics include the device status and number and type of messages sent and received.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::fc_stats
   [-handle {FC device handles}  M]
   [-mode {summary|nport|fport|fportneighbor|discovery|all}  M]

Arguments

-handle

Identifies the FC devices whose statistics are to be returned. This argument is Mandatory . It is returned from the sth::fc_config function.

-mode

Specifies the kind of returned information. Possible values are summary, nport and all. The default is summary. Possible values are described below:

summary         Returns FC summary results
nport           Returns FC N_Port results
fport           Returns FC F_Port results
fportneighbor   Returns FC F_Port_Neighbor results
discovery       Returns FC remote discovery results
all             Returns all results from FC summary,
                N_Port, F_Port, and F_Port_Neighbor

Return Values

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

handle     The FC device handle
status     Success (1) or failure (0) of the operation.
procName   The function name
log        An error message (if the operation failed).

The following statistics are returned when the -mode argument is set to all or nPort:

<nportID>.substate

Sub-state of the N_Port. Possible values are:

NONE: No state.
LOGGED_OUT: Logged out.
FLOGI_SENT: FLOGI sent.
FLOGI_TIMED_OUT: FLOGI timed out.
FLOGI_REJECTED: FLOGI rejected.
FLOGI_ACCEPTED: FLOGI accepted.
FDISC_SENT: FDISC sent.
FDISC_TIMED_OUT: FDISC timed out.
FDISC_REJECTED: FDISC rejected.
FDISC_ACCEPTED: FDISC accepted.
PLOGI_SENT PLOGI sent.
PLOGI_TIMED_OUT: PLOGI timed out.
PLOGI_REJECTED: PLOGI rejected.
PLOGI_ACCEPTED: PLOGI accepted.
SCR_SENT: SCR sent.
SCR_TIMED_OUT: SCR timed out.
SCR_REJECTED: SCR rejected.
SCR_ACCEPTED: SCR accepted.
<nportID>.fcid
Assigned FC ID of the N_Port
<nportID>.wwpn
World Wide Port Name of the N_Port
<nportID>.wwnn
World Wide Node Name of the N_Port
<nportID>.rx_acc
Number of accepted messages received of the N_Port
<nportID>.rx_rjt
Number of rejected messages received of the N_Port
<nportID>.tx_flogi
Number of FLOGI messages transmitted of the N_Port
<nportID>.tx_fdisc
Number of FDISC messages transmitted of the N_Port
<nportID>.tx_plogi
Number of PLOGI messages transmitted of the N_Port
<nportID>.tx_logo
Number of LOGO messages transmitted of the N_Port
<nportID>.tx_scr
Number of SCR messages transmitted of the N_Port

The following statistics are returned when the -mode argument is set to discovery:

rx_gid_pn_accept_count
Number of Group ID PN Accept messages received
rx_gid_pn_reject_count
Number of Group ID PN Reject messages received
rx_remote_plogi_count
Number of remote Port Login messages received
rx_remote_prli_accept_count
Number of remote Process Login Accept messages received
rx_remote_prli_count
Number of remote Port Login messages received
rx_remote_prli_reject_count
Number of remote Process Login Reject messages received
tx_gid_pn_count
Number of Group ID PN Request messages sent
tx_remote_plogi_accept_count
Number of remote Port Login Accept messages sent
tx_remote_plogi_reject_count
Number of remote Port Login Reject messages sent
tx_remote_prli_accept_count
Number of remote Process Login Accept messages received
tx_remote_prli_count
Number of remote Process Login messages sent
tx_remote_prli_reject_count
Number of remote Process Login Reject messages received
world_wide_node_name
Configured world wide node name
world_wide_port_name
Configured world wide port name

The following statistics are returned when the -mode argument is set to all or summary:

state
State of FC device. Possible values are UP and DOWN.
nport_down
Number of N_Port in DOWN state
nport_up
Number of N_Port in UP state
rx_rjt
Number of rejected messages received
rx_acc
Number of accepted messages received
tx_flogi
Number of FLOGI messages transmitted
tx_fdisc
Number of FDISC messages transmitted
tx_plogi
Number of PLOGI messages transmitted
tx_logo
Number of LOGO messages transmitted
tx_scr
Number of SCR messages transmitted

Description

The sth::fc_stats function retrieves a list of aggregate statistics for the FC device configured on the specified port.

Examples

The following example retrieves statistics of the FC device configured on the specified port:

set returnedString [sth::fc_stats    -handle $fcDevice -mode summary]
puts "$returnedString"

set returnedString [sth::fc_stats    -handle $fcDevice -mode nPort]
puts "$returnedString"

Sample Output:

#Summary Results
{status 1} {tx_logo 0} {tx_fdisc 1} {tx_flogi 1} {rx_acc 4} {tx_scrn 0}
{rx_rjt 0} {max_rx_size 0} {tx_plogi 2} {nport_down 0} {nport_up 2}
{handle host1} {procName fc_stats}

#nPort Results
{status 1} {nport0 {{rx_acc 2} {rx_rjt 0} {wwnn 10:00:00:10:94:00:00:01}
{substate PLOGI_ACCEPTED} {wwpn 20:00:00:10:94:00:00:01}
{tx_fdisc 0} {tx_logo 0}
{tx_plogi 1} {tx_scrn 0} {tx_flogi 1} {fcid 2a0010}}} {nport1 {{rx_acc 2}
{rx_rjt 0} {wwnn 10:00:00:10:94:00:00:01} {substate PLOGI_ACCEPTED}
{wwpn 20:00:00:10:94:00:00:02} {tx_fdisc 1} {tx_logo 0} {tx_plogi 1} {tx_scrn 0}
{tx_flogi 0} {fcid 2a0011}}} {handle host1} {procName fc_stats}

Note

The ID in <nportID> is zero-based.

End of Procedure Header