ISCSID: Added socket communication hooks for uip

From Eddie Wai:

This patch adds the communication path between iscsid->iscsiuio.

It utilizes the set_net_config func ptr in the iscsi_transport_template
to initiate the callbacks.

Two new files are introduced:  uip_mgmt_ipc.h and uip_mgmt_ipc.c

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSID: Modified the Makefile for iscsiuio compilation

This patch modifies the open-iscsi Makefile to include the compilation,
binary/manpage install, and clean of the iscsiuio source.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
ISCSID: Added iscsiuio source to the open-iscsi pkg

This patch adds the iscsiuio source files to the open-iscsi package.
iscsiuio version: 0.7.6.1g

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
From: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>

This support lets the user manage the target entries in adapter flash
and
perform various operations like add, delete, login, logout,
and update the target information.

The sysfs entries will look as cited below:
        /sys/bus/iscsi_flashnode/devices/flashnode_sess-<host_no>:<flashnode_id>/<session
attrs>
        /sys/bus/iscsi_flashnode/devices/flashnode_conn-<host_no>:<flashnode_id>:<conn_id>/<conn
attrs>

Operations using iscsiadm:
=========================

List all target nodes stored in the FLASH of the adapter
\# iscsiadm -m host -H hostno -C flashnode -o show

View all parameters of one particular flash node
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx> -o show

Update an entry and commit to adapter FLASH
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx> -n <name>
-v <value> -o update

Multiple name, value pairs can be specified in a single command for
update operation

Delete an entry
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx>  -o delete

Create a new entry
\# iscsiadm -m host -H hostno -C flashnode -o new -A <ipv4/ipv6>
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx> -n <name>
-v <value> -o update

Example, create new entry:
\#iscsiadm -m host -H 7 -C flashnode -o new -A ipv4
Flashnode index: 2

New flashnode for host7 added

\#iscsiadm -m host -H 7 -C flashnode -o show
qla4xxx: [0] 192.168.1.12:3260,2
iqn.2002-03.com.compellent:5000d310004b0716
qla4xxx: [1] 192.168.1.12:3260,2
qla4xxx: [2]

Here - The newly created entry is at flashnode_idx 2, use it to update
the entry

\# iscsiadm -m host -H 7 -C flashnode -x 2 -o update
flashnode.conn[0].ipaddress -v 192.168.1.13
\#iscsiadm -m host -H 7 -C flashnode -o show
qla4xxx: [0] 192.168.1.12:3260,2
iqn.2002-03.com.compellent:5000d310004b0716
qla4xxx: [1] 192.168.1.12:3260,2
qla4xxx: [2] 192.168.1.13:3260,0

Login
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx>  -o login

Logout
\# iscsiadm -m host -H hostno -C flashnode -x <flashnode_idx>  -o logout
\# iscsiadm -m session -r sid -u

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Manpage changes for flashnode submode support for host mode.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
README changes for flashnode submode support for host mode.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
PATCH 1 of 1] correctly check return value of nice()

The nice() call can return a negative value, since
it returns the previous nice value.

Signed-off-by: Lee Duncan <leeman.duncan@gmail.com>
Allow firmware mode to use debug flag

From Lee Duncan:

When iscsiadm is called with "-m fw", the debug flag can be
useful.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsiadm: return error when login fails

When login fails because there are too many sessions we should be
returning an error code so that userland is aware that something
is amiss.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsiadm: bind ifaces to portals found using isns

Bug and patch from Jayamohan Kallickal at Emulex.

This adds support to be able to use isns discovery and
bind the portals found to offload ifaces. Note that
this does not do iSNS through the offload card. It
uses a normal net connection but portals that are found
will be setup to login using the offload card.

The problem with the previous code was that isns
discovery code was not reading in the iface info before
binding, so the resulting setup was not binding the offload
card to the record.

[Minor cleanup of patch by Mike Christie]
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
iscsiadm: Check for mode is not required when creating params list

There is no need to explicitly check for mode while creating the params
list of name/value pairs.

Reported-by: Leeman Duncan <leeman.duncan@gmail.com>
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>