/* * Copyright (c) 2011-2018, Emulex * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * */ /** * @file * Defines the elxsdkutil command data types and includes the table of commands. */ #ifndef __ELXU_COMMANDS_H__ #define __ELXU_COMMANDS_H__ #include "elxu_device.h" #include typedef int(*handler_t)(int, char**); typedef struct cmd_table_entry_s { char *name; handler_t ocs_handler; handler_t pt_handler; handler_t nodev_handler; handler_t nodriver_handler; char *syntax; char *help_text; } cmd_table_entry_t; #define ASCII_VALUE_OFFSET 1000 #define CLEAR_COUNTER (ASCII_VALUE_OFFSET + 99) #define CLEAR_OVERFLOW_FLAG (ASCII_VALUE_OFFSET + 100) #define CLEAR_ALL_COUNTER (ASCII_VALUE_OFFSET + 101) #define TEST_DUMP (ASCII_VALUE_OFFSET + 102) #define FAT_DUMP (ASCII_VALUE_OFFSET + 103) #define EFD_DUMP (ASCII_VALUE_OFFSET + 104) #define ECD_DUMP (ASCII_VALUE_OFFSET + 105) #define WWNN (ASCII_VALUE_OFFSET + 106) #define WWPN (ASCII_VALUE_OFFSET + 107) #define INITIATOR (ASCII_VALUE_OFFSET + 108) #define TARGET (ASCII_VALUE_OFFSET + 109) #define CONNECTION_HANDLE (ASCII_VALUE_OFFSET + 111) #define CONNECTION_ID (ASCII_VALUE_OFFSET + 114) #define CMD_HOSTNAME (ASCII_VALUE_OFFSET + 115) #define LINKCFG (ASCII_VALUE_OFFSET + 116) #define BUFSIZE (ASCII_VALUE_OFFSET + 117) #define SAVED (ASCII_VALUE_OFFSET + 118) #define CLRSAVED (ASCII_VALUE_OFFSET + 119) #define PROFILE_ID (ASCII_VALUE_OFFSET + 120) #define WQES (ASCII_VALUE_OFFSET + 121) #define CQES (ASCII_VALUE_OFFSET + 122) #define RQES (ASCII_VALUE_OFFSET + 123) #define MQES (ASCII_VALUE_OFFSET + 124) #define EQES (ASCII_VALUE_OFFSET + 125) #define QENTRIES (ASCII_VALUE_OFFSET + 126) #define PROTOCOL_NAME (ASCII_VALUE_OFFSET + 127) #define FIRMWARE_RESET (ASCII_VALUE_OFFSET + 128) #define FDB_DUMP (ASCII_VALUE_OFFSET + 129) #define SFP_DIAG_DATA (ASCII_VALUE_OFFSET + 130) #define LOOPBACK_TYPE (ASCII_VALUE_OFFSET + 131) #define RETRY_COUNT (ASCII_VALUE_OFFSET + 132) #define LINKSPEED (ASCII_VALUE_OFFSET + 133) #define LINKTOPOLOGY (ASCII_VALUE_OFFSET + 134) #define CHAP_TYPE (ASCII_VALUE_OFFSET + 135) #define SFP_TRANSCEIVER (ASCII_VALUE_OFFSET + 136) #define VLAN_ID (ASCII_VALUE_OFFSET + 137) #define HBA_ID (ASCII_VALUE_OFFSET + 138) #define PORT_ID (ASCII_VALUE_OFFSET + 149) #define TRUNK_MODE (ASCII_VALUE_OFFSET + 150) #define PORT_MIGRATION (ASCII_VALUE_OFFSET + 151) #define OCS_CLUST_TARGET_KEY_RETCNT (9999) #define OCS_ISCSI_PORTAL_GRPTAG (1) #define OCS_ISCSI_TCP_PORT (3260) extern int elxu_cmd_file_info(int argc, char **argv); extern int elxu_cmd_driver_info(int argc, char **argv); extern int elxu_cmd_list(int argc, char **argv); extern int elxu_cmd_read(int argc, char **argv); extern int elxu_cmd_write(int argc, char **argv); extern int elxu_cmd_version(int argc, char **argv); extern int elxu_cmd_cmp(int argc, char **argv); extern int elxu_cmd_dump(int argc, char **argv); extern int elxu_cmd_efdc(int argc, char **argv); extern int elxu_cmd_gendump(int argc, char **argv); extern int elxu_cmd_dump_to_host(int arg, char **argv); extern int elxu_cmd_board_temp(int argc, char **argv); extern int elxu_cmd_objenum(int argc, char **argv); extern int elxu_cmd_sfp(int argc, char **argv); extern int elxu_cmd_read_status(int argc, char **argv); extern int elxu_cmd_read_link_status(int argc, char **argv); extern int elxu_cmd_get_dport_stats(int argc, char **argv); extern int elxu_cmd_get_dynamic_dport_status(int argc, char **argv); extern int elxu_cmd_set_dport_dynamic_mode(int argc, char **argv); extern int elxu_cmd_diag_loopback_tests(int argc, char **argv); extern int elxu_cmd_read_rev(int argc, char **argv); extern int elxu_cmd_ack_frequency(int argc, char **argv); extern int elxu_cmd_delayed_ack_timer(int argc, char **argv); extern int elxu_cmd_constrain_window(int argc, char **argv); extern int elxu_cmd_driver_dump(int argc, char **argv); extern int elxu_cmd_mgmt_info(int argc, char **argv); extern int elxu_cmd_connection_info(int argc, char **argv); extern int elxu_cmd_vlan(int argc, char **argv); extern int elxu_cmd_route(int argc, char **argv); extern int elxu_cmd_add_ip(int argc, char **argv); extern int elxu_cmd_remove_ip(int argc, char **argv); extern int elxu_cmd_show_ips(int argc, char **argv); extern int elxu_cmd_iclusttgt(int argc, char **argv); extern int elxu_cmd_set_mac_ocs(int argc, char **argv); extern int elxu_cmd_set_nv_mac_pt(int argc, char **argv); extern int elxu_cmd_show_mac_ocs(int argc, char **argv); extern int elxu_cmd_show_mac_pt(int argc, char **argv); extern int elxu_cmd_show_wwn(int argc, char **argv); extern int elxu_cmd_set_wwn(int argc, char **argv); extern int elxu_cmd_create_vport(int argc, char **argv); extern int elxu_cmd_remove_vport(int argc, char **argv); extern int elxu_cmd_help(int argc, char **argv); extern int elxu_cmd_set_linkcfg(int argc, char **argv); extern int elxu_cmd_get_linkcfg(int argc, char **argv); extern int elxu_cmd_set_linkspeed(int argc, char **argv); extern int elxu_cmd_get_linkspeed(int argc, char **argv); extern int elxu_cmd_set_linktopology(int argc, char **argv); extern int elxu_cmd_get_linktopology(int argc, char **argv); extern int elxu_cmd_get_profile_list(int argc, char **argv); extern int elxu_cmd_get_active_profile(int argc, char **argv); extern int elxu_cmd_set_active_profile(int argc, char **argv); extern int elxu_cmd_get_profile_list_pt(int argc, char **argv); extern int elxu_cmd_get_active_profile_pt(int argc, char **argv); extern int elxu_cmd_set_active_profile_pt(int argc, char **argv); extern int elxu_cmd_get_port_protocol(int argc, char **argv); extern int elxu_cmd_set_port_protocol(int argc, char **argv); extern int elxu_cmd_firmware_reset(int argc, char **argv); extern int elxu_cmd_firmware_reset_pt(int argc, char **argv); extern int elxu_cmd_port_migration(int argc, char **argv); extern int elxu_cmd_get_parity_stats(int argc, char **argv); extern int elxu_cmd_unload(int argc, char **argv); extern int elxu_cmd_add_chap(int argc, char **argv); extern int elxu_cmd_remove_chap(int argc, char **argv); extern int elxu_cmd_show_chap_list(int argc, char **argv); extern int elxu_cmd_enable_jumbo(int argc, char **argv); extern int elxu_cmd_disable_jumbo(int argc, char **argv); extern int elxu_cmd_enable_header_digest(int argc, char **argv); extern int elxu_cmd_disable_header_digest(int argc, char **argv); extern int elxu_cmd_enable_data_digest(int argc, char **argv); extern int elxu_cmd_disable_data_digest(int argc, char **argv); extern int elxu_cmd_set_tcp_window_size(int argc, char **argv); extern int elxu_cmd_get_tcp_window_size(int argc, char **argv); extern int elxu_cmd_set_tcp_window_scale(int argc, char **argv); extern int elxu_cmd_get_tcp_window_scale(int argc, char **argv); extern int elxu_cmd_set_max_connections(int argc, char **argv); extern int elxu_cmd_get_max_connections(int argc, char **argv); extern int elxu_cmd_start_listen(int argc, char **argv); extern int elxu_cmd_stop_listen(int argc, char **argv); extern int elxu_cmd_set_require_chap(int argc, char **argv); extern int elxu_cmd_get_require_chap(int argc, char **argv); extern int elxu_cmd_set_gateway(int argc, char **argv); extern int elxu_cmd_get_gateway(int argc, char **argv); extern int elxu_cmd_node_abort_cnt(int argc, char **argv); extern int elxu_cmd_fw_diagnostic_log(int argc, char **argv); extern int elxu_cmd_get_fdmi_hba_list(int argc, char **argv); extern int elxu_cmd_get_fdmi_hba_info(int argc, char **argv); extern int elxu_cmd_get_fdmi_port_list(int argc, char **argv); extern int elxu_cmd_get_fdmi_port_info(int argc, char **argv); extern int elxu_cmd_set_trunk_mode(int argc, char **argv); extern int elxu_cmd_get_trunk_config(int argc, char **argv); #define ELXU_CMD_VLAN_SHOW_BUFFER_SIZE (4096) extern void usage(); static cmd_table_entry_t cmd_table[] = { {"file-info", elxu_cmd_file_info, elxu_cmd_file_info, elxu_cmd_file_info, elxu_cmd_file_info, "file-info -f ", "Provide information about the given firmware file" }, {"list", elxu_cmd_list, elxu_cmd_list, elxu_cmd_list, elxu_cmd_list, "list [--host ]", "List discovered devices" }, {"driver-info", elxu_cmd_driver_info, NULL, NULL, NULL, "driver-info [-d ] [--host ]", "Provide information about the driver associated with a device" }, {"read", elxu_cmd_read, NULL, NULL, NULL, "read [-d ] [--host ] [-f ]", "Read an object file from a device" }, {"write", elxu_cmd_write, elxu_cmd_write, NULL, NULL, "write -f [-d ] [--host ]", "Write a firmware file to a device" }, {"version", elxu_cmd_version, elxu_cmd_version, elxu_cmd_version, elxu_cmd_version, "version", "Report the version of this program" }, {"cmp", elxu_cmd_cmp, NULL, NULL, NULL, "cmp -f [-d ] [--host ]", "Compare the firmware in a file with the firmware on a device" }, {"dump", elxu_cmd_dump, elxu_cmd_dump, NULL, NULL, "dump [--fat | --efd | --ecd | --ecdtest] [-d ] [--host ] [-f ]", "Retrieve a dump from a device. For Skyhawk an optional dump type\n" "(--fat, --efd, --ecd, --ecdtest) can be specified. The default is ecd." }, {"efdc", elxu_cmd_efdc, NULL, NULL, NULL, "efdc [-d ] [--host ]", "Report EFD capabilities for a device" }, {"gendump", elxu_cmd_gendump, elxu_cmd_gendump, NULL, NULL, "gendump [--fdb] [-d ] [--host ]", "Cause a device to generate a dump. --fdb option for Function specific non disruptive dump" }, {"dump-to-host", elxu_cmd_dump_to_host, elxu_cmd_dump_to_host, NULL, NULL, "dump-to-host [--fdb] [-d ] [-f ]", "Cause a device to generate a dump and transfer it directly to host\n" "memory (Lancer only). If no filename is given the dump will be\n" "written to the file dump.bin. --fdb option for Function specific non disruptive dump" }, {"objenum", elxu_cmd_objenum, NULL, NULL, NULL, "objenum [-d ] [--host ]", "Enumerate filesystem objects on a device" }, {"sfp", elxu_cmd_sfp, NULL, NULL, NULL, "sfp [-d ] [--host ]", "Report SFP data for a device, --sfp_diag_data to get SFP Diagnostics data from transceiver\n" "--sfp_xceiver_data Decode SFP transceiver for a device" }, {"boardtemp", elxu_cmd_board_temp, NULL, NULL, NULL, "boardtemp [-d ]", "Read board temperature" }, {"read-status", elxu_cmd_read_status, NULL, NULL, NULL, "read-status [-d ] [--host ] [--cc]", "Report device status and optionally clear counters." }, {"read-link-status", elxu_cmd_read_link_status, NULL, NULL, NULL, "read-link-status [-d ] [--host ] [--clof] [--clrc]", "Report device link status. Optional flags can be used to clear\n" "overflow counters or clear all counters." }, {"dport-dynamic-mode-status", elxu_cmd_get_dynamic_dport_status, NULL, NULL, NULL, "dport-dynamic-mode-status [-d ]", "Query dynamic dport mode status" }, {"set-dport-dynamic-mode", elxu_cmd_set_dport_dynamic_mode, NULL, NULL, NULL, "set-dport-dynamic-mode (enable | disable) [-d ]", "Enable/Disable dport dynamic mode" }, {"get-dport-stats", elxu_cmd_get_dport_stats, NULL, NULL, NULL, "get-dport-stats [-d ] [--host ]", "Enable on-demand dport mode and get dport stats" }, {"diag-loopback-tests", elxu_cmd_diag_loopback_tests, NULL, NULL, NULL, "diag-loopback-tests [-d ] [--host ] [--loopback_type --retry_count ]", "Run diagnostic loopback tests with specificed loopback type\n1 - Internal loopback\n2 - External loopback\n3 - PCI loopback" }, {"read-rev", elxu_cmd_read_rev, NULL, NULL, NULL, "read-rev [-d ] [--host ]", "Report device HW and FW revisions" }, {"driver-dump", elxu_cmd_driver_dump, NULL, NULL, NULL, "driver-dump [-d ] [--wqes] [--cqes] [--mqes] [--rqes] [--eqes] [--qentries ] [--host ] [--bufsize ] [--saved] [--clrsaved]", "Retrieve driver debug information for device." }, {"mgmt-info", elxu_cmd_mgmt_info, NULL, NULL, NULL, "mgmt-info [-d ] [--host ]", "Retrieve driver management information for device" }, {"connection-info", elxu_cmd_connection_info, NULL, NULL, NULL, "connection-info [-d ] [--host ] [--connection-handle ]", "If a connection handle is provided, reports information on that\n" "connection. If no connection handle is provided, displays a list\n" "of open connections." }, {"iclusttgt", elxu_cmd_iclusttgt, NULL, NULL, NULL, "iclusttgt [-d ] ", "\niSCSI cluster target table will have other targets\n" "within the same network entity. " "Target will send this list of items to\n" "initiator during send targets discovery phase.\n" "Supported sub-commands:\n" "\tadd \n" "\tdel \n" "\tshow\n" "\tclear" }, {"route", elxu_cmd_route, NULL, NULL, NULL, "route <--add|--del|--show> [ip-address] [net mask] [gateway]" " [-d ] [--host ]", "Add or delete routing table entry.\n" "route <--add|--del> requires following sub-options\n" " IP address to add to the route table\n" " Subnet mask to add to the route table\n" " Gateway to add to the route table\n" }, {"vlan", elxu_cmd_vlan, NULL, NULL, NULL, "vlan <--add|--del|--show> [-d ] [--host ]", "Add or delete VLAN-id to an iSCSI adapter.\n" "Required sub-options format:\n" "--add \n" "--del \n" "--show\n" }, {"add-ip", elxu_cmd_add_ip, NULL, NULL, NULL, "add-ip [--vlan-id ] " "[-d ] [--host ]", "Add an additional IP address to an iSCSI adapter.\n" "[--vlan-id ] Add IP address for a given vlan_id interface.\n" "The IP address and net mask\n" "should be in either IPv4 or IPv6 format ###.###.###.### or\n" "####:####:####:####:####:####:####:####" }, {"show-ips", elxu_cmd_show_ips, NULL, NULL, NULL, "show-ips [-d ] [--host ]", "Show the IP addresses (4 or 6) assigned to an iSCSI adapter.\n" }, {"remove-ip", elxu_cmd_remove_ip, NULL, NULL, NULL, "remove-ip [--vlan-id ] [-d ] [--host ]", "Remove an IP address from an iSCSI adapter.\n" "[--vlan-id ] Remove IP address for a given vlan_id interface.\n" "The IP address should be in either IPv4 or IPv6 format ###.###.###.### or\n" "####:####:####:####:####:####:####:####" }, {"set-gateway", elxu_cmd_set_gateway, NULL, NULL, NULL, "set-gateway [-d ] [--host ]", "Set the gateway address for an iSCSI adapter. The IP address\n" "should be in either IPv4 or IPv6 format ###.###.###.### or\n" "####:####:####:####:####:####:####:####" }, {"get-gateway", elxu_cmd_get_gateway, NULL, NULL, NULL, "get-gateway [-d ] [--host ]", "Get the gateway address for an iSCSI adapter. The IP address\n" "should be in either IPv4 or IPv6 format ###.##" }, {"add-chap", elxu_cmd_add_chap, NULL, NULL, NULL, "add-chap : [-d ] [--host ] " "[--chap-type ]", "Add a chap name and secret to an iSCSI adapter.\n" "--chap-type indicates whether CHAP is incoming or outgoing, default is incoming.\n" }, {"remove-chap", elxu_cmd_remove_chap, NULL, NULL, NULL, "remove-chap [-d ] [--host ] " "[--chap-type ]", "Remove a chap name from an iSCSI adapter.\n" "--chap-type indicates whether CHAP is incoming or outgoing, default is incoming.\n" }, {"show-chap", elxu_cmd_show_chap_list, NULL, NULL, NULL, "show-chap [-d ] [--host ]", "Show CHAP users list from an iSCSI adapter." }, {"set-require-chap", elxu_cmd_set_require_chap, NULL, NULL, NULL, "set-require-chap ( true | false )[-d ] [--host ]", "Cause the iSCIS driver to require or not require CHAP authentication." }, {"get-require-chap", elxu_cmd_get_require_chap, NULL, NULL, NULL, "get-require-chap [-d ] [--host ]", "Get the current state of the require-CHAP flag in the driver." }, {"enable-jumbo", elxu_cmd_enable_jumbo, NULL, NULL, NULL, "enable-jumbo [-d ] [--host ]", "Enable jumbo frames on an iSCSI adapter." }, {"disable-jumbo", elxu_cmd_disable_jumbo, NULL, NULL, NULL, "disable-jumbo [-d ] [--host ]", "Disable jumbo frames on an iSCSI adapter." }, {"enable-header-digest", elxu_cmd_enable_header_digest, NULL, NULL, NULL, "enable-header-digest [-d ] [--host ]", "Enable header digest on an iSCSI adapter." }, {"disable-header-digest", elxu_cmd_disable_header_digest, NULL, NULL, NULL, "disable-header-digest [-d ] [--host ]", "Disable header digest on an iSCSI adapter." }, {"enable-data-digest", elxu_cmd_enable_data_digest, NULL, NULL, NULL, "enable-data-digest [-d ] [--host ]", "Enable data digest on an iSCSI adapter." }, {"disable-data-digest", elxu_cmd_disable_data_digest, NULL, NULL, NULL, "disable-data-digest [-d ] [--host ]", "Disable data digest on an iSCSI adapter." }, {"set-tcp-window-size", elxu_cmd_set_tcp_window_size, NULL, NULL, NULL, "set-tcp-window-size [-d ] [--host ]", "Set the TCP window size on an iSCSI adapter." }, {"get-tcp-window-size", elxu_cmd_get_tcp_window_size, NULL, NULL, NULL, "get-tcp-window-size [-d ] [--host ]", "Get the TCP window size from an iSCSI adapter." }, {"set-tcp-window-scale", elxu_cmd_set_tcp_window_scale, NULL, NULL, NULL, "set-tcp-window-scale [-d ] [--host ]", "Set the TCP window scale on an iSCSI adapter." }, {"get-tcp-window-scale", elxu_cmd_get_tcp_window_scale, NULL, NULL, NULL, "get-tcp-window-scale [-d ] [--host ]", "Get the TCP window scale from an iSCSI adapter." }, {"set-max-connections", elxu_cmd_set_max_connections, NULL, NULL, NULL, "set-max-connections [-d ] [--host ]", "Set the maximum connections per session on an iSCSI adapter." }, {"get-max-connections", elxu_cmd_get_max_connections, NULL, NULL, NULL, "get-max-connections [-d [--host ]", "Get the maximum connections per session from an iSCSI adapter." }, {"start-listen", elxu_cmd_start_listen, NULL, NULL, NULL, "start-listen [-d ] [--host ]", "Start listening for connections on an existing IP address on an iSCSI adapter." }, {"stop-listen", elxu_cmd_stop_listen, NULL, NULL, NULL, "stop-listen [-d ] [--host ]", "Stop listening for connections on an existing IP address on an iSCSI adapter." }, #if 0 /* * The set-mac command is removed temporarily due to a firmware bug * which is preventing the command from working properly. */ {"set-mac", elxu_cmd_set_mac_ocs, NULL, NULL, NULL, "set-mac [-d ] [--host ]", "Soft assign MAC address. The MAC address should be in the\n" "format ##:##:##:##:##:##" }, #endif {"set-nv-mac", NULL, elxu_cmd_set_nv_mac_pt, NULL, NULL, "set-nv-mac [-d ] [--host ]", "Set permanent MAC address. The MAC address should be in the\n" "format ##:##:##:##:##:##" }, {"show-mac", elxu_cmd_show_mac_ocs, elxu_cmd_show_mac_pt, NULL, NULL, "show-mac [-d ] [--host ]", "Show the MAC address for a device." }, {"show-wwn", elxu_cmd_show_wwn, elxu_cmd_show_wwn, NULL, NULL, "show-wwn [-d ] [--host ]", "Show the worldwide names for a device." }, {"set-wwn", elxu_cmd_set_wwn, elxu_cmd_set_wwn, NULL, NULL, "set-wwn (--wwpn | --wwnn ) [-d ] [--host ]", "Set the worldwide node name or worldwide port name or both for a device.\n" "The WWN should be in the format ##:##:##:##:##:##:##:##" }, {"create-vport", elxu_cmd_create_vport, NULL, NULL, NULL, "create-vport [ ] (--target | --initiator) [-d ] [--host ]", "Create an NPIV vport. Worldwide names, if provided, should be\n" "in the format: ##:##:##:##:##:##:##:##. Example: 10:00:00:00:c9:01:02:03\n" "If worldwide names are omitted they will be assigned by the firmware\n" "Either --target, --initiator, or both must be specified" }, {"remove-vport", elxu_cmd_remove_vport, NULL, NULL, NULL, "remove-vport [-d ] [--host ]", "Remove an NPIV vport.\n" "Worldwide names should be " "in the format: ##:##:##:##:##:##:##:##.\nExample: 10:00:00:00:c9:01:02:03" }, {"linkcfg-set", elxu_cmd_set_linkcfg, elxu_cmd_set_linkcfg, NULL, NULL, "linkcfg-set [-d ] [--host ] --linkcfg ", "Set link configuration. Where is: " OCS_CONFIG_LINKCFG_4X10G " | " OCS_CONFIG_LINKCFG_1X40G " | " OCS_CONFIG_LINKCFG_2X16G " | " OCS_CONFIG_LINKCFG_4X8G " | " OCS_CONFIG_LINKCFG_4X1G " | " OCS_CONFIG_LINKCFG_2X10G " | " OCS_CONFIG_LINKCFG_2X10G_2X8G }, {"linkcfg-get", elxu_cmd_get_linkcfg, elxu_cmd_get_linkcfg, NULL, NULL, "linkcfg-get [-d ] [--host ]", "Display link configuration." }, {"linkspeed-set", elxu_cmd_set_linkspeed, NULL, NULL, NULL, "linkspeed-set [-d ] [--host ] --linkspeed ", "Set link speed where is:" "0 - Auto | 1000 - 10G | 2000 - 2G | 4000 - 4G | 8000 - 8G | 16000 - 16G | 32000 - 32G" }, {"linkspeed-get", elxu_cmd_get_linkspeed, NULL, NULL, NULL, "linkspeed-get [-d ] [--host ]", "Display link speed." }, { "linktopology-set", elxu_cmd_set_linktopology, NULL, NULL, NULL, "linktopology-set [-d ] [--host ] --linktopology is:" "0 - Auto | 1 - NPORT | 2 - LOOP." }, {"linktopology-get", elxu_cmd_get_linktopology, NULL, NULL, NULL, "linktopology-get [-d ] [--host ]", "Display link topology." }, {"get-profile-list", elxu_cmd_get_profile_list, elxu_cmd_get_profile_list_pt, NULL, NULL, "get-profile-list [-d ] [--host ]", "Get list of available profiles." }, {"get-active-profile", elxu_cmd_get_active_profile, elxu_cmd_get_active_profile_pt, NULL, NULL, "get-active-profile [-d ] [--host ]", "Get currently active profile." }, {"set-active-profile", elxu_cmd_set_active_profile, elxu_cmd_set_active_profile_pt, NULL, NULL, "set-active-profile --profile-id [-d ] [--host ]", "Change the active profile." }, {"get-port-protocol", elxu_cmd_get_port_protocol, NULL, NULL, NULL, "get-port-protocol [-d ] [--host ]", "Get the current protocol for the port" }, {"set-port-protocol", elxu_cmd_set_port_protocol, NULL, NULL, NULL, "set-port-protocol [-d ] [--host ] --protocol (iscsi | fcoe)", "Sets the protocol for a Skyhawk port" }, {"firmware-reset", elxu_cmd_firmware_reset, elxu_cmd_firmware_reset_pt, NULL, NULL, "firmware-reset [-d ] [--host ]", "Generate a firmware reset on the HBA" }, {"port-migration", elxu_cmd_port_migration, NULL, NULL, NULL, "port-migration [-d ] [--host ]", "Port migration on specific physical port of HBA" }, {"get-parity-stats", elxu_cmd_get_parity_stats, NULL, NULL, NULL, "get-parity-stats [-d ] [--host ] [--cc]", "Retrieve ITCM parity stats and clear the counters optionally" }, {"unload", elxu_cmd_unload, NULL, NULL, NULL, "unload [--host ]", "gracefully unload a user space driver" }, {"node-abort-cnt", elxu_cmd_node_abort_cnt, NULL, NULL, NULL, "node-abort-cnt [-d ] [--host ]", "Retrieve sum of the aborts for all ocs/domain/port/nodes." }, {"fw-diag-log", elxu_cmd_fw_diagnostic_log, NULL, NULL, NULL, "fw-diag-log [-d ] [--host ] [-f ]", "Extract host buffer based firmware diagnostic logs to a file" }, {"get-fdmi-hba-list", elxu_cmd_get_fdmi_hba_list, NULL, NULL, NULL, "get-fdmi-hba-list [-d ] [--host ]", "Retrieve list of FDMI HBA identifiers from switch." }, {"get-fdmi-hba-info", elxu_cmd_get_fdmi_hba_info, NULL, NULL, NULL, "get-fdmi-hba-info [-d ] [--host ] --hba_identifier" "", "Retrieve HBA info which matches with HBA identifier from switch." }, {"get-fdmi-port-list", elxu_cmd_get_fdmi_port_list, NULL, NULL, NULL, "get-fdmi-port-list [-d ] [--host ] --hba_identifier" "", "Retrieve list of FDMI port identifiers exists in HBA identifier from switch" }, {"get-fdmi-port-info", elxu_cmd_get_fdmi_port_info, NULL, NULL, NULL, "get-fdmi-port-info [-d ] [--port_identifier ]", "Retrieve FDMI Port attribute info which matches with port name" }, {"set-trunk-mode", elxu_cmd_set_trunk_mode, NULL, NULL, NULL, "set-trunk-mode [-d ] [--mode ]", "Set trunk mode\n\t0: Disabled\n\t1: 2 links per trunk\n\t2: 4 links per trunk" }, {"show-trunk-config", elxu_cmd_get_trunk_config, NULL, NULL, NULL, "show-trunk-config [-d ]", "show trunk config" }, {"help", elxu_cmd_help, elxu_cmd_help, elxu_cmd_help, elxu_cmd_help, "help []", "Show usage information for a command" } }; #endif