Make it possible for the initiator side to operate in both proxy
and normal mode; this makes it possible to compile with the former
by default, but use it only when neccessary. That's especially
important for the userland part.
Sponsored by: The FreeBSD Foundation
Improve use of socket buffer upcalls.
Use soreadable()/sowriteable() in socket upcalls to avoid extra wakeups
until we have enough data to read or space to write.
Increase partial receive len from 1K to 128K to not wake up on every
received packet.
This significantly reduces locks congestion and CPU usage and improves
throughput for large I/Os on NICs without TSO and LRO.
MFC r264552 by mav@:
Close the race in older code, that caused connection stuck after r264348.
Sponsored by: iXsystems, Inc.
Rework the way we enable CTL iSCSI port. Previously conf_apply()
needed it to be already enabled, because listening in proxy mode
requires it; however, it's conf_apply() that opens pidfiles,
so it resulted in port being enabled before pidfile was opened.
This was not so bad, but it was also disabled when pidfile couldn't
be opened due to ctld already running; this means that starting
second ctld instance screwed up the first.
Sponsored by: The FreeBSD Foundation
Properly identify target portal when running in proxy mode. While here,
remove CTL_ISCSI_CLOSE, it wasn't used or implemented anyway.
Sponsored by: The FreeBSD Foundation
Add some stuff to make it easier to figure out for the system administrator
whether the ICL_KERNEL_PROXY stuff got compiled in correctly.
Sponsored by: The FreeBSD Foundation
Make it possible for the iSCSI target side to operate in both normal
and ICL_KERNEL_PROXY mode, and fix some bit rot so the latter actually
works again.
Sponsored by: The FreeBSD Foundation
Get rid of the "autoscaling", instead just set socket buffer sizes
in the usual way. The only thing the old code did was making things
less predictable.
MFC r264058:
Fix build, broken by r264025.
Sponsored by: The FreeBSD Foundation
Instead of "icltx" and "iclrx", use thread names with prefix from upper
layer, so that one can see which side of the stack the threads are for.
Sponsored by: The FreeBSD Foundation
Get rid of ICL lock; use upper-layer (initiator or target) lock instead.
This avoids extra locking in icl_pdu_queue(); the upper layer needs to call
it while holding its own lock anyway, to avoid sending PDUs out of order.
Sponsored by: The FreeBSD Foundation
Remove the homegrown ctl_be_block_io allocator, replacing it with UMA.
There is no performance difference.
Reviewed by: mav@
Sponsored by: The FreeBSD Foundation
Hide CTL messages about SCSI error responses. Too many users take
them for actual target errors. They can be enabled back by setting
kern.cam.ctl.verbose=1, or booting with bootverbose.
Sponsored by: The FreeBSD Foundation
When the kernel is running in a virtual machine, it cannot rely upon the
processor family to determine if the workaround for AMD Family 10h Erratum
383 should be enabled. To enable virtual machine migration among a
heterogeneous collection of physical machines, the hypervisor may have
been configured to report an older processor family with a reduced feature
set. Effectively, the reported processor family and its features are like
a "least common denominator" for the collection of machines.
Therefore, when the kernel is running in a virtual machine, instead of
relying upon the processor family, we now test for features that prove
that the underlying processor is not affected by the erratum. (The
features that we test for are unlikely to ever be emulated in software
on an affected physical processor.)
PR: 186061
Add {} braces so that the code conforms to the indentation.
Fortunately, I don't think doing the assignment of cap->tsomax
unconditionally causes any problem.