<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/iscsi, branch releng/12.2</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>MFC 361400: Do not try to fill socket send buffer to the last byte.</title>
<updated>2020-06-02T20:42:25+00:00</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2020-06-02T20:42:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0302af9dd24e2466d12cea69bf2a21e4b5ad491f'/>
<id>0302af9dd24e2466d12cea69bf2a21e4b5ad491f</id>
<content type='text'>
Setting so_snd.sb_lowat to at least 1/8 of the socket buffer size allows
send thread more actively use PDUs coalescing, that dramatically reduces
TCP lock congestion and number of context switches, when the socket is
full and PDUs are small.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Setting so_snd.sb_lowat to at least 1/8 of the socket buffer size allows
send thread more actively use PDUs coalescing, that dramatically reduces
TCP lock congestion and number of context switches, when the socket is
full and PDUs are small.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typo in a warning message.</title>
<updated>2018-03-14T18:27:06+00:00</updated>
<author>
<name>Edward Tomasz Napierala</name>
<email>trasz@FreeBSD.org</email>
</author>
<published>2018-03-14T18:27:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6960c4e135511c9314bc486a1e0ab6f7c837aa63'/>
<id>6960c4e135511c9314bc486a1e0ab6f7c837aa63</id>
<content type='text'>
MFC after:	2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFC after:	2 weeks
</pre>
</div>
</content>
</entry>
<entry>
<title>Check for duplicates when modifying an iSCSI session.  Previously we did</title>
<updated>2018-03-10T14:21:37+00:00</updated>
<author>
<name>Edward Tomasz Napierala</name>
<email>trasz@FreeBSD.org</email>
</author>
<published>2018-03-10T14:21:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8ff2372a2cea53e12834b8f3336ad23d22a9ad21'/>
<id>8ff2372a2cea53e12834b8f3336ad23d22a9ad21</id>
<content type='text'>
this check on open, but "iscsictl -M", or an iSCSI redirect received by
iscsid(8) could end up with two sessions with the same target name and
portal.

MFC after:	2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this check on open, but "iscsictl -M", or an iSCSI redirect received by
iscsid(8) could end up with two sessions with the same target name and
portal.

MFC after:	2 weeks
</pre>
</div>
</content>
</entry>
<entry>
<title>Add SPDX tags to iscsi(4).</title>
<updated>2018-01-24T16:58:26+00:00</updated>
<author>
<name>Edward Tomasz Napierala</name>
<email>trasz@FreeBSD.org</email>
</author>
<published>2018-01-24T16:58:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=43ee6e9d7bea350d40fd00bde00429e9477d401a'/>
<id>43ee6e9d7bea350d40fd00bde00429e9477d401a</id>
<content type='text'>
MFC after:	2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFC after:	2 weeks
</pre>
</div>
</content>
</entry>
<entry>
<title>Move the DIAGNOSTIC check for lost iSCSI PDUs from icl_conn_close()</title>
<updated>2017-12-09T15:34:40+00:00</updated>
<author>
<name>Edward Tomasz Napierala</name>
<email>trasz@FreeBSD.org</email>
</author>
<published>2017-12-09T15:34:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=22d3bb2625f587b9d09a8cfb4228a7e760a3344e'/>
<id>22d3bb2625f587b9d09a8cfb4228a7e760a3344e</id>
<content type='text'>
to icl_conn_free().  It's perfectly valid for the counter to be non-zero
in the former.

MFC after:	2 weeks
Sponsored by:	playkey.net
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to icl_conn_free().  It's perfectly valid for the counter to be non-zero
in the former.

MFC after:	2 weeks
Sponsored by:	playkey.net
</pre>
</div>
</content>
</entry>
<entry>
<title>sys/dev: further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-27T14:52:40+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-27T14:52:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=718cf2ccb9956613756ab15d7a0e28f2c8e91cab'/>
<id>718cf2ccb9956613756ab15d7a0e28f2c8e91cab</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make sure the iSCSI I/O limits are set properly so that the ISCSIDSEND IOCTL</title>
<updated>2017-11-23T13:57:44+00:00</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2017-11-23T13:57:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9ac7c5a64ca5728ea0ed15fc3c191695938f226d'/>
<id>9ac7c5a64ca5728ea0ed15fc3c191695938f226d</id>
<content type='text'>
can be used prior to the ISCSIDHANDOFF IOCTL which set the negotiated values.
Else the login PDU will fail when passing the "-r" option to "iscsictl" which
means iSCSI over RDMA instead of TCP/IP.

