Blame iscsiuio/README

Packit Service 646995
Iscsiuio Userspace Tool
Packit Service 646995
Version 0.7.8.6
Packit Service 646995
Jun 27, 2019
Packit Service 646995
------------------------------------------------------
Packit Service 646995
Packit Service 646995
This tool is to be used in conjunction with the QLogic NetXtreme II Linux
Packit Service 646995
driver (Kernel module name: 'bnx2' and 'bnx2x'), QLogic CNIC driver,
Packit Service 646995
and the QLogic iSCSI driver (Kernel module name: 'bnx2i').
Packit Service 646995
This user space tool is used in conjunction with the following
Packit Service 646995
QLogic Network Controllers:
Packit Service 646995
  bnx2:  BCM5706, BCM5708, BCM5709 devices
Packit Service 646995
  bnx2x: BCM57710, BCM57711, BCM57711E, BCM57712, BCM57712E,
Packit Service 646995
         BCM57800, BCM57810, BCM57840 devices
Packit Service 646995
Packit Service 646995
This utility will provide the ARP and DHCP functionality for the iSCSI offload.
Packit Service 646995
The communication to the driver is done via Userspace I/O (Kernel module name
Packit Service 646995
'uio').
Packit Service 646995
Packit Service 646995
There is one component to this application:
Packit Service 646995
Packit Service 646995
1.  'iscsiuio' - This is the daemon which aids in creating iSCSI offloaded
Packit Service 646995
                      connections.
Packit Service 646995
Packit Service 646995
Dependencies:
Packit Service 646995
=======================================
Packit Service 646995
Packit Service 646995
Linux Kernel Dependencies:
Packit Service 646995
1.  QLogic CNIC driver (cnic)
Packit Service 646995
1.  QLogic iSCSI offload driver (bnx2i)
Packit Service 646995
2.  Userspace I/O driver (uio)
Packit Service 646995
Packit Service 646995
Directory Structure of this Package:
Packit Service 646995
=======================================
Packit Service 646995
Packit Service 646995
<root>
Packit Service 646995
  |
Packit Service 646995
  +-doc (documentation directory: man pages)
Packit Service 646995
  |
Packit Service 646995
  +-src
Packit Service 646995
     |
Packit Service 646995
     +- uip - the uIP stack
Packit Service 646995
     |
Packit Service 646995
     +- unix - iscsiuio source
Packit Service 646995
Packit Service 646995
Packit Service 646995
Packit Service 646995
Compiling / Installing
Packit Service 646995
=======================================
Packit Service 646995
Packit Service 646995
1.  Please untar the tarball.
Packit Service 646995
2.  Run the configure script.  This will create the Makefiles and proper
Packit Service 646995
    header files needed for the build.
Packit Service 646995
3.  Run 'make'.  This will create the binary, 'iscsiuio'
Packit Service 646995
4.  Run 'make install' to place the binaries in their installed location.
Packit Service 646995
    (The default location is '/sbin')
Packit Service 646995
Packit Service 646995
iscsid IFACE Configuration File:
Packit Service 646995
=======================================
Packit Service 646995
The network interface configuration files are driven by the iscsid iface
Packit Service 646995
files.  The configuration data is parsed by iscsid and passed to the uIP
Packit Service 646995
stack when the connection is established.
Packit Service 646995
Packit Service 646995
One can use the following iscsiadm commands to create/set the configuration
Packit Service 646995
using the iface files:
Packit Service 646995
Packit Service 646995
1.  Create the iface file:
Packit Service 646995
Packit Service 646995
      iscsiadm -m iface -I <iface name> --op=new
Packit Service 646995
Packit Service 646995
2.  Discover the targets associated with the new iface
Packit Service 646995
Packit Service 646995
     iscsiadm -m discovery -t st -p <iSCSI target IP address> -I <iface name>
Packit Service 646995
Packit Service 646995
3.  Update the iface file:
Packit Service 646995
Packit Service 646995
  To use a static IPv4 address:
Packit Service 646995
      iscsiadm -m iface -I <iface name> --op=update --name=iface.ipaddress --value=<static IPv4 address ie: 192.168.0.1>
Packit Service 646995
Packit Service 646995
  To use a DHCP address:
Packit Service 646995
      iscsiadm -m iface -I <iface name> --op=update --name=iface.ipaddress --value=0.0.0.0
