Page MenuHomeFreeBSD

iscsi: Fetch limits based on a socket rather than assuming global limits.
ClosedPublic

Authored by jhb on Apr 15 2022, 5:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 4:15 PM
Unknown Object (File)
Sun, Nov 3, 4:15 PM
Unknown Object (File)
Sun, Nov 3, 4:15 PM
Unknown Object (File)
Sun, Nov 3, 3:53 PM
Unknown Object (File)
Sep 30 2024, 4:30 AM
Unknown Object (File)
Sep 30 2024, 4:18 AM
Unknown Object (File)
Sep 30 2024, 2:32 AM
Unknown Object (File)
Sep 18 2024, 9:25 PM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I have no objections. Only wonder what is the mentioned relations to MTU and what happen if MTU change live?

This revision is now accepted and ready to land.Apr 18 2022, 1:47 AM
In D34928#792010, @mav wrote:

I have no objections. Only wonder what is the mentioned relations to MTU and what happen if MTU change live?

cxgbei(4) achieves optimal performance when the DSL is <= MTU (roughly speaking, @np has been looking at this more recently than I have). If the MTU changes live then this change would not renegotiate the DSL for existing connections. The more obscure use case for this change that I have on my test boxes is that I have machines with both T5 and T6 adapters and the current global limits scheme means all my connections default to the lower T5 limits rather than T6.