Make fcoe builds again

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
This commit is contained in:
Fabio M. Di Nitto 2011-02-24 16:04:10 +01:00
parent 7e8d285168
commit 6bde9c6810
9 changed files with 29 additions and 961 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
fcoe-utils-1.0.14.tar.gz fcoe-utils-1.0.14.tar.gz
/fcoe-utils-1.0.17.tar.gz

View File

@ -1,798 +0,0 @@
--- a/fcrls.c
+++ b/fcrls.c
@@ -395,7 +395,8 @@ static int rport_find(struct rport_info *rpi)
return ENODEV;
}
while (n--) {
- if (namelist[n]->d_type != DT_DIR)
+ if ((namelist[n]->d_type != DT_DIR) &&
+ (namelist[n]->d_type != DT_LNK))
goto free_name;
if (rport_parse(namelist[n]->d_name, &rpii))
goto free_name;
diff --git a/Makefile.am b/Makefile.am
index fa0f82e..b65e512 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -44,7 +44,7 @@ fcoe_configdir = ${sysconfdir}/fcoe
dist_fcoe_config_DATA = etc/cfg-ethx
## man pages for fcoeadm and fcoemon
-dist_man_MANS = doc/fcoeadm.8 doc/fcoemon.8 doc/fipvlan.8
+dist_man_MANS = doc/fcoeadm.8 doc/fcoemon.8 doc/fipvlan.8 doc/fcrls.8
## init script for fcoemon
dist_noinst_SCRIPTS = etc/initd/initd.suse etc/initd/initd.fedora \
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,7 +1,7 @@
## known to work with asciidoc version 8.4.5
## and the DocBook XSL Stylesheets version 1.75.2
-MAN_8_TXT := fcoeadm.txt fcoemon.txt fipvlan.txt
+MAN_8_TXT := fcoeadm.txt fcoemon.txt fipvlan.txt fcrls.txt
MAN_TXT := $(MAN_8_TXT)
MAN_8 := $(patsubst %.txt,%.8,$(MAN_8_TXT))
MAN := $(MAN_8)
--- /dev/null
+++ b/doc/fcrls.8
@@ -0,0 +1,86 @@
+'\" t
+.\" Title: fcrls
+.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
+.\" Date: 06/04/2010
+.\" Manual: Open-FCoE Tools
+.\" Source: Open-FCoE
+.\" Language: English
+.\"
+.TH "FCRLS" "8" "06/04/2010" "Open\-FCoE" "Open\-FCoE Tools"
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+fcrls \- Fibre Channel Read Link Error Status Block (RLS) tool
+.SH "SYNOPSIS"
+.sp
+\fBfcrls\fR \-\-port \fIrport_bsg_name\fR [\-\-quiet]
+.sp
+\fBfcrls\fR \-\-fcid \fIrport_port_FC\-ID\fR [\-\-quiet]
+.sp
+\fBfcrls\fR \-\-help
+.SH "DESCRIPTION"
+.sp
+The \fBfcrls\fR command performs Fibre Channel Read Link Error Status Block (RLS) ELS request (see FC\-LS\-2) via BSG over a given rport bsg name or FC\-ID\&.
+.sp
+\fBfcrls\fR takes either a rport bsg name or a rport port FC\-ID as the input\&. To disable verbose output, use the \fB\-\-quiet\fR option\&.
+.SH "OPTIONS"
+.PP
+\fB\-\-port\fR \fIrport_bsg_name\fR
+.RS 4
+Send RLS to a rport by FC remote port bsg name, e\&.g\&., rport\-7:0\-1\&.
+.RE
+.PP
+\fB\-\-fcid\fR \fIrport_port_FC\-ID\fR
+.RS 4
+Send RLS to a rport by port FC\-ID, e\&.g\&., 0xce000d\&.
+.RE
+.PP
+\fB\-\-quiet\fR
+.RS 4
+Disable verbose output\&.
+.RE
+.PP
+\fB\-\-help\fR
+.RS 4
+Display a help message with basic usage instructions\&.
+.RE
+.SH "EXAMPLES"
+.sp
+Sends RLS to the FC remote port as rport\-7:0\-1
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+fcrls \-\-port rport\-7:0\-1
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Sends RLS to the FC remote port with 0xce000d as its port FC\-ID
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+fcrls \-\-fcid 0xce000d
+.fi
+.if n \{\
+.RE
+.\}
+.SH "SEE ALSO"
+.sp
+\fBfcoeadm\fR(8)
+.SH "SUPPORT"
+.sp
+\fBfcrls\fR is part of the \fIfcoe\-utils\fR package, maintained through the \fIOpen\-FCoE\fR project\&. Resources for both developers and users can be found at the \fIOpen\-FCoE\fR website http://open\-fcoe\&.org/\&.
--- /dev/null
+++ b/doc/fcrls.txt
@@ -0,0 +1,68 @@
+///////////////////////////////////////////////////////////////////////////
+// vim:syntax=asciidoc:tw=75:
+//
+// This is an asciidoc text file, which will be converted into a UNIX man
+// page using asciidoc and the DocBook XSL stylesheets.
+//
+// If you are going to update this documentation, please modify this file
+// and then regenerate the nroff formated man page using the Makefile.
+///////////////////////////////////////////////////////////////////////////
+
+FCRLS(8)
+==========
+:man source: Open-FCoE
+:man manual: Open-FCoE Tools
+
+NAME
+----
+fcrls - Fibre Channel Read Link Error Status Block (RLS) tool
+
+SYNOPSIS
+--------
+*fcrls* --port _rport_bsg_name_ [--quiet]
+
+*fcrls* --fcid _rport_port_FC-ID_ [--quiet]
+
+*fcrls* --help
+
+DESCRIPTION
+-----------
+The *fcrls* command performs Fibre Channel Read Link Error Status Block (RLS)
+ELS request (see FC-LS-2) via BSG over a given rport bsg name or FC-ID.
+
+*fcrls* takes either a rport bsg name or a rport port FC-ID as the input. To
+disable verbose output, use the *--quiet* option.
+
+OPTIONS
+-------
+*--port* _rport_bsg_name_::
+ Send RLS to a rport by FC remote port bsg name, e.g., rport-7:0-1.
+
+*--fcid* _rport_port_FC-ID_::
+ Send RLS to a rport by port FC-ID, e.g., 0xce000d.
+
+*--quiet*::
+ Disable verbose output.
+
+*--help*::
+ Display a help message with basic usage instructions.
+
+EXAMPLES
+--------
+Sends RLS to the FC remote port as rport-7:0-1
+
+ fcrls --port rport-7:0-1
+
+Sends RLS to the FC remote port with 0xce000d as its port FC-ID
+
+ fcrls --fcid 0xce000d
+
+SEE ALSO
+--------
+*fcoeadm*(8)
+
+SUPPORT
+-------
+*fcrls* is part of the _fcoe-utils_ package, maintained through the
+_Open-FCoE_ project. Resources for both developers and users can be found
+at the _Open-FCoE_ website <http://open-fcoe.org/>.
--- a/Makefile.am
+++ b/Makefile.am
@@ -44,7 +44,8 @@ fcoe_configdir = ${sysconfdir}/fcoe
dist_fcoe_config_DATA = etc/cfg-ethx
## man pages for fcoeadm and fcoemon
-dist_man_MANS = doc/fcoeadm.8 doc/fcoemon.8 doc/fipvlan.8 doc/fcrls.8
+dist_man_MANS = doc/fcoeadm.8 doc/fcoemon.8 doc/fipvlan.8 doc/fcrls.8 \
+ doc/fcnsq.8
## init script for fcoemon
dist_noinst_SCRIPTS = etc/initd/initd.suse etc/initd/initd.fedora \
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,7 +1,7 @@
## known to work with asciidoc version 8.4.5
## and the DocBook XSL Stylesheets version 1.75.2
-MAN_8_TXT := fcoeadm.txt fcoemon.txt fipvlan.txt fcrls.txt
+MAN_8_TXT := fcoeadm.txt fcoemon.txt fipvlan.txt fcrls.txt fcnsq.txt
MAN_TXT := $(MAN_8_TXT)
MAN_8 := $(patsubst %.txt,%.8,$(MAN_8_TXT))
MAN := $(MAN_8)
--- /dev/null
+++ b/doc/fcnsq.8
@@ -0,0 +1,128 @@
+'\" t
+.\" Title: fcnsq
+.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
+.\" Date: 06/09/2010
+.\" Manual: Open-FCoE Tools
+.\" Source: Open-FCoE
+.\" Language: English
+.\"
+.TH "FCNSQ" "8" "06/09/2010" "Open\-FCoE" "Open\-FCoE Tools"
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+fcnsq \- Fibre Channel Name Server Query Tool
+.SH "SYNOPSIS"
+.sp
+\fBfcnsq\fR \fIhost\fR \-\-gpn \fIport_id\fR [\-q | \-\-quiet]
+.sp
+\fBfcnsq\fR \fIhost\fR \-\-gnn \fIport_id\fR [\-q | \-\-quiet]
+.sp
+\fBfcnsq\fR \fIhost\fR \-\-gspn \fIport_id\fR [\-q | \-\-quiet]
+.sp
+\fBfcnsq\fR \fIhost\fR \-\-gsnn \fIwwpn\fR [\-q | \-\-quiet]
+.sp
+\fBfcnsq\fR ?
+.SH "DESCRIPTION"
+.sp
+The \fBfcnsq\fR command performs Fibre Channel Name Server queries for a user\-specified FC Host\&. The supported name server query commands include: Get Port Name (GPN), Get Node Name (GNN), Get Symbolic Node Name (GSNN), and Get Symbolic Port Name (GSPN) as described in FC\-GS\-3 for the Common Transport (CT) services\&.
+.sp
+\fBfcnsq\fR takes the host bsg name as the input for the target host\&. Host bsg name must be a valid bsg device, e\&.g\&., "host12" as derived from /dev/bsg/fc_host12\&. For each name server query command, the argument is either a Port ID or a World Wide Port Name\&. Port IDs and World Wide Names must be specified in hexadecimal\&. To disable verbose output, use the \fB\-\-quiet\fR option\&.
+.SH "OPTIONS"
+.PP
+\fBhost\fR \fB\-\-gpn\fR \fIport_id\fR
+.RS 4
+Get Port Name by Port ID for
+\fIhost\fR\&.
+.RE
+.PP
+\fBhost\fR \fB\-\-gnn\fR \fIport_id\fR
+.RS 4
+Get Node Name by Port ID for
+\fIhost\fR\&.
+.RE
+.PP
+\fBhost\fR \fB\-\-gspn\fR \fIport_id\fR
+.RS 4
+Get Symbolic Port Name by Port ID for
+\fIhost\fR\&.
+.RE
+.PP
+\fBhost\fR \fB\-\-gsnn\fR \fIwwpn\fR
+.RS 4
+Get Symbolic Node Name by World Wide Port Name for
+\fIhost\fR\&.
+.RE
+.PP
+\fB\-q\fR, \fB\-\-quiet\fR
+.RS 4
+Disable verbose output\&.
+.RE
+.PP
+\fB?\fR
+.RS 4
+Display a help message with basic usage instructions\&.
+.RE
+.SH "EXAMPLES"
+.sp
+Query Get Port Name (GPN) from host12 for Port ID 0xbf0027
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+fcnsq host12 \-\-gpn bf0027
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Query Get Node Name (GNN) from host12 for Port ID 0xbf0027
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+fcnsq host12 \-\-gnn bf0027
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Query Get Symbolic Port Name (GSPN) from host12 for Port ID 0xbf0027
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+fcnsq host12 \-\-gspn bf0027
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Query Get Symbolic Node Name (GSNN) from host12 for WWWPN 0x1000001B213C9DDA
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+fcnsq host12 \-\-gsnn 0x1000001B213C9DDA
+.fi
+.if n \{\
+.RE
+.\}
+.SH "SEE ALSO"
+.sp
+\fBfcoeadm\fR(8)
+.SH "SUPPORT"
+.sp
+\fBfcnsq\fR is part of the \fIfcoe\-utils\fR package, maintained through the \fIOpen\-FCoE\fR project\&. Resources for both developers and users can be found at the \fIOpen\-FCoE\fR website http://open\-fcoe\&.org/\&.
--- /dev/null
+++ b/doc/fcnsq.txt
@@ -0,0 +1,93 @@
+///////////////////////////////////////////////////////////////////////////
+// vim:syntax=asciidoc:tw=75:
+//
+// This is an asciidoc text file, which will be converted into a UNIX man
+// page using asciidoc and the DocBook XSL stylesheets.
+//
+// If you are going to update this documentation, please modify this file
+// and then regenerate the nroff formated man page using the Makefile.
+///////////////////////////////////////////////////////////////////////////
+
+fcnsq(8)
+==========
+:man source: Open-FCoE
+:man manual: Open-FCoE Tools
+
+NAME
+----
+fcnsq - Fibre Channel Name Server Query Tool
+
+SYNOPSIS
+--------
+*fcnsq* _host_ --gpn _port_id_ [-q | --quiet]
+
+*fcnsq* _host_ --gnn _port_id_ [-q | --quiet]
+
+*fcnsq* _host_ --gspn _port_id_ [-q | --quiet]
+
+*fcnsq* _host_ --gsnn _wwpn_ [-q | --quiet]
+
+*fcnsq* ?
+
+DESCRIPTION
+-----------
+The *fcnsq* command performs Fibre Channel Name Server queries
+for a user-specified FC Host. The supported name server query commands
+include: Get Port Name (GPN), Get Node Name (GNN), Get Symbolic Node Name
+(GSNN), and Get Symbolic Port Name (GSPN) as described in FC-GS-3 for the
+Common Transport (CT) services.
+
+*fcnsq* takes the host bsg name as the input for the target host. Host
+bsg name must be a valid bsg device, e.g., "host12" as derived from
+/dev/bsg/fc_host12. For each name server query command, the argument is
+either a Port ID or a World Wide Port Name. Port IDs and World Wide Names
+must be specified in hexadecimal. To disable verbose output, use the *--quiet*
+option.
+
+OPTIONS
+-------
+*host* *--gpn* _port_id_::
+ Get Port Name by Port ID for _host_.
+
+*host* *--gnn* _port_id_::
+ Get Node Name by Port ID for _host_.
+
+*host* *--gspn* _port_id_::
+ Get Symbolic Port Name by Port ID for _host_.
+
+*host* *--gsnn* _wwpn_::
+ Get Symbolic Node Name by World Wide Port Name for _host_.
+
+*-q*, *--quiet*::
+ Disable verbose output.
+
+*?*::
+ Display a help message with basic usage instructions.
+
+EXAMPLES
+--------
+Query Get Port Name (GPN) from host12 for Port ID 0xbf0027
+
+ fcnsq host12 --gpn bf0027
+
+Query Get Node Name (GNN) from host12 for Port ID 0xbf0027
+
+ fcnsq host12 --gnn bf0027
+
+Query Get Symbolic Port Name (GSPN) from host12 for Port ID 0xbf0027
+
+ fcnsq host12 --gspn bf0027
+
+Query Get Symbolic Node Name (GSNN) from host12 for WWWPN 0x1000001B213C9DDA
+
+ fcnsq host12 --gsnn 0x1000001B213C9DDA
+
+SEE ALSO
+--------
+*fcoeadm*(8)
+
+SUPPORT
+-------
+*fcnsq* is part of the _fcoe-utils_ package, maintained through the
+_Open-FCoE_ project. Resources for both developers and users can be found
+at the _Open-FCoE_ website <http://open-fcoe.org/>.
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,7 +45,7 @@ dist_fcoe_config_DATA = etc/cfg-ethx
## man pages for fcoeadm and fcoemon
dist_man_MANS = doc/fcoeadm.8 doc/fcoemon.8 doc/fipvlan.8 doc/fcrls.8 \
- doc/fcnsq.8
+ doc/fcnsq.8 doc/fcping.8
## init script for fcoemon
dist_noinst_SCRIPTS = etc/initd/initd.suse etc/initd/initd.fedora \
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,7 +1,7 @@
## known to work with asciidoc version 8.4.5
## and the DocBook XSL Stylesheets version 1.75.2
-MAN_8_TXT := fcoeadm.txt fcoemon.txt fipvlan.txt fcrls.txt fcnsq.txt
+MAN_8_TXT := fcoeadm.txt fcoemon.txt fipvlan.txt fcrls.txt fcnsq.txt fcping.txt
MAN_TXT := $(MAN_8_TXT)
MAN_8 := $(patsubst %.txt,%.8,$(MAN_8_TXT))
MAN := $(MAN_8)
--- /dev/null
+++ b/doc/fcping.8
@@ -0,0 +1,204 @@
+'\" t
+.\" Title: fcping
+.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
+.\" Date: 06/04/2010
+.\" Manual: Open-FCoE Tools
+.\" Source: Open-FCoE
+.\" Language: English
+.\"
+.TH "FCPING" "8" "06/04/2010" "Open\-FCoE" "Open\-FCoE Tools"
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+fcping \- Fibre Channel Ping (ELS ECHO) tool
+.SH "SYNOPSIS"
+.sp
+\fBfcping\fR [\-fqx] [ \-i \fIinterval\fR ] [ \-c \fIcount\fR ] [ \-s \fIsize\fR ] \-h \fIsource\fR \fItarget\fR
+.sp
+source = \fIinterface\fR | \fIMAC\fR | \fIWWPN\fR | \fIFC\-ID\fR
+.sp
+target = \-F \fIWWPN\fR | \-N \fIWWPN\fR | \-F \fIFC\-ID\fR
+.SH "DESCRIPTION"
+.sp
+The \fBfcping\fR command performs the Fibre Channel FC\-LS\-2 ECHO ELS command and displays the reply\&. The max payload for \fBfcping\fR is 2108 bytes\&. When no \fB\-c\fR is given, \fBfcping\fR will continue until user interrupts\&.
+.SH "OPTIONS"
+.PP
+\fB\-f\fR
+.RS 4
+Flood ping
+.RE
+.PP
+\fB\-q\fR
+.RS 4
+Quiet! just print summary
+.RE
+.PP
+\fB\-x\fR
+.RS 4
+Hex dump of responses
+.RE
+.PP
+\fB\-i\fR \fIinterval\fR
+.RS 4
+Wait
+\fIinterval\fR
+seconds between each ping
+.RE
+.PP
+\fB\-c\fR \fIcount\fR
+.RS 4
+Stop after sending
+\fIcount\fR
+pings
+.RE
+.PP
+\fB\-h\fR \fIsource\fR
+.RS 4
+Source is
+\fIinterface\fR
+like ethX,
+\fIMAC\fR
+address,
+\fIWWPN\fR, or
+\fIFC\-ID\fR
+.RE
+.PP
+\fB\-s\fR \fIsize\fR
+.RS 4
+Byte\-length of ping request payload (max 2108)
+.RE
+.PP
+\fB\-F\fR \fIFC\-ID\fR
+.RS 4
+Destination port ID
+.RE
+.PP
+\fB\-P\fR \fIWWPN\fR
+.RS 4
+Destination world\-wide port name
+.RE
+.PP
+\fB\-N\fR \fIWWNN\fR
+.RS 4
+Destination world\-wide node name
+.RE
+.SH "EXAMPLES"
+.sp
+Sends ELS ECHO to Port FC\-ID 0xbf0027 from interface n0\&.170 with max 3 pings\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+fcping \-c 3 \-h n0\&.170 \-F 0xbf0027
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+sending echo to 0xBF0027
+echo 1 accepted 16\&.170 ms
+echo 2 accepted 7\&.053 ms
+echo 3 accepted 6\&.803 ms
+3 frames sent, 3 received 0 errors, 0\&.000% loss, avg\&. rt time 10\&.009 ms
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Sends ELS ECHO to WWNN 0x1000001B213C9DDA from interface n0\&.170 with max 3 pings and payload size 1500 bytes
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+fcping \-c 3 \-h n0\&.170 \-s 1500 \-N 0x1000001B213C9DDA
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+sending echo to 0xBF0027
+echo 1 accepted 6\&.597 ms
+echo 2 accepted 6\&.925 ms
+echo 3 accepted 12\&.419 ms
+3 frames sent, 3 received 0 errors, 0\&.000% loss, avg\&. rt time 8\&.647 ms
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Sends ELS ECHO to WWNN 0x1000001B213C9DDA from interface n0\&.170 continuously with payload of 32 bytes and hex\-dump the reply to the screen
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+fcping \-x \-h n0\&.170 \-s 32 \-N 0x1000001B213C9DDA
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+sending echo to 0xBF0027
+echo 1 accepted 6\&.937 ms
+response length 32
+ 0 02000000 00000001 00010203 04050607
+ 10 08090a0b 0c0d0e0f 10111213 14151617
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+echo 2 accepted 6\&.923 ms
+response length 32
+ 0 02000000 00000002 00010203 04050607
+ 10 08090a0b 0c0d0e0f 10111213 14151617
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+echo 3 accepted 84\&.929 ms
+response length 32
+ 0 02000000 00000003 00010203 04050607
+ 10 08090a0b 0c0d0e0f 10111213 14151617
+.fi
+.if n \{\
+.RE
+.\}
+.SH "SEE ALSO"
+.sp
+\fBfcoeadm\fR(8)
+.SH "SUPPORT"
+.sp
+\fBfcping\fR is part of the \fIfcoe\-utils\fR package, maintained through the \fIOpen\-FCoE\fR project\&. Resources for both developers and users can be found at the \fIOpen\-FCoE\fR website http://open\-fcoe\&.org/\&.
--- /dev/null
+++ b/doc/fcping.txt
@@ -0,0 +1,120 @@
+///////////////////////////////////////////////////////////////////////////
+// vim:syntax=asciidoc:tw=75:
+//
+// This is an asciidoc text file, which will be converted into a UNIX man
+// page using asciidoc and the DocBook XSL stylesheets.
+//
+// If you are going to update this documentation, please modify this file
+// and then regenerate the nroff formated man page using the Makefile.
+///////////////////////////////////////////////////////////////////////////
+
+fcping(8)
+==========
+:man source: Open-FCoE
+:man manual: Open-FCoE Tools
+
+NAME
+----
+fcping - Fibre Channel Ping (ELS ECHO) tool
+
+SYNOPSIS
+--------
+*fcping* [-fqx] [ -i _interval_ ] [ -c _count_ ] [ -s _size_ ] -h _source_ _target_
+
+source = _interface_ | _MAC_ | _WWPN_ | _FC-ID_
+
+target = -F _WWPN_ | -N _WWPN_ | -F _FC-ID_
+
+DESCRIPTION
+-----------
+The *fcping* command performs the Fibre Channel FC-LS-2 ECHO ELS command
+and displays the reply. The max payload for *fcping* is 2108 bytes. When
+no *-c* is given, *fcping* will continue until user interrupts.
+
+OPTIONS
+-------
+*-f*::
+ Flood ping
+
+*-q*::
+ Quiet! just print summary
+
+*-x*::
+ Hex dump of responses
+
+*-i* _interval_::
+ Wait _interval_ seconds between each ping
+
+*-c* _count_::
+ Stop after sending _count_ pings
+
+*-h* _source_::
+ Source is _interface_ like ethX, _MAC_ address, _WWPN_, or _FC-ID_
+
+*-s* _size_::
+ Byte-length of ping request payload (max 2108)
+
+*-F* _FC-ID_::
+ Destination port ID
+
+*-P* _WWPN_::
+ Destination world-wide port name
+
+*-N* _WWNN_::
+ Destination world-wide node name
+
+EXAMPLES
+--------
+Sends ELS ECHO to Port FC-ID 0xbf0027 from interface n0.170 with max 3 pings.
+
+ fcping -c 3 -h n0.170 -F 0xbf0027
+
+ sending echo to 0xBF0027
+ echo 1 accepted 16.170 ms
+ echo 2 accepted 7.053 ms
+ echo 3 accepted 6.803 ms
+ 3 frames sent, 3 received 0 errors, 0.000% loss, avg. rt time 10.009 ms
+
+
+Sends ELS ECHO to WWNN 0x1000001B213C9DDA from interface n0.170 with max 3 pings
+and payload size 1500 bytes
+
+ fcping -c 3 -h n0.170 -s 1500 -N 0x1000001B213C9DDA
+
+ sending echo to 0xBF0027
+ echo 1 accepted 6.597 ms
+ echo 2 accepted 6.925 ms
+ echo 3 accepted 12.419 ms
+ 3 frames sent, 3 received 0 errors, 0.000% loss, avg. rt time 8.647 ms
+
+Sends ELS ECHO to WWNN 0x1000001B213C9DDA from interface n0.170 continuously
+with payload of 32 bytes and hex-dump the reply to the screen
+
+ fcping -x -h n0.170 -s 32 -N 0x1000001B213C9DDA
+
+ sending echo to 0xBF0027
+ echo 1 accepted 6.937 ms
+ response length 32
+ 0 02000000 00000001 00010203 04050607
+ 10 08090a0b 0c0d0e0f 10111213 14151617
+
+ echo 2 accepted 6.923 ms
+ response length 32
+ 0 02000000 00000002 00010203 04050607
+ 10 08090a0b 0c0d0e0f 10111213 14151617
+
+ echo 3 accepted 84.929 ms
+ response length 32
+ 0 02000000 00000003 00010203 04050607
+ 10 08090a0b 0c0d0e0f 10111213 14151617
+
+
+SEE ALSO
+--------
+*fcoeadm*(8)
+
+SUPPORT
+-------
+*fcping* is part of the _fcoe-utils_ package, maintained through the
+_Open-FCoE_ project. Resources for both developers and users can be found
+at the _Open-FCoE_ website <http://open-fcoe.org/>.

View File

@ -1,20 +0,0 @@
--- fcoe-utils-1.0.7/etc/initd/initd.fedora 2009-03-27 21:40:22.000000000 +0100
+++ fcoe-utils-1.0.7/etc/initd/initd.fedora.update 2009-04-03 09:54:39.000000000 +0200
service_status()
@@ -109,6 +109,8 @@ status()
else
echo "Created interfaces: $interfaces"
fi
+ test -f /var/lock/subsys/fcoe
+ return $@
}
case "$1" in
@@ -137,6 +139,7 @@ case "$1" in
status)
status
+ exit $?
;;
*)