Packit Service 646995
Packit Service 646995
  The following values are required.
Packit Service 646995
Packit Service 646995
  To specify the bnx2i as the transport:
Packit Service 646995
      iscsiadm -m iface -I <iface name> --op=update --name=iface.transport_name --value=bnx2i
Packit Service 646995
Packit Service 646995
  To specify the network interface to offload with:
Packit Service 646995
Packit Service 646995
  a.  Specify the physical network interface name <ie. eth0, eth1, eth2 ...>
Packit Service 646995
      iscsiadm -m iface -I <iface name> --op=update --name=iface.net_ifacename --value=<network interface name>
Packit Service 646995
Packit Service 646995
  b.  Specify the iSCSI MAC address of the iSCSI HBA
Packit Service 646995
      iscsiadm -m iface -I <iface name> --op=update --name=iface.hwaddress --value=<MAC address of the iSCSI HBA>
Packit Service 646995
Packit Service 646995
4.  Now all the settings should be set so that one could connect to their
Packit Service 646995
    desired iSCSI target.
Packit Service 646995
Packit Service 646995
      iscsiadm -m node -p <iSCSI target IP address> -T <target name> -I <iface name> --login
Packit Service 646995
Packit Service 646995
bnx2 Limitations:
Packit Service 646995
=======================================
Packit Service 646995
*  RX iSCSI ring:
Packit Service 646995
      *  default ring size is 3 entries
Packit Service 646995
      *  default buffer size is 0x400 bytes
Packit Service 646995
*  TX iSCSI ring:
Packit Service 646995
      *  default ring size of 1 entry
Packit Service 646995
      *  default buffer size is 0x400 bytes
Packit Service 646995
Packit Service 646995
bnx2x Limitations:
Packit Service 646995
=======================================
Packit Service 646995
*  RX iSCSI ring:
Packit Service 646995
      *  default ring size is 15 entries
Packit Service 646995
      *  default buffer size is 0x400 bytes
Packit Service 646995
*  TX iSCSI ring:
Packit Service 646995
      *  default ring size of 1 entry
Packit Service 646995
      *  default buffer size is 0x400 bytes
Packit Service 646995
Packit Service 646995
Other Limiations:
Packit Service 646995
Packit Service 646995
Any packets larger then the buffer size will not be sent/received by the
Packit Service 646995
hardware and will be dropped.
Packit Service 646995
Packit Service 646995
IPv6 support:
Packit Service 646995
Packit Service 646995
IPv6 NDP (neighbor discovery protocol), DHCPv6 and Static IPv6 are now
Packit Service 646995
supported.  The IPv6 address used for the connection will be matched against
Packit Service 646995
the DHCPv6/static IPv6 address, the RA (router advertise) address, and the
Packit Service 646995
assigned link local address.
Packit Service 646995
Packit Service 646995
VLAN support:
Packit Service 646995
Packit Service 646995
VLAN support is only supported when using static IP addresses.
Packit Service 646995
Also, currently only 1 VLAN is supported per physical network interface.
Packit Service 646995
Either non-VLAN offloaded traffic is allowed or VLAN offloaded traffic
Packit Service 646995
is allowed.  The current implementation does not support both at the
Packit Service 646995
same time.
Packit Service 646995
Packit Service 646995
Currently there is no explicit VLAN attributes in the iface file.
Packit Service 646995
To configure the VLAN offload, the iface.hwaddress attribute or
Packit Service 646995
physical net_ifacename (without the VLAN identifier) must be used
Packit Service 646995
to specify the HBA device.  For the proper CNIC routing, the
Packit Service 646995
corresponding L2 interface which has the associated VLAN interface must
Packit Service 646995
have an IP address on the same subnet.
Packit Service 646995
Packit Service 646995
The following attributes need to be filled when offloading via the
Packit Service 646995
VLAN interface:
Packit Service 646995
Packit Service 646995
	iface.iscsi_ifacename = <name of this iface file>
Packit Service 646995
	iface.hwaddress = XX:XX:XX:XX:XX:XX
Packit Service 646995
	iface.ipaddress = XX.XX.XX.XX
Packit Service 646995
	iface.transport_name = bnx2i
