Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src Pull up the following revisions(s) (requested by riz in t...



details:   https://anonhg.NetBSD.org/src/rev/843b78ecab36
branches:  netbsd-6
changeset: 774149:843b78ecab36
user:      sborrill <sborrill%NetBSD.org@localhost>
date:      Wed May 30 08:06:26 2012 +0000

description:
Pull up the following revisions(s) (requested by riz in ticket #291):
        etc/MAKEDEV.tmpl:               revision 1.155
        sbin/iscsictl/iscsictl.8:       revision 1.2-1.4
        sbin/iscsid/iscsid_driverif.c:  revision 1.4-1.5
        sbin/iscsid/iscsid_lists.c:     revision 1.4-1.7
        sbin/iscsid/iscsid_targets.c:   revision 1.4
        sbin/iscsid/iscsid_globals.h:   revision 1.5-1.7
        sbin/iscsid/iscsid_main.c:      revision 1.4-1.7
        sbin/iscsid/Makefile:           revision 1.2-1.4
        sbin/iscsid/iscsid.8:           revision 1.3-1.8
        sbin/iscsid/iscsid.h:           revision 1.3
        sys/dev/iscsi/iscsi_main.c:     revision 1.2-1.3

Fix bugs in iscsid target list handling, and improve documentation
somewhat for the in-kernel iSCSI initiator.

diffstat:

 etc/MAKEDEV.tmpl              |    3 +-
 sbin/iscsictl/iscsictl.8      |  186 +++++++++++++++++++++++++++++++++--------
 sbin/iscsid/Makefile          |    4 +-
 sbin/iscsid/iscsid.8          |   18 +++-
 sbin/iscsid/iscsid.h          |    4 +-
 sbin/iscsid/iscsid_driverif.c |   19 +--
 sbin/iscsid/iscsid_globals.h  |   21 +---
 sbin/iscsid/iscsid_lists.c    |   22 ++--
 sbin/iscsid/iscsid_main.c     |  109 +++++++++++++++---------
 sbin/iscsid/iscsid_targets.c  |    4 +-
 sys/dev/iscsi/iscsi_main.c    |   16 ++-
 11 files changed, 274 insertions(+), 132 deletions(-)

diffs (truncated from 819 to 300 lines):

diff -r 8a5fcf22dff7 -r 843b78ecab36 etc/MAKEDEV.tmpl
--- a/etc/MAKEDEV.tmpl  Tue May 22 20:26:58 2012 +0000
+++ b/etc/MAKEDEV.tmpl  Wed May 30 08:06:26 2012 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#      $NetBSD: MAKEDEV.tmpl,v 1.151.2.1 2012/02/25 14:48:12 sborrill Exp $
+#      $NetBSD: MAKEDEV.tmpl,v 1.151.2.2 2012/05/30 08:06:26 sborrill Exp $
 #
 # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -810,6 +810,7 @@
        makedev md0 md1
        makedev raid0 raid1 raid2 raid3 raid4 raid5 raid6 raid7
        makedev vnd0 vnd1 vnd2 vnd3
+       makedev iscsi0
        makedev bpf npf
        makedev tun0 tun1 tun2 tun3
        makedev ipl pf crypto random
diff -r 8a5fcf22dff7 -r 843b78ecab36 sbin/iscsictl/iscsictl.8
--- a/sbin/iscsictl/iscsictl.8  Tue May 22 20:26:58 2012 +0000
+++ b/sbin/iscsictl/iscsictl.8  Wed May 30 08:06:26 2012 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: iscsictl.8,v 1.1 2011/10/23 21:11:23 agc Exp $
+.\" $NetBSD: iscsictl.8,v 1.1.4.1 2012/05/30 08:06:26 sborrill Exp $
 .\"
 .\" Copyright (c) 2011 Alistair Crooks <agc%NetBSD.org@localhost>
 .\" All rights reserved.
@@ -23,7 +23,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 8, 2011
+.Dd May 26, 2012
 .Dt ISCSICTL 8
 .Os
 .Sh NAME
@@ -31,8 +31,7 @@
 .Nd program to manage iSCSI instances
 .Sh SYNOPSIS
 .Nm
-.Op Fl v
-.Op Fl d Ar directory
+.Op Fl d Ar sockdir
 .Ar command
 .Op Ar arguments ...
 .Sh DESCRIPTION
@@ -75,20 +74,112 @@
 The sessions can be listed by using the
 .Dv list_sessions
 command.
-.Pp
+.Ss Global Options
+.Bl -tag width xdxsockdirx
+.It Fl d Ar sockdir
+Specify the directory where the socket for
+.Xr iscsid 8
+lives.
+.El
+.Ss Target Address Specification
+The target address specification for the
+.Ic add_target
+and
+.Ic add_send_target
+commands may include a target name, target address (IP or FQDN),
+TCP port, and group tag.
+Either the target address or target name is required.
+(For add_send_target, a target address is required).
+The address, port, and group tag may optionally be repeated.
+.Bl -tag -width xaxtarget-addressx
+.It Fl a Ar target-address
+Specify the target address by IP or FQDN.
+.It Fl n Ar target-name
+Specify the target by name.
+.It Fl p Ar port-num
+The TCP port to connect to the target on.
+(Default port is 3260)
+.It Fl g Ar group-tag
+The group tag, a 16-bit integer.
+.El
+.Ss Portal Address Specification
+The portal address specification for the
+.Ic add_portal
+command may include an address (IP or FQDN), port, and group tag, plus
+portal options.
+.Bl -tag -width xaxtarget-addressx
+.It Fl a Ar target-address
+Specify the target address by IP or FQDN.
+.It Fl p Ar port-num
+The TCP port to connect to the target on.
+(Default port is 3260)
+.It Fl g Ar group-tag
+The group tag, a 16-bit integer.
+.It Fl h
+Use a CRC32 header digest.
+.It Fl d
+Use a CRC32 data digest.
+.It Fl l Ar segment-length
+Specify the max received data segment length.
+.El
+.Ss Target Options
+Target options are as follows:
+.Bl -tag -width xlxsegment-lengthx
+.It Fl h
+Use a CRC32 header digest.
+.It Fl d
+Use a CRC32 data digest.
+.It Fl w Ar time
+Time to wait.
+.It Fl r Ar time
+Time to retain.
+.It Fl e Ar level
+Error recovery level.
+.It Fl l Ar segment-length
+Specify the max received data segment length.
+.El
+.Ss Authentication Options
+Authentication options are as follows:
+.Bl -tag width 5n
+.It Fl t Ar type
+Specify authentication type.
+.Ar n
+indicates no authentication, while
+.Ar c
+indicates CHAP authentication, and
+.Ar C
+indicates Mutual CHAP authentication.
+.It Fl u Ar name
+User name.
+.It Fl s Ar secret
+Initiator secret.
+.It Fl S Ar secret
+Target secret.
+.El
+.Ss Nm Commands
 The
 .Nm
 command argument is taken from one of the following options:
-.Bl -tag -width XCXremove_send_targetXX
-.It version
-return the version number of the
+.Bl -tag -width 5n
+.It Cm version
+return version information from the
 .Nm
-utility
-.It add_target
-.It add_portal
-.It remove_target
-.It slp_find_targets
-.It refresh_targets
+utility and the
+.Xr iscsid 8
+daemon.
+.It Cm add_target Ar target-address-spec Oo Ar target-opts Oc Oo Ar auth-opts Oc Oo Fl N Ar symbolic-name Oc
+A
+.Ar target-address-spec
+may include name, address, port, and group tag, with address/port/tag
+possibly repeated.
+.It Cm add_portal Ar portal-address-spec Oo Fl I target-id Oc Oo Fl N symbolic-name Oc
+Add a portal to the list of portals.
+.It Cm remove_target Fl I Ar target-id
+.It Cm remove_target Fl n Ar target-name
+Remove a target by name or ID.
+.It Cm slp_find_targets
+Not implemented.
+.It Cm refresh_targets Op Fl I Ar target-id
 this command causes the iSCSI initiator to refresh its view of the
 iSCSI targets to which it is connected.
 If this command completes successfully, an
@@ -96,8 +187,9 @@
 value is printed.
 For more context on the exact usage of this
 command, please see the example below.
-.It list_targets
-.It add_send_target
+.It Cm list_targets
+Display a list of targets the iSCSI initiator knows about.
+.It Cm add_send_target Fl a Ar target-address Oo Ar target-address-spec Oc Oo Ar target-opts Oc Oo Ar auth-opts Oc Oo Fl N Ar symbolic-name Oc
 this command allows the iSCSI initiator to connect to an iSCSI
 target.
 The subsequent
@@ -107,14 +199,22 @@
 or as a textual FQDN.
 For more context on the exact usage of this
 command, please see the example below.
-.It remove_send_target
-.It list_send_targets
-.It add_isns_server
-.It remove_isns_server
-.It find_isns_servers
-.It list_isns_servers
-.It refresh_isns
-.It login
+.It Cm remove_send_target Fl I Ar target-id
+.It Cm remove_send_target Fl n Ar target-name
+Remove a send target from the list by name or
+.Ar target-id
+.It Cm list_send_targets
+Display the list of send targets configured.
+.It Cm add_isns_server Ar iSNS-address-spec
+Add an iSNS server using an address specification that may include name,
+address, and port.
+.It Cm remove_isns_server Fl I Ar isns-server-id
+.It Cm remove_isns_server Fl a Ar isns-server-address
+.It Cm find_isns_servers
+Not Implemented.
+.It Cm list_isns_servers
+.It Cm refresh_isns Op Fl I Ar id
+.It Cm login Oo Fl m Oc Oo Ar target-opts Oc Oo Ar auth-opts Oc Oo Fl P Ar portal-id Oc
 To be able to communicate with the iSCSI target, the initiator
 must login.
 This command allows this login to take place.
@@ -127,30 +227,42 @@
 number.
 For more context on the exact usage of this
 command, please see the example below.
-.It logout
-.It add_connection
-.It remove_connection
-.It inquiry
-.It read_capacity
-.It report_luns
-.It test_unit_ready
-.It add_initiator
-.It remove_initiator
-.It list_initiators
-.It list_sessions
+.It Cm logout Op Fl I Ar session-id
+.It Cm add_connection Oo Fl m Oc Oo Ar target-opts Oc Oo Ar auth-opts Oc Oo Fl P Ar portal-id Oc
+.It Cm remove_connection Fl I Ar session-id Fl C Ar connection-id
+.It Cm inquiry Oo Fl l Ar lun Oc Oo Fl d Ar detail Oc Oo Fl p Ar pag Oc
+.It Cm read_capacity Op Fl I Ar session-id Op Fl l Ar lun
+.It Cm report_luns Op Fl I Ar session-id
+.It Cm test_unit_ready Op Fl I Ar session-id
+.It Cm add_initiator Fl a Ar interface-address Op Fl N Ar symbolic-name
+.It Cm remove_initiator Fl I Ar portal-id
+.It Cm list_initiators
+.It Cm list_sessions Op Fl c
 Once login to the target has taken place, a session will have been created.
 To list the session information, this command is used.
 The session number and target information for each of the targets are displayed.
+If the
+.Fl c
+flag is used, connection information is displayed as well.
 For more context on the exact usage of this
 command, please see the example below.
-.It set_node_name
+.It Cm set_node_name Fl n Ar initiator-name Oo Fl A alias Oc Oo Fl i Ar isid Oc
+Set the initiator name.
+The default initiator name is
+iqn.1994-04.org.netbsd:iscsi.<hostname>:<hostid> .
+An
+.Ar alias
+can be specified as well as an
+.Ar isid
 .El
 .Sh EXAMPLES
 .Nm
 is intended to be used as follows:
 .Pp
 The initiator itself can be loaded as a kernel module, and works successfully
-on 2.0 (the host called "burner"), running against the NetBSD target on a 5.99 host.
+on 2.0 (the host called "burner"), running against the
+.Nx
+target on a 5.99 host.
 .Pp
 .Bd -literal
 burner# modload -v -s -p /usr/lkm/iscsi_post.sh /usr/lkm/iscsidrv.o
diff -r 8a5fcf22dff7 -r 843b78ecab36 sbin/iscsid/Makefile
--- a/sbin/iscsid/Makefile      Tue May 22 20:26:58 2012 +0000
+++ b/sbin/iscsid/Makefile      Wed May 30 08:06:26 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.1 2011/10/23 21:11:23 agc Exp $
+#      $NetBSD: Makefile,v 1.1.4.1 2012/05/30 08:06:26 sborrill Exp $
 
 PROG=  iscsid
 
@@ -13,8 +13,6 @@
 
 WARNS= 4
 
-# CPPFLAGS+= -DISCSI_DEBUG
-
 LDADD = -lpthread -lisns
 
 INCSDIR= /usr/include
diff -r 8a5fcf22dff7 -r 843b78ecab36 sbin/iscsid/iscsid.8
--- a/sbin/iscsid/iscsid.8      Tue May 22 20:26:58 2012 +0000
+++ b/sbin/iscsid/iscsid.8      Wed May 30 08:06:26 2012 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: iscsid.8,v 1.2 2011/11/21 08:23:20 njoly Exp $
+.\" $NetBSD: iscsid.8,v 1.2.2.1 2012/05/30 08:06:26 sborrill Exp $
 .\"
 .\" Copyright (c) 2011 Alistair Crooks <agc%NetBSD.org@localhost>
 .\" All rights reserved.
@@ -23,7 +23,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 8, 2011



Home | Main Index | Thread Index | Old Index