Blame iscsiuio/README

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