View File

@ -1,40 +0,0 @@
--- fcoe-utils-1.0.7/etc/initd/initd.fedora 2009-03-27 21:40:22.000000000 +0100
+++ fcoe-utils-1.0.7/etc/initd/initd.fedora.update 2009-04-03 09:54:39.000000000 +0200
@@ -15,14 +15,17 @@
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
#
+# chkconfig: - 21 80
+#
# Maintained at www.Open-FCoE.org
### BEGIN INIT INFO
# Provides: fcoe
# Required-Start: network
# Required-Stop:
-# Default-Start: 3 5
-# Default-Stop: 3 5
+# Default-Start:
+# Default-Stop:
+# Short-Description: Open-FCoE Initiator
# Description: Open-FCoE Initiator
### END INIT INFO
@@ -69,6 +72,9 @@ service_start()
daemon --pidfile ${PID_FILE} ${FCOEMON} ${FCOEMON_OPTS}
+ echo
+ touch /var/lock/subsys/fcoe
+
echo
}
@@ -89,6 +95,7 @@ service_stop()
rm -f /var/run/fcoemon.*
rm -f /tmp/fcoemon.dcbd.*
+ rm -f /var/lock/subsys/fcoe
}
status()

View File

@ -1,11 +0,0 @@
--- fcoe-utils-1.0.8/Makefile.am.orig 2009-07-31 13:28:11.484799253 +0200
+++ fcoe-utils-1.0.8/Makefile.am 2009-07-31 13:28:38.331800646 +0200
@@ -5,7 +5,7 @@
sbin_PROGRAMS = fcoeadm fcoemon fcping fipvlan fcnsq fcrls
## all targets should look for headers in the include directory
-AM_CPPFLAGS = -I${srcdir}/include -I${builddir}/include
+AM_CPPFLAGS = -I${srcdir}/include -I${builddir}/include -I/lib/modules/`rpm -q --list kernel | grep "^/lib/modules/.*/build$$" | cut -f4 -d"/" | sort -r | head -1`/build/include
## pass the sysconfdir into the C proprocessor
AM_CPPFLAGS += -DSYSCONFDIR="\"${sysconfdir}\""
AM_CFLAGS = -Wall

