From 9a597eb9bcfd466284dd6320f9cfed67000f95dd Mon Sep 17 00:00:00 2001 From: Chris Leech Date: Feb 18 2014 06:48:06 +0000 Subject: update open-iscsi to support host statistics Resolves: #1049710 Signed-off-by: Chris Leech --- diff --git a/0053-iscsiadm-Added-document-for-description-of-iface-att.patch b/0053-iscsiadm-Added-document-for-description-of-iface-att.patch new file mode 100644 index 0000000..a1c3c88 --- /dev/null +++ b/0053-iscsiadm-Added-document-for-description-of-iface-att.patch @@ -0,0 +1,534 @@ +From 072d8b931e8e03875e5220546e68d5fb2e80bcda Mon Sep 17 00:00:00 2001 +From: Vikas Chaudhary +Date: Fri, 22 Nov 2013 05:46:12 -0500 +Subject: [PATCH] iscsiadm: Added document for description of iface attributes + +Signed-off-by: Vikas Chaudhary +--- + sysfs-documentation | 514 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 514 insertions(+) + create mode 100644 sysfs-documentation + +diff --git a/sysfs-documentation b/sysfs-documentation +new file mode 100644 +index 0000000..54fc497 +--- /dev/null ++++ b/sysfs-documentation +@@ -0,0 +1,514 @@ ++Description of iface attributes and their valid values ++====================================================== ++ ++== IPv4 attributes == ++ ++ipaddress ++--------- ++IP address in format XXX.XXX.XXX.XXX ++ ++gateway ++------- ++IP address of the network router or gateway device in format XXX.XXX.XXX.XXX ++ ++subnet ++------ ++Broadcast address in format XXX.XXX.XXX.XXX ++ ++bootproto ++--------- ++The protocol type used to initialize interface ++ ++Valid values: "dhcp" or "static" ++ ++dhcp_dns_address_en ++------------------- ++Request DNS Server IP Addresses and Domain Name ++ ++If bootproto is set to dhcp and dhcp_dns_address_en is enable, ++requests DNS addresses (option 6) and domain name (option 15) in its ++DHCP parameter request list. ++ ++Valid values: "enable" or "disable" ++ ++dhcp_slp_da_info_en ++------------------- ++Request SLP DA Information and SLP Scope ++If bootproto is set to dhcp and dhcp_slp_da_info_en is enable, ++requests SLP DA information (option 78) and SLP scope (option 79) ++in its DHCP parameter request list. ++ ++Valid values: "enable" or "disable" ++ ++tos_en ++------ ++Enable IPv4 type of service (ToS) ++ ++When tos_en is set to enable, use value set in tos when transmitting IPv4 TCP ++packets on iSCSI connections. ++ ++Valid values: "enable" or "disable" ++ ++tos ++--- ++IPv4 Type of service (ToS) ++ ++When tos_en is set to enable, use value set in tos when transmitting IPv4 TCP ++packets on iSCSI connections. ++ ++Valid range: 8-bit value. [0-255] ++ ++grat_arp_en ++----------- ++Enable Gratuitous ARP Requests ++ ++Valid values: "enable" or "disable" ++ ++dhcp_alt_client_id_en ++--------------------- ++DHCP Use Alternate Client ID ++ ++When dhcp_alt_client_id_en is set to enable, use the Client ID configured in ++dhcp_alt_client_id as its Client ID (DHCP option 61) in outgoing DHCP messages. ++ ++Valid values: "enable" or "disable" ++ ++dhcp_alt_client_id ++------------------ ++DHCP Alternate Client ID ++ ++When dhcp_alt_client_id_en is set to enable, use value set in dhcp_alt_client_id ++for Client ID in DHCP messages. ++ ++Valid values: 11-byte Client ID ++ ++dhcp_req_vendor_id_en ++--------------------- ++DHCP Require Vendor ID ++ ++When dhcp_req_vendor_id_en is set to enable, use value set in dhcp_vendor_id as ++its vendor ID (DHCP option 60) in outgoing DHCP messages. ++ ++Valid values: "enable" or "disable" ++ ++dhcp_use_vendor_id_en ++--------------------- ++DHCP Use Vendor ID ++ ++When dhcp_use_vendor_id_en is set to enable, use value set in dhcp_vendor_id as ++its vendor ID (DHCP option 60) in outgoing DHCP messages. ++ ++Valid values: "enable" or "disable" ++ ++dhcp_vendor_id ++-------------- ++DHCP Vendor ID ++ ++When dhcp_req_vendor_id_en or dhcp_use_vendor_id_en is set to enable, ++use value set in dhcp_vendor_id for Vendor ID in DHCP messages. ++ ++Valid values: 11-byte Client ID ++ ++dhcp_learn_iqn_en ++----------------- ++DHCP Learn IQN ++ ++When dhcp_learn_iqn_en is set to enable, iSCSI initiator attempts to use DHCP ++to learn its (IQN) iSCSI name. ++ ++Valid values: "enable" or "disable" ++ ++fragment_disable ++---------------- ++Fragmentation Disable. ++ ++When fragment_disable is set to disable, iSCSI initiator cannot fragment IP ++datagrams. ++ ++Valid values: "enable" or "disable" ++ ++incoming_forwarding_en ++---------------------- ++When incoming_forwarding_en is set to enable, iSCSI initiator forwards all ++incoming network traffic to the network driver, except for iSCSI TCP packets ++destined to the iSCSI initiator. ++ ++Valid values: "enable" or "disable" ++ ++ttl ++--- ++IPv4 Time to Live (TTL) ++ ++This attribute contain TTL value sent in IPv4 TCP packets transmitted on ++iSCSI connections. ++ ++Valid range: 8-bit value. [0-255] ++ ++== IPv6 attributes == ++ ++ipaddress ++--------- ++IP address in IPv6 format. ++ ++link_local_addr ++--------------- ++Link local address in IPv6 format. ++ ++router_addr ++----------- ++Router address in IPv6 format. ++ ++ipaddr_autocfg ++-------------- ++Autoconfigure IPv6 Address. ++ ++Valid values: nd, dhcpv6 or disable ++qla4xxx don't support dhcpv6. ++ ++link_local_autocfg ++------------------ ++Autoconfigure IPv6 Link Local Address. ++ ++IPv6 neighbor discovery protocol to discover Link Local Address. ++ ++Valid values: auto or disable ++ ++ ++router_autocfg ++-------------- ++Autoconfigure IPv6 Router address. ++ ++IPv6 neighbor discovery protocol to discover a default router address. ++ ++Valid values: auto or disable ++ ++link_local_state ++---------------- ++This Read-only attribute show Link Local IP address state in sysfs. ++ ++Valid values: Unconfigured, Acquiring, Tentative, Valid, Disabling, Invalid, ++ Deprecated. ++ ++ ++router_state ++------------ ++This Read-only attribute shows router state. ++ ++Valid values: Unknown, Advertised, Manual, Stale. ++ ++ ++grat_neighbor_adv_en ++-------------------- ++Enable Gratuitious Neighbor Advertisement ++ ++Valid values: "enable" or "disable" ++ ++mld_en ++------ ++Enable IPv6 Multicast Listener Discovery ++ ++Valid values: "enable" or "disable" ++ ++flow_label ++---------- ++This attribute specifies the default value of the Flow Label field in the ++IPv6 header of TCP packets transmitted on iSCSI connections ++ ++Valid range: 20-bit value. [0-1048575] ++Value zero indicates that the traffic is not assigned to a labelled flow. ++ ++traffic_class ++------------- ++This attribute specifies the IPv6 traffic class value to be used in IPv6 ++TCP packets transmitted from the firmware on iSCSI connections. ++ ++Valid range: 8-bit value. [0-255] ++ ++hop_limit ++--------- ++This attribute specifies the IPv6 hop limit value to be used in IPv6 TCP ++packets transmitted from the firmware on iSCSI connections ++ ++Valid range: 8-bit value. [0-255] ++ ++nd_reachable_tmo ++---------------- ++This attribute specifies the time (in milliseconds) that a node assumes ++that the neighbor is reachable after confirmation. ++ ++Valid range: 4-byte value. [0-4294967295] ++ ++nd_rexmit_time ++-------------- ++This attribute specifies the time (in milliseconds) between retransmitted ++neighbor solicitation messages. ++ ++Valid range: 4-byte value. [0-4294967295] ++ ++nd_stale_tmo ++------------ ++This attribute specifies the time (in milliseconds) after which a stale ++neighbor or destination cache entry is discarded. ++ ++Valid range: 4-byte value. [0-4294967295] ++ ++dup_addr_detect_cnt ++------------------- ++This attribute specifies the IPv6 duplicate address detection count ++ ++Valid range: 8-bit value. [0-255] ++ 0 - Disable ++ 1 - TryOnce ++ 2 - TryTwice, and so on ++ ++router_adv_link_mtu ++------------------- ++IPv6 Router Advertised Link MTU Size. ++ ++Valid range: 1280 bytes to 1500 bytes ++ ++== Common == ++enabled ++------- ++This attribute is used to enable or disable IPv4 or IPv6 protocol. ++ ++Valid values: "enable" or "disable" ++ ++vlan_id ++------- ++This attribute specifies 12-bit VLAN identifier (VID) ++ ++Valid range: 12-bit value. [1-4094] ++ ++vlan_priority ++------------- ++This attribute specifies Priority to outbound packets containing the ++specified VLAN-ID (VID) ++ ++Valid range: 3-bit value. [0-7] ++ ++vlan_enabled ++------------ ++VLAN Tagging Enable. ++ ++When this attribute is set to enable, use value set in vlan_id and ++vlan_priority to transmit IP packets, and discards IP packets that were ++received without a matching VLAN ID ++ ++Valid values: "enable" or "disable" ++ ++mtu ++--- ++Ethernet MTU Size. ++ ++This field specifies the maximum payload length in byte of an ++Ethernet frame supported by iSCSI initiator. ++ ++Valid values: 576 bytes to 9000 bytes ++ ++port ++---- ++This attribute shows the initiator iSCSI port number. ++ ++ipaddress_state ++--------------- ++This Read-only attribute show IP address state. ++ ++Valid values: Unconfigured, Acquiring, Tentative, Valid, Disabling, Invalid, ++ Deprecated. ++ ++delayed_ack_en ++-------------- ++When this attribute is set to enable, TCP delayed ACK is enabled. ++ ++Valid values: "enable" or "disable" ++ ++tcp_nagle_disable ++----------------- ++When this attribute is set to disable, TCP Nagle algorithm is disabled. ++ ++Valid values: "enable" or "disable" ++ ++tcp_wsf_disable ++--------------- ++When this attribute is set to disable, TCP window scale is disabled. ++ ++Valid values: "enable" or "disable" ++ ++tcp_wsf ++------- ++This attribute specifies the TCP window scale factor to be negotiated ++on TCP connections. ++ ++Valid range: 8-bit value. [0-255] ++ ++tcp_timer_scale ++--------------- ++The TCP Timer Scale is scale factor that adjusts the time interval between ++timer ticks on a TCP connection. The scale factor allows for faster time-outs ++for connections running on a very small network, versus connections running ++on a very large network. ++ ++Valid range: 3-bit value. [0-7] ++ ++tcp_timestamp_en ++---------------- ++When this attribute is set to enable, iSCSI initiator negotiates to use time ++stamps in TCP headers ++ ++Valid values: "enable" or "disable" ++ ++cache_id ++-------- ++This Read-only attribute is used to find the valid cache entries for the ++interface. ++ ++For IPv4, ARP cache entry ++For IPv6, Neighbor cache entry ++ ++redirect_en ++----------- ++For IPv4: ++When this attribute is set to enable, an ARP redirect can modify the address ++resolution protocol (ARP) table and any active connections. ++ ++For IPv6: ++When this attribute is set to enable and neighbor advertisements are received, ++the connection table is examined and updated if any active connections match ++the IP address on the neighbor advertisement. This action is required for ++failover and redirect. ++ ++Valid values: "enable" or "disable" ++ ++def_taskmgmt_tmo ++---------------- ++This attribute specifies timeout interval in seconds that iSCSI uses for ++timing out task-management commands. ++ ++Valid range: 16-bit value [0-65535]. ++ ++header_digest ++------------- ++When this attribute is set to enable iSCSI initiator negotiates for ++HeaderDigest=CRC32 and when set to disable negotiates HeaderDigest=none. ++ ++Valid values: "enable" or "disable" ++ ++data_digest ++----------- ++When this attribute is set to enable iSCSI initiator negotiates for ++DataDigest=CRC32 and when set to disable negotiates DataDigest=none. ++ ++Valid values: "enable" or "disable" ++ ++immediate_data ++-------------- ++When this attribute is set to enable iSCSI initiator negotiates for ++ImmediateData=yes and When set to disable negotiates ImmediateData=none ++ ++Valid values: "enable" or "disable" ++ ++initial_r2t ++----------- ++When this attribute is set to enable iSCSI initiator negotiates for ++InitialR2T=yes. When set to disable negotiates InitialR2T=no. ++ ++Valid values: "enable" or "disable" ++ ++data_seq_in_order ++----------------- ++When this attribute is set to enable iSCSI initiator set data sequences ++in order ++ ++Valid values: "enable" or "disable" ++qla4xxx does not support out-of-order data sequences ++ ++data_pdu_in_order ++----------------- ++When this attribute is set to enable iSCSI initiator set Data PDU ++in order ++ ++Valid values: "enable" or "disable" ++qla4xxx does not support out-of-order Data PDUs. ++ ++erl ++--- ++Error Recovery Level ++ ++This attribute specifies error recovery level (ERL) supported by the ++connection. ++ ++Valid values: 2-bit value [0-2] ++ ++max_recv_dlength ++---------------- ++iSCSI Maximum Receive Data Segment Length. ++ ++This attribute specifies Maximum data segment length in bytes, that receive ++in an iSCSI PDU. ++ ++first_burst_len ++--------------- ++iSCSI First Burst Length ++ ++This attribute Specifies the maximum amount of unsolicited data an iSCSI ++initiator can send to the target during the execution of a single SCSI command, ++in bytes. ++ ++max_outstanding_r2t ++------------------- ++iSCSI Maximum Outstanding R2T ++ ++This attribute Specifies how many R2T PDUs per command can be outstanding ++during an iSCSI session. ++ ++max_burst_len ++------------- ++This attribute Specifies the maximum length for unsolicited or immediate data ++iSCSI session can send or receive. ++ ++chap_auth ++--------- ++When this attribute is set to enable iSCSI session performs authentication ++during the security state of login phase. ++ ++Valid values: "enable" or "disable" ++ ++bidi_chap ++--------- ++When this attribute is set to enable iSCSI session generates a CHAP challenge ++to any target that has issued a CHAP challenge to the iSCSI session. ++iSCSI session issues the challenge to the target after responding to the ++targets challenge. This attribute is ignored if chap_auth is set to disable. ++ ++Valid values: "enable" or "disable" ++ ++discovery_auth_optional ++----------------------- ++When this attribute is set to enable and the chap_auth is set to enable, ++iSCSI session does not require authentication on discovery sessions unless ++requested by the peer. When this attribute is set to disable iSCSI session ++requires CHAP authentication for a discovery session. ++ ++Valid values: "enable" or "disable" ++ ++discovery_logout ++---------------- ++When this attribute is set to enable, iSCSI initiator initiates an iSCSI logout ++on a discovery session when discovery is complete (before closing the connection). ++When this attribute is set to disable, iSCSI initiator closes the connection when ++discovery is complete. ++ ++Valid values: "enable" or "disable" ++ ++strict_login_comp_en ++-------------------- ++When this attribute is set to enable, iSCSI initiator enforces the iSCSI login ++negotiation rules. When this attribute is set to disable, iSCSI initiator does ++not enforce iSCSI login negotiation. ++ ++Valid values: "enable" or "disable" ++ ++initiator_name ++-------------- ++This Read-only attribute contains the iSCSI Name string used by the firmware. +-- +1.8.3.1 + diff --git a/0054-iscsi_tool-Add-offload-host-statistics-support.patch b/0054-iscsi_tool-Add-offload-host-statistics-support.patch new file mode 100644 index 0000000..240056e --- /dev/null +++ b/0054-iscsi_tool-Add-offload-host-statistics-support.patch @@ -0,0 +1,524 @@ +From fe6623803d1135fd382146faa847bcdf5dc6abc3 Mon Sep 17 00:00:00 2001 +From: Lalit Chandivade +Date: Fri, 22 Nov 2013 05:46:13 -0500 +Subject: [PATCH] iscsi_tool: Add offload host statistics support. + +Signed-off-by: Lalit Chandivade +Signed-off-by: Vikas Chaudhary +--- + include/iscsi_if.h | 116 ++++++++++++++++++++++++- + usr/iscsi_ipc.h | 2 + + usr/iscsiadm.c | 244 ++++++++++++++++++++++++++++++++++++++++++++++++++++- + usr/netlink.c | 47 +++++++++++ + 4 files changed, 406 insertions(+), 3 deletions(-) + +diff --git a/include/iscsi_if.h b/include/iscsi_if.h +index e59bcd0..9d15811 100644 +--- a/include/iscsi_if.h ++++ b/include/iscsi_if.h +@@ -75,8 +75,8 @@ enum iscsi_uevent_e { + ISCSI_UEVENT_LOGOUT_FLASHNODE = UEVENT_BASE + 29, + ISCSI_UEVENT_LOGOUT_FLASHNODE_SID = UEVENT_BASE + 30, + ISCSI_UEVENT_SET_CHAP = UEVENT_BASE + 31, +- +- ISCSI_UEVENT_MAX = ISCSI_UEVENT_SET_CHAP, ++ ISCSI_UEVENT_GET_HOST_STATS = UEVENT_BASE + 32, ++ ISCSI_UEVENT_MAX = ISCSI_UEVENT_GET_HOST_STATS, + + /* up events */ + ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1, +@@ -251,6 +251,10 @@ struct iscsi_uevent { + uint32_t host_no; + uint32_t sid; + } logout_flashnode_sid; ++ struct msg_get_host_stats { ++ uint32_t host_no; ++ } get_host_stats; ++ + } u; + union { + /* messages k -> u */ +@@ -854,4 +858,112 @@ struct iscsi_chap_rec { + uint8_t password_length; + }; + ++#define ISCSI_HOST_STATS_CUSTOM_MAX 32 ++#define ISCSI_HOST_STATS_CUSTOM_DESC_MAX 64 ++struct iscsi_host_stats_custom { ++ char desc[ISCSI_HOST_STATS_CUSTOM_DESC_MAX]; ++ uint64_t value; ++}; ++ ++/* struct iscsi_offload_host_stats: Host statistics, ++ * Include statistics for MAC, IP, TCP & iSCSI. ++ */ ++struct iscsi_offload_host_stats { ++ /* MAC */ ++ uint64_t mactx_frames; ++ uint64_t mactx_bytes; ++ uint64_t mactx_multicast_frames; ++ uint64_t mactx_broadcast_frames; ++ uint64_t mactx_pause_frames; ++ uint64_t mactx_control_frames; ++ uint64_t mactx_deferral; ++ uint64_t mactx_excess_deferral; ++ uint64_t mactx_late_collision; ++ uint64_t mactx_abort; ++ uint64_t mactx_single_collision; ++ uint64_t mactx_multiple_collision; ++ uint64_t mactx_collision; ++ uint64_t mactx_frames_dropped; ++ uint64_t mactx_jumbo_frames; ++ uint64_t macrx_frames; ++ uint64_t macrx_bytes; ++ uint64_t macrx_unknown_control_frames; ++ uint64_t macrx_pause_frames; ++ uint64_t macrx_control_frames; ++ uint64_t macrx_dribble; ++ uint64_t macrx_frame_length_error; ++ uint64_t macrx_jabber; ++ uint64_t macrx_carrier_sense_error; ++ uint64_t macrx_frame_discarded; ++ uint64_t macrx_frames_dropped; ++ uint64_t mac_crc_error; ++ uint64_t mac_encoding_error; ++ uint64_t macrx_length_error_large; ++ uint64_t macrx_length_error_small; ++ uint64_t macrx_multicast_frames; ++ uint64_t macrx_broadcast_frames; ++ /* IP */ ++ uint64_t iptx_packets; ++ uint64_t iptx_bytes; ++ uint64_t iptx_fragments; ++ uint64_t iprx_packets; ++ uint64_t iprx_bytes; ++ uint64_t iprx_fragments; ++ uint64_t ip_datagram_reassembly; ++ uint64_t ip_invalid_address_error; ++ uint64_t ip_error_packets; ++ uint64_t ip_fragrx_overlap; ++ uint64_t ip_fragrx_outoforder; ++ uint64_t ip_datagram_reassembly_timeout; ++ uint64_t ipv6tx_packets; ++ uint64_t ipv6tx_bytes; ++ uint64_t ipv6tx_fragments; ++ uint64_t ipv6rx_packets; ++ uint64_t ipv6rx_bytes; ++ uint64_t ipv6rx_fragments; ++ uint64_t ipv6_datagram_reassembly; ++ uint64_t ipv6_invalid_address_error; ++ uint64_t ipv6_error_packets; ++ uint64_t ipv6_fragrx_overlap; ++ uint64_t ipv6_fragrx_outoforder; ++ uint64_t ipv6_datagram_reassembly_timeout; ++ /* TCP */ ++ uint64_t tcptx_segments; ++ uint64_t tcptx_bytes; ++ uint64_t tcprx_segments; ++ uint64_t tcprx_byte; ++ uint64_t tcp_duplicate_ack_retx; ++ uint64_t tcp_retx_timer_expired; ++ uint64_t tcprx_duplicate_ack; ++ uint64_t tcprx_pure_ackr; ++ uint64_t tcptx_delayed_ack; ++ uint64_t tcptx_pure_ack; ++ uint64_t tcprx_segment_error; ++ uint64_t tcprx_segment_outoforder; ++ uint64_t tcprx_window_probe; ++ uint64_t tcprx_window_update; ++ uint64_t tcptx_window_probe_persist; ++ /* ECC */ ++ uint64_t ecc_error_correction; ++ /* iSCSI */ ++ uint64_t iscsi_pdu_tx; ++ uint64_t iscsi_data_bytes_tx; ++ uint64_t iscsi_pdu_rx; ++ uint64_t iscsi_data_bytes_rx; ++ uint64_t iscsi_io_completed; ++ uint64_t iscsi_unexpected_io_rx; ++ uint64_t iscsi_format_error; ++ uint64_t iscsi_hdr_digest_error; ++ uint64_t iscsi_data_digest_error; ++ uint64_t iscsi_sequence_error; ++ /* ++ * iSCSI Custom Host Statistics support, i.e. Transport could ++ * extend existing host statistics with its own specific statistics ++ * up to ISCSI_HOST_STATS_CUSTOM_MAX ++ */ ++ uint32_t custom_length; ++ struct iscsi_host_stats_custom custom[0] ++ __attribute__ ((aligned (sizeof(uint64_t)))); ++}; ++ + #endif +diff --git a/usr/iscsi_ipc.h b/usr/iscsi_ipc.h +index a32da1c..9d26d54 100644 +--- a/usr/iscsi_ipc.h ++++ b/usr/iscsi_ipc.h +@@ -161,6 +161,8 @@ struct iscsi_ipc { + uint32_t flashnode_idx); + int (*logout_flash_node_sid) (uint64_t transport_handle, + uint32_t host_no, uint32_t sid); ++ int (*get_host_stats) (uint64_t transport_handle, uint32_t host_no, ++ char *host_stats); + }; + + #endif /* ISCSI_IPC_H */ +diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c +index 045259b..ed2c0c3 100644 +--- a/usr/iscsiadm.c ++++ b/usr/iscsiadm.c +@@ -69,7 +69,8 @@ enum iscsiadm_mode { + MODE_FW, + MODE_PING, + MODE_CHAP, +- MODE_FLASHNODE ++ MODE_FLASHNODE, ++ MODE_HOST_STATS + }; + + enum iscsiadm_op { +@@ -137,6 +138,7 @@ iscsiadm -m session [ -hV ] [ -d debug_level ] [ -P printlevel] [ -r sessionid + iscsiadm -m iface [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I ifacename | -H hostno|MAC ] [ [ -o operation ] [ -n name ] [ -v value ] ] [ -C ping [ -a ip ] [ -b packetsize ] [ -c count ] [ -i interval ] ]\n\ + iscsiadm -m fw [ -d debug_level ] [ -l ]\n\ + iscsiadm -m host [ -P printlevel ] [ -H hostno|MAC ] [ [ -C chap [ -x chap_tbl_idx ] ] | [ -C flashnode [ -A portal_type ] [ -x flashnode_idx ] ] ] [ [ -o operation ] [ -n name ] [ -v value ] ] \n\ ++iscsiadm -m host [ -P printlevel ] [ -H hostno|MAC ] [ [ -C chap [ -o operation ] [ -v chap_tbl_idx ] ] | [ -C flashnode [ -o operation ] [ -A portal_type ] [ -x flashnode_idx ] [ -n name ] [ -v value ] ] | [ -C stats ] ]\n\ + iscsiadm -k priority\n"); + } + exit(status); +@@ -207,6 +209,9 @@ str_to_submode(char *str) + sub_mode = MODE_CHAP; + else if (!strcmp("flashnode", str)) + sub_mode = MODE_FLASHNODE; ++ else if (!strcmp("stats", str)) ++ sub_mode = MODE_HOST_STATS; ++ + else + sub_mode = -1; + +@@ -2025,6 +2030,232 @@ exit_flashnode_op: + return rc; + } + ++static void print_host_stats(struct iscsi_offload_host_stats *host_stats) ++{ ++ /* MAC */ ++ printf("Host Statistics:\n" ++ "\tmactx_frames: %lld\n" ++ "\tmactx_bytes: %lld\n" ++ "\tmactx_multicast_frames: %lld\n" ++ "\tmactx_broadcast_frames: %lld\n" ++ "\tmactx_pause_frames: %lld\n" ++ "\tmactx_control_frames: %lld\n" ++ "\tmactx_deferral: %lld\n" ++ "\tmactx_excess_deferral: %lld\n" ++ "\tmactx_late_collision: %lld\n" ++ "\tmactx_abort: %lld\n" ++ "\tmactx_single_collision: %lld\n" ++ "\tmactx_multiple_collision: %lld\n" ++ "\tmactx_collision: %lld\n" ++ "\tmactx_frames_dropped: %lld\n" ++ "\tmactx_jumbo_frames: %lld\n" ++ "\tmacrx_frames: %lld\n" ++ "\tmacrx_bytes: %lld\n" ++ "\tmacrx_unknown_control_frames: %lld\n" ++ "\tmacrx_pause_frames: %lld\n" ++ "\tmacrx_control_frames: %lld\n" ++ "\tmacrx_dribble: %lld\n" ++ "\tmacrx_frame_length_error: %lld\n" ++ "\tmacrx_jabber: %lld\n" ++ "\tmacrx_carrier_sense_error: %lld\n" ++ "\tmacrx_frame_discarded: %lld\n" ++ "\tmacrx_frames_dropped: %lld\n" ++ "\tmac_crc_error: %lld\n" ++ "\tmac_encoding_error: %lld\n" ++ "\tmacrx_length_error_large: %lld\n" ++ "\tmacrx_length_error_small: %lld\n" ++ "\tmacrx_multicast_frames: %lld\n" ++ "\tmacrx_broadcast_frames: %lld\n" ++ /* IP */ ++ "\tiptx_packets: %lld\n" ++ "\tiptx_bytes: %lld\n" ++ "\tiptx_fragments: %lld\n" ++ "\tiprx_packets: %lld\n" ++ "\tiprx_bytes: %lld\n" ++ "\tiprx_fragments: %lld\n" ++ "\tip_datagram_reassembly: %lld\n" ++ "\tip_invalid_address_error: %lld\n" ++ "\tip_error_packets: %lld\n" ++ "\tip_fragrx_overlap: %lld\n" ++ "\tip_fragrx_outoforder: %lld\n" ++ "\tip_datagram_reassembly_timeout: %lld\n" ++ "\tipv6tx_packets: %lld\n" ++ "\tipv6tx_bytes: %lld\n" ++ "\tipv6tx_fragments: %lld\n" ++ "\tipv6rx_packets: %lld\n" ++ "\tipv6rx_bytes: %lld\n" ++ "\tipv6rx_fragments: %lld\n" ++ "\tipv6_datagram_reassembly: %lld\n" ++ "\tipv6_invalid_address_error: %lld\n" ++ "\tipv6_error_packets: %lld\n" ++ "\tipv6_fragrx_overlap: %lld\n" ++ "\tipv6_fragrx_outoforder: %lld\n" ++ "\tipv6_datagram_reassembly_timeout: %lld\n" ++ /* TCP */ ++ "\ttcptx_segments: %lld\n" ++ "\ttcptx_bytes: %lld\n" ++ "\ttcprx_segments: %lld\n" ++ "\ttcprx_byte: %lld\n" ++ "\ttcp_duplicate_ack_retx: %lld\n" ++ "\ttcp_retx_timer_expired: %lld\n" ++ "\ttcprx_duplicate_ack: %lld\n" ++ "\ttcprx_pure_ackr: %lld\n" ++ "\ttcptx_delayed_ack: %lld\n" ++ "\ttcptx_pure_ack: %lld\n" ++ "\ttcprx_segment_error: %lld\n" ++ "\ttcprx_segment_outoforder: %lld\n" ++ "\ttcprx_window_probe: %lld\n" ++ "\ttcprx_window_update: %lld\n" ++ "\ttcptx_window_probe_persist: %lld\n" ++ /* ECC */ ++ "\tecc_error_correction: %lld\n" ++ /* iSCSI */ ++ "\tiscsi_pdu_tx: %lld\n" ++ "\tiscsi_data_bytes_tx: %lld\n" ++ "\tiscsi_pdu_rx: %lld\n" ++ "\tiscsi_data_bytes_rx: %lld\n" ++ "\tiscsi_io_completed: %lld\n" ++ "\tiscsi_unexpected_io_rx: %lld\n" ++ "\tiscsi_format_error: %lld\n" ++ "\tiscsi_hdr_digest_error: %lld\n" ++ "\tiscsi_data_digest_error: %lld\n" ++ "\tiscsi_sequence_error: %lld\n", ++ /* MAC */ ++ (unsigned long long)host_stats->mactx_frames, ++ (unsigned long long)host_stats->mactx_bytes, ++ (unsigned long long)host_stats->mactx_multicast_frames, ++ (unsigned long long)host_stats->mactx_broadcast_frames, ++ (unsigned long long)host_stats->mactx_pause_frames, ++ (unsigned long long)host_stats->mactx_control_frames, ++ (unsigned long long)host_stats->mactx_deferral, ++ (unsigned long long)host_stats->mactx_excess_deferral, ++ (unsigned long long)host_stats->mactx_late_collision, ++ (unsigned long long)host_stats->mactx_abort, ++ (unsigned long long)host_stats->mactx_single_collision, ++ (unsigned long long)host_stats->mactx_multiple_collision, ++ (unsigned long long)host_stats->mactx_collision, ++ (unsigned long long)host_stats->mactx_frames_dropped, ++ (unsigned long long)host_stats->mactx_jumbo_frames, ++ (unsigned long long)host_stats->macrx_frames, ++ (unsigned long long)host_stats->macrx_bytes, ++ (unsigned long long)host_stats->macrx_unknown_control_frames, ++ (unsigned long long)host_stats->macrx_pause_frames, ++ (unsigned long long)host_stats->macrx_control_frames, ++ (unsigned long long)host_stats->macrx_dribble, ++ (unsigned long long)host_stats->macrx_frame_length_error, ++ (unsigned long long)host_stats->macrx_jabber, ++ (unsigned long long)host_stats->macrx_carrier_sense_error, ++ (unsigned long long)host_stats->macrx_frame_discarded, ++ (unsigned long long)host_stats->macrx_frames_dropped, ++ (unsigned long long)host_stats->mac_crc_error, ++ (unsigned long long)host_stats->mac_encoding_error, ++ (unsigned long long)host_stats->macrx_length_error_large, ++ (unsigned long long)host_stats->macrx_length_error_small, ++ (unsigned long long)host_stats->macrx_multicast_frames, ++ (unsigned long long)host_stats->macrx_broadcast_frames, ++ /* IP */ ++ (unsigned long long)host_stats->iptx_packets, ++ (unsigned long long)host_stats->iptx_bytes, ++ (unsigned long long)host_stats->iptx_fragments, ++ (unsigned long long)host_stats->iprx_packets, ++ (unsigned long long)host_stats->iprx_bytes, ++ (unsigned long long)host_stats->iprx_fragments, ++ (unsigned long long)host_stats->ip_datagram_reassembly, ++ (unsigned long long)host_stats->ip_invalid_address_error, ++ (unsigned long long)host_stats->ip_error_packets, ++ (unsigned long long)host_stats->ip_fragrx_overlap, ++ (unsigned long long)host_stats->ip_fragrx_outoforder, ++ (unsigned long long)host_stats->ip_datagram_reassembly_timeout, ++ (unsigned long long)host_stats->ipv6tx_packets, ++ (unsigned long long)host_stats->ipv6tx_bytes, ++ (unsigned long long)host_stats->ipv6tx_fragments, ++ (unsigned long long)host_stats->ipv6rx_packets, ++ (unsigned long long)host_stats->ipv6rx_bytes, ++ (unsigned long long)host_stats->ipv6rx_fragments, ++ (unsigned long long)host_stats->ipv6_datagram_reassembly, ++ (unsigned long long)host_stats->ipv6_invalid_address_error, ++ (unsigned long long)host_stats->ipv6_error_packets, ++ (unsigned long long)host_stats->ipv6_fragrx_overlap, ++ (unsigned long long)host_stats->ipv6_fragrx_outoforder, ++ (unsigned long long)host_stats->ipv6_datagram_reassembly_timeout, ++ /* TCP */ ++ (unsigned long long)host_stats->tcptx_segments, ++ (unsigned long long)host_stats->tcptx_bytes, ++ (unsigned long long)host_stats->tcprx_segments, ++ (unsigned long long)host_stats->tcprx_byte, ++ (unsigned long long)host_stats->tcp_duplicate_ack_retx, ++ (unsigned long long)host_stats->tcp_retx_timer_expired, ++ (unsigned long long)host_stats->tcprx_duplicate_ack, ++ (unsigned long long)host_stats->tcprx_pure_ackr, ++ (unsigned long long)host_stats->tcptx_delayed_ack, ++ (unsigned long long)host_stats->tcptx_pure_ack, ++ (unsigned long long)host_stats->tcprx_segment_error, ++ (unsigned long long)host_stats->tcprx_segment_outoforder, ++ (unsigned long long)host_stats->tcprx_window_probe, ++ (unsigned long long)host_stats->tcprx_window_update, ++ (unsigned long long)host_stats->tcptx_window_probe_persist, ++ /* ECC */ ++ (unsigned long long)host_stats->ecc_error_correction, ++ /* iSCSI */ ++ (unsigned long long)host_stats->iscsi_pdu_tx, ++ (unsigned long long)host_stats->iscsi_data_bytes_tx, ++ (unsigned long long)host_stats->iscsi_pdu_rx, ++ (unsigned long long)host_stats->iscsi_data_bytes_rx, ++ (unsigned long long)host_stats->iscsi_io_completed, ++ (unsigned long long)host_stats->iscsi_unexpected_io_rx, ++ (unsigned long long)host_stats->iscsi_format_error, ++ (unsigned long long)host_stats->iscsi_hdr_digest_error, ++ (unsigned long long)host_stats->iscsi_data_digest_error, ++ (unsigned long long)host_stats->iscsi_sequence_error); ++} ++ ++static int exec_host_stats_op(int op, int info_level, uint32_t host_no) ++{ ++ struct iscsi_transport *t = NULL; ++ char *req_buf; ++ int rc = ISCSI_SUCCESS; ++ int fd = 0, buf_size = 0; ++ ++ t = iscsi_sysfs_get_transport_by_hba(host_no); ++ if (!t) { ++ log_error("Could not match hostno %u to transport.", host_no); ++ rc = ISCSI_ERR_TRANS_NOT_FOUND; ++ goto exit_host_stats; ++ } ++ ++ buf_size = sizeof(struct iscsi_offload_host_stats) + ++ sizeof(struct iscsi_uevent); ++ req_buf = calloc(1, buf_size); ++ if (!req_buf) { ++ log_error("Could not allocate memory for host stats request."); ++ rc = ISCSI_ERR_NOMEM; ++ goto exit_host_stats; ++ } ++ ++ fd = ipc->ctldev_open(); ++ if (fd < 0) { ++ rc = ISCSI_ERR_INTERNAL; ++ log_error("Netlink open failed."); ++ goto exit_host_stats; ++ } ++ ++ rc = ipc->get_host_stats(t->handle, host_no, req_buf); ++ if (rc < 0) { ++ log_error("get_host_stats failed. errno=%d", errno); ++ rc = ISCSI_ERR; ++ goto exit_host_stats; ++ } ++ ++ print_host_stats(req_buf + sizeof(struct iscsi_uevent)); ++ ++ ipc->ctldev_close(); ++ ++exit_host_stats: ++ if (req_buf) ++ free(req_buf); ++ return rc; ++} ++ + static int verify_iface_params(struct list_head *params, struct node_rec *rec) + { + struct user_param *param; +@@ -3239,6 +3470,17 @@ main(int argc, char **argv) + index, portal_type, + ¶ms); + break; ++ case MODE_HOST_STATS: ++ if (!host_no) { ++ log_error("STATS mode requires host no"); ++ rc = ISCSI_ERR_INVAL; ++ break; ++ } ++ ++ rc = exec_host_stats_op(op, info_level, ++ host_no); ++ break; ++ + default: + log_error("Invalid Sub Mode"); + break; +diff --git a/usr/netlink.c b/usr/netlink.c +index 151b56d..1c4b5cc 100644 +--- a/usr/netlink.c ++++ b/usr/netlink.c +@@ -339,6 +339,10 @@ __kipc_call(struct iovec *iovp, int count) + } else if (ev->type == ISCSI_UEVENT_GET_CHAP) { + /* kget_chap() will read */ + return 0; ++ } else if (ev->type == ISCSI_UEVENT_GET_HOST_STATS) { ++ /* kget_host_stats() will read */ ++ return 0; ++ + } else { + if ((rc = nlpayload_read(ctrl_fd, (void*)ev, + sizeof(*ev), 0)) < 0) { +@@ -1439,6 +1443,48 @@ klogout_flashnode_sid(uint64_t transport_handle, uint32_t host_no, + return 0; + } + ++static int kget_host_stats(uint64_t transport_handle, uint32_t host_no, ++ char *host_stats) ++{ ++ int rc = 0; ++ int ev_size; ++ struct iscsi_uevent ev; ++ struct iovec iov[2]; ++ char nlm_ev[NLMSG_SPACE(sizeof(struct iscsi_uevent))]; ++ struct nlmsghdr *nlh; ++ ++ memset(&ev, 0, sizeof(struct iscsi_uevent)); ++ ++ ev.type = ISCSI_UEVENT_GET_HOST_STATS; ++ ev.transport_handle = transport_handle; ++ ev.u.get_host_stats.host_no = host_no; ++ ++ iov[1].iov_base = &ev; ++ iov[1].iov_len = sizeof(ev); ++ rc = __kipc_call(iov, 2); ++ if (rc < 0) ++ return rc; ++ ++ if ((rc = nl_read(ctrl_fd, nlm_ev, ++ NLMSG_SPACE(sizeof(struct iscsi_uevent)), ++ MSG_PEEK)) < 0) { ++ log_error("can not read nlm_ev, error %d", rc); ++ return rc; ++ } ++ ++ nlh = (struct nlmsghdr *)nlm_ev; ++ ev_size = nlh->nlmsg_len - NLMSG_ALIGN(sizeof(struct nlmsghdr)); ++ ++ if ((rc = nlpayload_read(ctrl_fd, (void *)host_stats, ++ ev_size, 0)) < 0) { ++ log_error("can not read from NL socket, error %d", rc); ++ return rc; ++ } ++ ++ return rc; ++} ++ ++ + static void drop_data(struct nlmsghdr *nlh) + { + int ev_size; +@@ -1737,6 +1783,7 @@ struct iscsi_ipc nl_ipc = { + .login_flash_node = klogin_flashnode, + .logout_flash_node = klogout_flashnode, + .logout_flash_node_sid = klogout_flashnode_sid, ++ .get_host_stats = kget_host_stats, + }; + struct iscsi_ipc *ipc = &nl_ipc; + +-- +1.8.3.1 + diff --git a/0055-README-Updated-for-host-statistics.patch b/0055-README-Updated-for-host-statistics.patch new file mode 100644 index 0000000..ac404e1 --- /dev/null +++ b/0055-README-Updated-for-host-statistics.patch @@ -0,0 +1,33 @@ +From d1e8e68f440bbcf5c8b716572ccb3a0904dcd35e Mon Sep 17 00:00:00 2001 +From: Lalit Chandivade +Date: Fri, 22 Nov 2013 05:46:14 -0500 +Subject: [PATCH] README: Updated for host statistics. + +Signed-off-by: Lalit Chandivade +Signed-off-by: Vikas Chaudhary +--- + README | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/README b/README +index 813548d..06d1b6f 100644 +--- a/README ++++ b/README +@@ -1073,6 +1073,14 @@ To now log into targets it is the same as with sofware iscsi. See section + is free then entry of type bidi chap will be created at that index + with given username_in and password_in values. + ++ Host mode with stats submode: ++ ++ - Display host statistics: ++ ./iscsiadm -m host -H 6 -C stats ++ ++ This will print the aggregate statistics on the host adapter port. ++ This includes MAC, TCP/IP, ECC & iSCSI statistics. ++ + 6. Configuration + ================ + +-- +1.8.3.1 + diff --git a/0056-iscsiadm.8-Updated-man-page-for-host-statistics.patch b/0056-iscsiadm.8-Updated-man-page-for-host-statistics.patch new file mode 100644 index 0000000..b01aa27 --- /dev/null +++ b/0056-iscsiadm.8-Updated-man-page-for-host-statistics.patch @@ -0,0 +1,51 @@ +From 4a3076b56834d444eb9e19fc5fa25fff3a9624ec Mon Sep 17 00:00:00 2001 +From: Lalit Chandivade +Date: Fri, 22 Nov 2013 05:46:15 -0500 +Subject: [PATCH] iscsiadm.8: Updated man page for host statistics. + +Signed-off-by: Lalit Chandivade +Signed-off-by: Vikas Chaudhary +--- + doc/iscsiadm.8 | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8 +index 0e8149c..d59af43 100644 +--- a/doc/iscsiadm.8 ++++ b/doc/iscsiadm.8 +@@ -18,6 +18,8 @@ iscsiadm \- open-iscsi administration utility + + \fBiscsiadm\fR \-m host [ \-P printlevel ] [ \-H hostno|MAC ] [ [ \-C chap [ \-x chap_tbl_idx ] ] | [ \-C flashnode [ \-A portal_type ] [ \-x flashnode_idx ] ] ] [ [ \-o operation ] [ \-n name ] [ \-v value ] ] + ++\fBiscsiadm\fR \-m host [ \-P printlevel ] [ \-H hostno|MAC ] [ [ \-C chap [ \-o operation ] [ \-v chap_tbl_idx ] ] | [ \-C flashnode [ \-o operation ] [ \-A portal_type ] [ \-x flashnode_idx ] [ \-n name ] [ \-v value ] ] | [ \-C stats ]] ++ + \fBiscsiadm\fR \-k priority + + .SH "DESCRIPTION" +@@ -72,12 +74,14 @@ Currently iscsiadm support ping as submode for iface. For example, + + iscsiadm -m iface -I ifacename -C ping -a ipaddr -b packetsize -c count -i interval + +-For host, it supports chap and flashnode as submodes. For example, ++For host, it supports chap , flashnode and stats as submodes. For example, + + iscsiadm -m host -H hostno -C chap -x chap_tbl_idx -o operation + + iscsiadm -m host -H hostno -C flashnode -x flashnode_idx -o operation + ++iscsiadm -m host -H hostno -C stats ++ + .TP + \fB\-d\fR, \fB\-\-debug=\fIdebug_level\fP + print debugging information. Valid values for debug_level are 0 to 8. +@@ -279,6 +283,7 @@ tuple passed in. + .TP + \fB\-s\fR, \fB\-\-stats\fR + Display session statistics. ++This option when used with host mode, displays host statistics. + + .TP + \fB\-S\fR, \fB\-\-show\fR +-- +1.8.3.1 + diff --git a/0057-iscsi-tools-Fix-the-iscsiadm-help-options-for-host-m.patch b/0057-iscsi-tools-Fix-the-iscsiadm-help-options-for-host-m.patch new file mode 100644 index 0000000..8be67e1 --- /dev/null +++ b/0057-iscsi-tools-Fix-the-iscsiadm-help-options-for-host-m.patch @@ -0,0 +1,30 @@ +From 505ed9d3dbc6f3d746833a2cad7fb62d9ca20c35 Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Mon, 30 Dec 2013 06:14:40 -0500 +Subject: [PATCH] iscsi tools: Fix the iscsiadm help options for host mode + +Removing the redundant help message for host mode of iscsiadm. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + usr/iscsiadm.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c +index ed2c0c3..3cde8d1 100644 +--- a/usr/iscsiadm.c ++++ b/usr/iscsiadm.c +@@ -137,8 +137,7 @@ iscsiadm -m node [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -L all,manual,au + iscsiadm -m session [ -hV ] [ -d debug_level ] [ -P printlevel] [ -r sessionid | sysfsdir [ -R | -u | -s ] [ -o operation ] [ -n name ] [ -v value ] ]\n\ + iscsiadm -m iface [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I ifacename | -H hostno|MAC ] [ [ -o operation ] [ -n name ] [ -v value ] ] [ -C ping [ -a ip ] [ -b packetsize ] [ -c count ] [ -i interval ] ]\n\ + iscsiadm -m fw [ -d debug_level ] [ -l ]\n\ +-iscsiadm -m host [ -P printlevel ] [ -H hostno|MAC ] [ [ -C chap [ -x chap_tbl_idx ] ] | [ -C flashnode [ -A portal_type ] [ -x flashnode_idx ] ] ] [ [ -o operation ] [ -n name ] [ -v value ] ] \n\ +-iscsiadm -m host [ -P printlevel ] [ -H hostno|MAC ] [ [ -C chap [ -o operation ] [ -v chap_tbl_idx ] ] | [ -C flashnode [ -o operation ] [ -A portal_type ] [ -x flashnode_idx ] [ -n name ] [ -v value ] ] | [ -C stats ] ]\n\ ++iscsiadm -m host [ -P printlevel ] [ -H hostno|MAC ] [ [ -C chap [ -x chap_tbl_idx ] ] | [ -C flashnode [ -A portal_type ] [ -x flashnode_idx ] ] | [ -C stats ] ] [ [ -o operation ] [ -n name ] [ -v value ] ] \n\ + iscsiadm -k priority\n"); + } + exit(status); +-- +1.8.3.1 + diff --git a/0058-Man-page-correction-for-host-mode-options-of-iscsiad.patch b/0058-Man-page-correction-for-host-mode-options-of-iscsiad.patch new file mode 100644 index 0000000..f9b97c6 --- /dev/null +++ b/0058-Man-page-correction-for-host-mode-options-of-iscsiad.patch @@ -0,0 +1,31 @@ +From bd91b810918df6ac09167aa37c6dc1f32bf907be Mon Sep 17 00:00:00 2001 +From: Adheer Chandravanshi +Date: Mon, 30 Dec 2013 06:14:41 -0500 +Subject: [PATCH] Man page correction for host mode options of iscsiadm + +Correct the help options of iscsiadm host mode in its man page. + +Signed-off-by: Adheer Chandravanshi +Signed-off-by: Vikas Chaudhary +--- + doc/iscsiadm.8 | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8 +index d59af43..9a945d1 100644 +--- a/doc/iscsiadm.8 ++++ b/doc/iscsiadm.8 +@@ -16,9 +16,7 @@ iscsiadm \- open-iscsi administration utility + + \fBiscsiadm\fR \-m fw [ \-d debug_level ] [\-l] + +-\fBiscsiadm\fR \-m host [ \-P printlevel ] [ \-H hostno|MAC ] [ [ \-C chap [ \-x chap_tbl_idx ] ] | [ \-C flashnode [ \-A portal_type ] [ \-x flashnode_idx ] ] ] [ [ \-o operation ] [ \-n name ] [ \-v value ] ] +- +-\fBiscsiadm\fR \-m host [ \-P printlevel ] [ \-H hostno|MAC ] [ [ \-C chap [ \-o operation ] [ \-v chap_tbl_idx ] ] | [ \-C flashnode [ \-o operation ] [ \-A portal_type ] [ \-x flashnode_idx ] [ \-n name ] [ \-v value ] ] | [ \-C stats ]] ++\fBiscsiadm\fR \-m host [ \-P printlevel ] [ \-H hostno|MAC ] [ [ \-C chap [ \-x chap_tbl_idx ] ] | [ \-C flashnode [ \-A portal_type ] [ \-x flashnode_idx ] ] | [ \-C stats ] ] [ [ \-o operation ] [ \-n name ] [ \-v value ] ] + + \fBiscsiadm\fR \-k priority + +-- +1.8.3.1 + diff --git a/0154-add-libiscsi.patch b/0154-add-libiscsi.patch index e3d2324..bad1731 100644 --- a/0154-add-libiscsi.patch +++ b/0154-add-libiscsi.patch @@ -1,4 +1,4 @@ -From 38800fb6984ca4c3ad963708c47c1946c33b6d1a Mon Sep 17 00:00:00 2001 +From de47306137006436c6bc71a9a60c27287dd1a9e4 Mon Sep 17 00:00:00 2001 From: Chris Leech Date: Mon, 19 Nov 2012 16:43:15 -0800 Subject: add libiscsi @@ -43,7 +43,7 @@ Subject: add libiscsi create mode 100644 libiscsi/tests/test_set_auth.c diff --git a/Makefile b/Makefile -index 0b7bb98..02346bf 100644 +index 93dcbbf..5e80db9 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,7 @@ user: utils/open-isns/Makefile iscsiuio/Makefile @@ -131,7 +131,7 @@ index 0000000..317a7ec +-include .depend ../usr/.depend diff --git a/libiscsi/libiscsi.c b/libiscsi/libiscsi.c new file mode 100644 -index 0000000..2a176e8 +index 0000000..6e6846a --- /dev/null +++ b/libiscsi/libiscsi.c @@ -0,0 +1,620 @@ @@ -3881,10 +3881,10 @@ index afce6c0..0c93749 100644 int discovery_fw(void *data, struct iface_rec *iface, struct list_head *rec_list) diff --git a/usr/idbm.c b/usr/idbm.c -index 4bb9810..c84ae69 100644 +index 81bce9e..bda31e2 100644 --- a/usr/idbm.c +++ b/usr/idbm.c -@@ -1515,9 +1515,9 @@ int idbm_print_all_discovery(int info_level) +@@ -1709,9 +1709,9 @@ int idbm_print_all_discovery(int info_level) * fn should return -1 if it skipped the rec, a ISCSI_ERR error code if * the operation failed or 0 if fn was run successfully. */ @@ -3898,7 +3898,7 @@ index 4bb9810..c84ae69 100644 DIR *iface_dirfd; struct dirent *iface_dent; diff --git a/usr/idbm.h b/usr/idbm.h -index 1e9b132..4d08b31 100644 +index b89ddff..3631262 100644 --- a/usr/idbm.h +++ b/usr/idbm.h @@ -102,6 +102,9 @@ struct rec_op_data { @@ -3912,16 +3912,16 @@ index 1e9b132..4d08b31 100644 idbm_portal_op_fn *fn, char *targetname); extern int idbm_for_each_node(int *found, void *data, diff --git a/usr/iscsi_ipc.h b/usr/iscsi_ipc.h -index b6665cb..3e7f82a 100644 +index 9d26d54..d23754d 100644 --- a/usr/iscsi_ipc.h +++ b/usr/iscsi_ipc.h -@@ -160,4 +160,6 @@ struct iscsi_ipc { - uint32_t host_no, uint32_t sid); +@@ -165,4 +165,6 @@ struct iscsi_ipc { + char *host_stats); }; +struct iscsi_ipc *ipc; + #endif /* ISCSI_IPC_H */ -- -1.8.1.4 +1.8.3.1 diff --git a/iscsi-initiator-utils.spec b/iscsi-initiator-utils.spec index e5a8fdf..941e72a 100644 --- a/iscsi-initiator-utils.spec +++ b/iscsi-initiator-utils.spec @@ -66,6 +66,12 @@ Patch49: 0049-iscsi-tools-Additional-parameters-for-network-settin.patch Patch50: 0050-iscsi-tools-iface-params-should-be-updated-for-node_.patch Patch51: 0051-iscsi-tools-Let-default-type-of-iface-be-ipv4.patch Patch52: 0052-iscsi-tools-Show-iface-params-based-on-iface-type.patch +Patch53: 0053-iscsiadm-Added-document-for-description-of-iface-att.patch +Patch54: 0054-iscsi_tool-Add-offload-host-statistics-support.patch +Patch55: 0055-README-Updated-for-host-statistics.patch +Patch56: 0056-iscsiadm.8-Updated-man-page-for-host-statistics.patch +Patch57: 0057-iscsi-tools-Fix-the-iscsiadm-help-options-for-host-m.patch +Patch58: 0058-Man-page-correction-for-host-mode-options-of-iscsiad.patch # not (yet) upstream merged Patch143: 0143-idmb_rec_write-check-for-tpgt-first.patch @@ -171,6 +177,12 @@ developing applications that use %{name}. %patch50 -p1 %patch51 -p1 %patch52 -p1 +%patch53 -p1 +%patch54 -p1 +%patch55 -p1 +%patch56 -p1 +%patch57 -p1 +%patch58 -p1 # pending upstream merge %patch143 -p1 %patch145 -p1 @@ -348,6 +360,7 @@ fi fixes context issues with later patches - 1006156, 1006161 Add/Update entries in chap table through Open-iSCSI - 948134 extend support to set additional parameters for network configuration +- 1049710 update open-iscsi to support host statistics * Fri Jan 24 2014 Daniel Mach - 6.2.0.873-18 - Mass rebuild 2014-01-24