freebsd-dev/usr.sbin/iscsid
John Baldwin 7b02c1e8c6 iscsi: Fetch limits based on a socket rather than assuming global limits.
cxgbei needs the ability to return different limits based on the
connection (e.g. if the connection is over a T5 adapter or a T6
adapter as well as factoring in the MTU).

This change plumbs through the changes in the ioctls without changing
any of the backends.  The limits callback passed to icl_register now
accepts a second socket argument which holds the integer file
descriptor.  To support ABI compatiblity for old binaries, the
callback should return "global" values if the socket fd is zero.

The CTL_ISCSI_LIMITS argument used with CTL_ISCSI by ctld(8) now
accepts the socket fd in a field that was previously part of a
reserved spare field.  Old binaries zero this request which results in
passing a socket fd of 0 to the limits callback.

The ISCSIDREQUEST ioctl no longer returns limits.  Instead, iscsid(8)
invokes a new ISCSIDLIMITS ioctl after establishing the connection via
connect(2).  For ABI compat, if the old ISCSIDREQUEST is invoked, the
global limits are still fetched (with a socket fd of 0) and returned.

Reviewed by:	mav
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34928
2022-04-18 12:53:28 -07:00
..
discovery.c iscsi: Handle large Text responses. 2021-12-29 14:36:04 -08:00
iscsid.8 Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
iscsid.c iscsi: Fetch limits based on a socket rather than assuming global limits. 2022-04-18 12:53:28 -07:00
iscsid.h Add an internal libiscsiutil library. 2021-12-22 10:43:11 -08:00
login.c libiscsiutil: Change keys_load/save to operate on data buffers. 2021-12-22 10:43:24 -08:00
Makefile Add an internal libiscsiutil library. 2021-12-22 10:43:11 -08:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00