Discussed with:	np@ and trasz@
Sponsored by:	Mellanox Technologies
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
can be used prior to the ISCSIDHANDOFF IOCTL which set the negotiated values.
Else the login PDU will fail when passing the "-r" option to "iscsictl" which
means iSCSI over RDMA instead of TCP/IP.

Discussed with:	np@ and trasz@
Sponsored by:	Mellanox Technologies
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>iscsi_shutdown_post: do nothing if panic-ing</title>
<updated>2017-10-24T14:59:31+00:00</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2017-10-24T14:59:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e54fb4ff8c74ba6e60a89b7bf03cbed819a91f67'/>
<id>e54fb4ff8c74ba6e60a89b7bf03cbed819a91f67</id>
<content type='text'>
There is nothing that that routine should or could really do in that
context.

Reported by:	Ben RUBSON &lt;ben.rubson@gmail.com&gt;
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is nothing that that routine should or could really do in that
context.

Reported by:	Ben RUBSON &lt;ben.rubson@gmail.com&gt;
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>never retry oustanding requests when terminating iscsi session</title>
<updated>2017-10-17T16:03:59+00:00</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2017-10-17T16:03:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ad10496cf48ed751d53a53612717738cf475f4bf'/>
<id>ad10496cf48ed751d53a53612717738cf475f4bf</id>
<content type='text'>
CAM_REQ_ABORTED sounds natural for aborting outstanding requests when
tearing down a session, but that status actually causes eligible
requests to be tried again.  That's completely useless, so let's use
CAM_DEV_NOT_THERE instead.  Perhaps there is a better status, but this
should be good enough.  The change should affect only the session
termination.

Tested by:	Ben RUBSON &lt;ben.rubson@gmail.com&gt;
Reviewed by:	mav, trasz
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D12653
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CAM_REQ_ABORTED sounds natural for aborting outstanding requests when
tearing down a session, but that status actually causes eligible
requests to be tried again.  That's completely useless, so let's use
CAM_DEV_NOT_THERE instead.  Perhaps there is a better status, but this
should be good enough.  The change should affect only the session
termination.

Tested by:	Ben RUBSON &lt;ben.rubson@gmail.com&gt;
Reviewed by:	mav, trasz
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D12653
</pre>
</div>
</content>
</entry>
<entry>
<title>iscsi: do not hold the global lock while tearing down a session</title>
<updated>2017-10-17T15:39:38+00:00</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2017-10-17T15:39:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=20e9cab5faba8bb4589bb4cfbb1971bb744366fb'/>
<id>20e9cab5faba8bb4589bb4cfbb1971bb744366fb</id>
<content type='text'>
It should be sufficient to hold the lock just for removing the session
from the session list.  Everything else should be covered by the session
specific lock.

On top of that, at present we can get a deadlock caused by waiting on
the CAM SIM reference count while holding the global lock.  A specific
scenario involving ZFS is this:
- concurrent termination of two sessions, S1 and S2
- session S1 completed all I/Os and sleeps in CAM waiting for device
  close by ZFS;
- session S2 is also dead now, but can not forcefully complete
  outstanding requests by calling iscsi_session_cleanup() from
  iscsi_maintenance_thread_terminate(), since it can't get the same
  global sc_lock;
- as soon as there are unfinished requests, ZFS can not do
  spa_config_enter() as writer, and so can not close the device for
  session S1;
- deadlock.

Reported by:	Ben RUBSON &lt;ben.rubson@gmail.com&gt;
Tested by:	Ben RUBSON &lt;ben.rubson@gmail.com&gt;
Reviewed by:	mav, trasz
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D12652
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It should be sufficient to hold the lock just for removing the session
from the session list.  Everything else should be covered by the session
specific lock.

On top of that, at present we can get a deadlock caused by waiting on
the CAM SIM reference count while holding the global lock.  A specific
scenario involving ZFS is this:
- concurrent termination of two sessions, S1 and S2
- session S1 completed all I/Os and sleeps in CAM waiting for device
  close by ZFS;
- session S2 is also dead now, but can not forcefully complete
  outstanding requests by calling iscsi_session_cleanup() from
  iscsi_maintenance_thread_terminate(), since it can't get the same
  global sc_lock;
- as soon as there are unfinished requests, ZFS can not do
  spa_config_enter() as writer, and so can not close the device for
  session S1;
- deadlock.

Reported by:	Ben RUBSON &lt;ben.rubson@gmail.com&gt;
Tested by:	Ben RUBSON &lt;ben.rubson@gmail.com&gt;
Reviewed by:	mav, trasz
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D12652
</pre>
</div>
</content>
</entry>
</feed>