Packit Service 646995
Packit Service 646995
Setting IP address:
Packit Service 646995
Packit Service 646995
On RHEL5.4, RHEL5.5+, RHEL6.0+, and SLES11SP1 distributions,
Packit Service 646995
discovery login is done over the Linux TCP/IP stack and L2 network
Packit Service 646995
interface.  The ethx interface corresponding to the HBA must
Packit Service 646995
therefore be in the same IP subnet in order to reach the iSCSI
Packit Service 646995
target during discovery.  However, the HBA's IP address should not
Packit Service 646995
be the same as the L2 ethx's IP address.
Packit Service 646995
Packit Service 646995
Starting with RHEL6.1 and all other newer distributions, discovery
Packit Service 646995
using SendTargets is done over the HBA interface, so there is no
Packit Service 646995
need for the HBA and L2 network to be on the same subnet.  However,
Packit Service 646995
if VLAN is used on the HBA, they still have to be on the same subnet
Packit Service 646995
as described above.
Packit Service 646995
Packit Service 646995
Packit Service 646995
Setting Netmask and Gateway addresses:
Packit Service 646995
Packit Service 646995
With the current limitations of the iface file, there are no entries
Packit Service 646995
to allow the user to enter a netmask or gateway IP address.
Packit Service 646995
Packit Service 646995
The only way to explicitly configure these options is to use DHCP
Packit Service 646995
addressing.  Then the netmask/gateway are set on the DHCP server.
Packit Service 646995
These settings are then sent to uIP via the DHCPOFFERs.
Packit Service 646995
Packit Service 646995
If the netmask is not defined then the netmask are automatically
Packit Service 646995
generated depending on the destination IP address.
Packit Service 646995
Packit Service 646995
Debugging:
Packit Service 646995
=======================================
Packit Service 646995
Packit Service 646995
By default, the iscsiuio daemon does not output any messages to the log file,
Packit Service 646995
'/var/log/iscsiuio.log'.  Message logging is only enabled when the daemon is
Packit Service 646995
run under debug mode.
Packit Service 646995
Packit Service 646995
To run the daemon in debug mode please pass the parameter  '-d <debug level>'
Packit Service 646995
Packit Service 646995
where the following debug levels are defined:
Packit Service 646995
Packit Service 646995
DEBUG         4 - Print all messages
Packit Service 646995
INFO          3 - Print messages needed to follow the uIP code (default)
Packit Service 646995
WARN          2 - Print warning messages
Packit Service 646995
ERROR         1 - Only print critical errors
Packit Service 646995
Packit Service 646995
A sample banner message:
Packit Service 646995
Packit Service 646995
INFO  [Mon Jun 20 11:23:14 2011]Started iSCSI uio stack: Ver 0.7.0.6
Packit Service 646995
INFO  [Mon Jun 20 11:23:14 2011]Build date: Mon Jun 20 11:22:05 PDT 2011
Packit Service 646995
INFO  [Mon Jun 20 11:23:14 2011]Debug mode enabled
Packit Service 646995
Packit Service 646995
These messages can be used to help debug any issues.
Packit Service 646995
Packit Service 646995
When debugging issues like the iscsid, the iscsiuio daemon can be run
Packit Service 646995
in the foreground and the maximum debugging level should be used.
Packit Service 646995
Packit Service 646995
To place the daemon in foreground mode please pass the parameter '-f'
Packit Service 646995
Packit Service 646995
Note: The messages to the log file are not flushed unless debugging is enabled.
Packit Service 646995
Packit Service 646995
Note:  If the daemon iscsiuio is running, one will not be able to
Packit Service 646995
       trample over the existing binary.  One might see the following message:
Packit Service 646995
Packit Service 646995
       'cannot create regular file `/sbin/iscsiuio': Text file busy'
Packit Service 646995
Packit Service 646995
       The solve this, please stop the iscsid service and then install.
Packit Service 646995
Packit Service 646995
Warning:  If full debug is enabled, this may quickly fill the partition
Packit Service 646995
containing the iscsiuio logs.  This is because full debugging will log
Packit Service 646995
packet activity which on a busy network will quickly fill the logs.
Packit Service 646995
Packit Service 646995
Note:  If the bnx2i and cnic drivers are unloaded, then iscsiuio will also
Packit Service 646995
need to be restarted so that it can determine the iscsid version.