freebsd-nq/usr.sbin/ctld
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
..
ctl.conf.5 Add network QoS support for PCP to iscsi target. 2020-10-24 21:10:53 +00:00
ctld.8 Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
ctld.c Add an internal libiscsiutil library. 2021-12-22 10:43:11 -08:00
ctld.h iscsi: Fetch limits based on a socket rather than assuming global limits. 2022-04-18 12:53:28 -07:00
discovery.c iscsi: Handle large Text responses. 2021-12-29 14:36:04 -08:00
isns.c
isns.h
kernel.c iscsi: Fetch limits based on a socket rather than assuming global limits. 2022-04-18 12:53:28 -07:00
login.c iscsi: Fetch limits based on a socket rather than assuming global limits. 2022-04-18 12:53:28 -07:00
Makefile ctld: Disable -Wcast-align warnings. 2021-12-22 15:23:45 -08:00
Makefile.depend
parse.y [ctld] Fix compilation under gcc-6.4 2020-11-01 21:18:21 +00:00
token.l Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
uclparse.c Fix an early return in ctld UCL parser 2021-08-30 22:59:33 -04:00