Commit Graph

70 Commits

Author SHA1 Message Date
Richard Scheffenegger
bd6bb49397 iscsi: per-session timeouts and rapid teardown of session on reconnect
Add per-Session configurable ping (SCSI NOP) and login timeouts.

Remove the torn down, old iSCSI session quickly, when performing a reconnect.

Reviewed By: trasz
Sponsored by:        NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D34198
2022-02-25 10:35:47 +01:00
Ed Maste
48cb3fee25 Retire obsolete iscsi_initiator(4)
The new iSCSI initiator iscsi(4) was introduced with FreeBSD 10.0, and
the old intiator was marked obsolete shortly thereafter (in commit
d32789d95c, MFC'd to stable/10 in ba54910169).  Remove it now.

Reviewed by:	jhb, mav
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32673
2021-10-26 16:17:35 -04:00
Gordon Bergling
69109a4fbd iscsi.conf(5): Fix a mandoc warning
- new sentence, new line
2020-11-20 16:41:32 +00:00
Adrian Chadd
c2a5b2abc7 [iscsictl] Fix compile issues that creep up with gcc-6.4
This fixes two warnings:

* double-definition of a symbol in a yacc header
* Comparison of an unsigned int being >= 0; that's always
  going to be true.

Reviewed by:	imp, rscheff
Differential Revision:	https://reviews.freebsd.org/D27036
2020-11-01 15:57:14 +00:00
Edward Tomasz Napierala
bce7ee9d41 Drop "All rights reserved" from all my stuff. This includes
Foundation copyrights, approved by emaste@.  It does not include
files which carry other people's copyrights; if you're one
of those people, feel free to make similar change.

Reviewed by:	emaste, imp, gbe (manpages)
Differential Revision:	https://reviews.freebsd.org/D26980
2020-10-28 13:46:11 +00:00
Richard Scheffenegger
4dfbcffbb9 Add network QoS support for PCP to iscsi initiator.
Make the Ethernet PCP codepoint configurable
for L2 local traffic, to allow lower latency for
iSCSI block IO. This addresses the initiator
side only.

Reviewed by:	mav, trasz, bcr
Sponsored by:	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D26739
2020-10-24 21:07:13 +00:00
Richard Scheffenegger
bfabdade5c Add DSCP support for network QoS to iscsi initiator.
Allow the DSCP codepoint also to be configurable
for the traffic in the direction from the initiator
to the target, such that writes and any requests
are also treated in the appropriate QoS class.

Reviewed by:	mav
MFC after:	2 weeks
Sponsored by:	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D26714
2020-10-09 14:33:09 +00:00
Edward Tomasz Napierala
4945a2641f Stop hardcoding WARNS in iscsictl(8).
MFC after:	2 weeks
Sponsored by:	DARPA
2020-04-01 15:08:53 +00:00
Mateusz Piotrowski
8ece0ee096 iscsictl.8: Add missing flag parameters
- Add missing parameters to flags in the description of available options.
- Remove spaces between alternative parameters and "|".
- Align descriptions of options to the longest option.
- Use em dash instead of a hyphen.

Reviewed by:	bcr
Approved by:	doc (bcr)
Approved by:	krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D18608
2018-12-27 14:44:01 +00:00
Edward Tomasz Napierala
be3d357e23 Make iscsictl(1) display "Disabled" status for disabled sessions.
MFC after:	2 weeks
2018-03-10 14:33:00 +00:00
Pedro F. Giffuni
1de7b4b805 various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
2017-11-27 15:37:16 +00:00
Niclas Zeising
37ab131446 Fix language in a bunch of error messages.
Reviewed by:		emaste
Approved by:		emaste
MFC after:		1 month
Differential Revision:	D13193
2017-11-22 18:06:41 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Warner Losh
a35f04fba2 Adopt SRCTOP in usr.bin
Prefer ${SRCTOP}/foo over ${.CURDIR}/../../foo and ${SRCTOP}/usr.bin/foo
over ${.CURDIR}/../foo for paths in Makefiles.

Differential Revision:	https://reviews.freebsd.org/D9932
Sponsored by:		Netflix
Silence on:		arch@ (twice)
2017-03-12 18:58:44 +00:00
Edward Tomasz Napierala
25b20d78f8 Move values displayed by "iscsictl -v" one character to the right,
to line up output from "iscsictl -v" with "ctladm islist -v".

MFC after:	2 weeks
2017-01-22 20:11:24 +00:00
Alexander Motin
d6a85ec2ee Remove some unused code.
MFC after:	2 weeks
2017-01-20 16:01:01 +00:00
Navdeep Parhar
97b84d344d Make the iSCSI parameter negotiation more flexible.
Decouple the send and receive limits on the amount of data in a single
iSCSI PDU.  MaxRecvDataSegmentLength is declarative, not negotiated, and
is direction-specific so there is no reason for both ends to limit
themselves to the same min(initiator, target) value in both directions.

Allow iSCSI drivers to report their send, receive, first burst, and max
burst limits explicitly instead of using hardcoded values or trying to
derive all of them from the receive limit (which was the only limit
reported by the drivers prior to this change).

Display the send and receive limits separately in the userspace iSCSI
utilities.

Reviewed by:	jpaetzel@ (earlier version), trasz@
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D7279
2016-08-25 05:22:53 +00:00
Edward Tomasz Napierala
4e5408f10c Report negotiated MaxBurstLength and FirstBurstLength in "iscsictl -v"
and "ctladm islist -v" outputs.

MFC after:	1 month
2016-06-05 08:48:37 +00:00
Edward Tomasz Napierala
ba165a31b3 Add "iscsictl -e". Among other things, it makes it possible to perform
discovery without attaching to the targets ("iscsictl -Ad ... -e off"),
and then attach to selected ones ("iscsictl -Mi ... -e on").

PR:		204129
MFC after:	1 month
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6633
2016-05-31 11:32:07 +00:00
Edward Tomasz Napierala
806ea85ac5 Make iscsictl(8) error messages more consistent.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-31 07:49:59 +00:00
Edward Tomasz Napierala
54fc4636f3 Do libxo cleanup even in case of errors.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-26 14:21:02 +00:00
Edward Tomasz Napierala
aa63d825a7 Make iscsictl(8) actually report non-zero status on errors. The "failed"
is negative, because the error returned from calls to ioctl(2) is negative.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-26 14:19:24 +00:00
Edward Tomasz Napierala
b0b3f0e152 Add the "-r" flag to iscsictl(8).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-06 13:45:42 +00:00
Edward Tomasz Napierala
6735d50255 Document the "Protocol" field of iscsi.conf(5).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-06 13:44:56 +00:00
Pedro F. Giffuni
af7ca7c85d usr.bin: minor spelling fixes on comments.
No functional change.
2016-05-01 16:13:05 +00:00
Glen Barber
52259a98ad MFH
Sponsored by:	The FreeBSD Foundation
2016-03-02 16:14:46 +00:00
Bryan Drewery
bd18fd57db DIRDEPS_BUILD: Regenerate without local dependencies.
These are no longer needed after the recent 'beforebuild: depend' changes
and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports
skipping 'make depend'.

Sponsored by:	EMC / Isilon Storage Division
2016-02-24 17:20:11 +00:00
Glen Barber
3c76ad5c10 Include correct is*ct*l program in iscsi package, and package the
legacy version separately.

Submitted by:	trasz
Sponsored by:	The FreeBSD Foundation
2016-02-16 01:18:49 +00:00
Joel Dahl
5837aafd13 mdoc: sort Xr 2016-01-18 20:21:38 +00:00
Craig Rodrigues
06691045ba Add more text to explain --libxo flag. 2015-12-01 19:18:53 +00:00
Bryan Drewery
b1f92fa229 META MODE: Update dependencies with 'the-lot' and add missing directories.
This is not properly respecting WITHOUT or ARCH dependencies in target/.
Doing so requires a massive effort to rework targets/ to do so.  A
better approach will be to either include the SUBDIR Makefiles directly
and map to DIRDEPS or just dynamically lookup the SUBDIR.  These lose
the benefit of having a userland/lib, userland/libexec, etc, though and
results in a massive package.  The current implementation of targets/ is
very unmaintainable.

Currently rescue/rescue and sys/modules are still not connected.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:23:19 +00:00
Enji Cooper
550d2b80ec Make libxo depend on libutil because it uses humanize_number after r287111
Remove overlinking in lib/libxo/tests, sbin/savecore, and
usr.bin/{iscsictl,wc,xo}

PR: 203673
Sponsored by: EMC / Isilon Storage Division
2015-10-18 07:30:50 +00:00
Edward Tomasz Napierala
fd3996c90a Remove write-only variable.
Submitted by:	Dominic Marks
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-10-17 16:05:42 +00:00
Edward Tomasz Napierala
1dba27c1bf Add -w flag to iscsictl(8) utility, to make it wait for successfull
session establishment.  Scripting is kind of hard without it.

Reviewed by:	mav@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3872
2015-10-17 13:06:52 +00:00
Marcel Moolenaar
d1a0d267b7 Upgrade libxo to 0.4.5.
Local changes incorporated by 0.4.5: r284340
Local changes retained: r276260, r282117

Obtained from:	https://github.com/Juniper/libxo
2015-08-24 16:26:20 +00:00
Edward Tomasz Napierala
01d54ad206 Add libxo(3) support to iscsictl(8).
PR:		198396
Submitted by:	Marie Helene Kvello-Aune <marieheleneka at gmail.com>
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-12 09:36:50 +00:00
Baptiste Daroussin
d56eff2c31 iscsictl(8) does not actually needs to be linked to libcam nor libutil 2015-04-09 21:14:40 +00:00
Edward Tomasz Napierala
42e70ae82a Add IPv6 example to iscsi.conf(5) and tweak ordering.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-02 11:52:34 +00:00
Edward Tomasz Napierala
dfc58cbca2 Rewrite iscsi.conf(5) to better match iscsictl(8).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-04-02 11:18:43 +00:00
Edward Tomasz Napierala
82babffba9 Make it possible to set (via iscsi.conf(5)) and query (via iscsictl -v)
initiator iSCSI offload.  Pass maximum data segment size supported by
chosen offload module to iscsid(8), and make iscsid(8) not try to negotiate
anything larger than that.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-02-05 06:37:59 +00:00
Joel Dahl
914f6e6290 mdoc: sort SEE ALSO. 2014-12-26 21:56:23 +00:00
Edward Tomasz Napierala
de29f585af Move iscsi.conf.5 from sbin/iscontrol/ to usr.bin/iscsictl/, as the
former is obsolete.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-12-05 12:38:01 +00:00
Baptiste Daroussin
3e11bd9e2a Convert to usr.bin/ to LIBADD
Reduce overlinking
2014-11-25 14:29:10 +00:00
Edward Tomasz Napierala
c7ee47a779 Make it possible to do "iscsictl -Rt xxx -p yyy", to remove a session
that matches both -t and -p.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-15 06:14:38 +00:00
Edward Tomasz Napierala
1cb587dc9c Fix iscsictl(8) and ctld(8) to correctly handle Windows newlines
(CRLF) in iscsi.conf and ctl.conf.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-29 12:22:32 +00:00
Edward Tomasz Napierala
2bd282696a Whitespace fixes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-10-22 09:17:17 +00:00
Allan Jude
4f9ec02771 Add the new iscsi(4) man page
Cross reference it from iscsid(8) and iscsictl(8)

Reviewed by:	trasz
Approved by:	bcr (mentor), wblock (mentor)
Sponsored by:	ScaleEngine Inc.
CR:		https://reviews.freebsd.org/D741
2014-09-13 18:40:12 +00:00
Enji Cooper
cfeea56955 Fix "make checkdpadd" in usr.bin/iscsictl by removing -lfl dependency
Approved by: rpaulo (mentor)
MFC after: 1 week
2014-08-23 20:42:37 +00:00
Edward Tomasz Napierala
b7a65e3936 Make the iSCSI stack use __FBSDID() properly.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-08-21 15:32:38 +00:00
Gavin Atkinson
ee3a0d1c0f Fix two typos in iscsictl.8
PR:		191581
Submitted by:	Jimmy Olgeni
MFC after:	3 days
2014-07-18 12:51:35 +00:00