View File

@ -1,64 +0,0 @@
--- fcoe-utils-1.0.14/etc/initd/initd.fedora.orig 2010-06-03 13:26:01.000000000 +0200
+++ fcoe-utils-1.0.14/etc/initd/initd.fedora 2010-06-03 13:28:10.000000000 +0200
@@ -100,11 +100,13 @@
status()
{
+ status=0
pidof $FCOEMON
if [ $? -eq 0 ]; then
echo "$FCOEMON -- RUNNING, pid=`cat $PID_FILE`"
else
echo "$FCOEMON -- UNUSED"
+ status=3
fi
interfaces=`$FCOEADM -i 2>&1 | \
@@ -115,9 +117,15 @@
echo "No interfaces created."
else
echo "Created interfaces: $interfaces"
+ status=0
fi
- test -f /var/lock/subsys/fcoe
- return $@
+ if [ -f /var/lock/subsys/fcoe -a $status -eq 3 ]; then
+ status=2
+ fi
+ if [ -f /var/run/fcoe.pid -a $status -eq 3 ]; then
+ status=1
+ fi
+ return $status
}
case "$1" in
@@ -135,22 +143,20 @@
;;
force-reload)
- echo "force-reload not yet implemented"
- failure
- ;;
-
- reload)
- echo "reload not yet implemented"
- failure
+ stop force
+ start
;;
status)
status
exit $?
;;
-
+ condrestart|try-restart)
+ status || exit 0
+ restart
+ ;;
*)
- echo "Usage: $0 {start|stop [force]|status|restart [force]}"
+ echo "Usage: $0 {start|stop [force]|status|restart [force]|force-reload|condrestart|try-restart}"
exit 1
;;
esac

View File

@ -1,6 +1,6 @@
Name: fcoe-utils Name: fcoe-utils
Version: 1.0.14 Version: 1.0.17
Release: 5%{?dist} Release: 1%{?dist}
Summary: Fibre Channel over Ethernet utilities Summary: Fibre Channel over Ethernet utilities
Group: Applications/System Group: Applications/System
@ -8,25 +8,19 @@ License: GPLv2
URL: http://www.open-fcoe.org URL: http://www.open-fcoe.org
# This source was pulled from upstream git repository # This source was pulled from upstream git repository
# To make a tarball, just run: # To make a tarball, just run:
# git clone git://open-fcoe.org/openfc/fcoe-utils.git && cd fcoe-utils # git clone git://open-fcoe.org/fcoe/fcoe-utils.git && cd fcoe-utils
# git archive --prefix=fcoe-utils-%{version}/ v%{version} > ../fcoe-utils-%{version}.tar # git archive --prefix=fcoe-utils-%{version}/ v%{version} > ../fcoe-utils-%{version}.tar
# cd .. && gzip fcoe-utils-%{version} # cd .. && gzip fcoe-utils-%{version}
Source0: %{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz
Source1: quickstart.txt Source1: quickstart.txt
Patch0: fcoe-utils-1.0.7-init.patch Patch0: fcoe-utils-1.0.12-makefile-data-hook.patch
Patch1: fcoe-utils-1.0.7-init-condrestart.patch Patch1: fcoe-utils-1.0.14-no-vconfig.patch
Patch2: fcoe-utils-1.0.8-includes.patch Patch2: fcoe-include-headers.patch
Patch3: fcoe-utils-1.0.8-init-LSB.patch
Patch4: fcoe-utils-1.0.12-makefile-data-hook.patch
Patch5: fcoe-utils-1.0.14-no-vconfig.patch
Patch6: fcoe-sparc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExcludeArch: s390 ppc ExcludeArch: s390 ppc
BuildRequires: libhbaapi-devel lldpad-devel libtool automake BuildRequires: libhbaapi-devel lldpad-devel
%ifnarch sparc sparcv9 BuildRequires: libtool automake autoconf
BuildRequires: kernel-devel
%endif
Requires: lldpad libhbalinux >= 1.0.9 iproute device-mapper-multipath Requires: lldpad libhbalinux >= 1.0.9 iproute device-mapper-multipath
Requires(post): chkconfig Requires(post): chkconfig
Requires(preun): chkconfig initscripts Requires(preun): chkconfig initscripts
@ -39,19 +33,9 @@ fcoemon - service to configure DCB Ethernet QOS filters, works with dcbd or lldp
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .initPatch %patch0 -p1 -b .data-hook
%patch1 -p1 -b .condrestartPatch %patch1 -p1 -b .no-vconfig
%patch2 -p1 -b .includes-fix %patch2 -p1 -b .headers
%patch3 -p1 -b .initLSB
%patch4 -p1 -b .data-hook
%patch5 -p1 -b .no-vconfig
# we dont build a kernel on 32 bit sparc so have no kernel-devel
# patch in a copy of the headers for use.
# userland is entirely 32 bit and kernel is 64 bit
%ifarch sparc sparcv9
%patch6 -p1 -b .sparc
%endif
%build %build
./bootstrap.sh ./bootstrap.sh
@ -126,6 +110,22 @@ fi
%changelog %changelog
* Thu Feb 24 2011 Fabio M. Di Nitto <fdinitto@redhat.com> - 1.0.17-1
- Pull in new upstream release (required to build)
- Fix git clone URL in comments
- Drop fcoe-utils-1.0.7-init.patch, fcoe-utils-1.0.7-init-condrestart.patch
and fcoe-utils-1.0.8-init-LSB.patch that are now upstream
- Drop fcoe-utils-1.0.8-includes.patch and use a copy of kernel headers
for all architectures (rename fcoe-sparc.patch to fcoe-include-headers.patch)
Upstream added detection to avoid inclusion of kernel headers in the build
and it expects to find the userland headers installed. Those have not
yet propagated in Fedora.
Use temporary this workaround, since fcoe is a requiment for anaconda
and it failed to build for a while
- Drop BuildRequires on kernel-devel
- Add BuildRequires on autoconf (it is used and not installed by default
on all build chroots)
* Wed Feb 23 2011 Dennis Gilmore <dennis@ausil.us> - 1.0.14-5 * Wed Feb 23 2011 Dennis Gilmore <dennis@ausil.us> - 1.0.14-5
- patch in headers used from kernel-devel on 32 bit sparc - patch in headers used from kernel-devel on 32 bit sparc

View File

@ -1 +1 @@
b0ae9cba670eb94a5e28da88d0eb6a18 fcoe-utils-1.0.14.tar.gz 18fc04e7bda993f8297f1106a44edb2b fcoe-utils-1.0.17.tar.gz