195482 Commits

Author SHA1 Message Date
gjb
722b26e3c0 Document r265388, addition of mpr(4).
Sponsored by:	The FreeBSD Foundation
2014-05-07 12:48:18 +00:00
marius
c1f0e5c458 MFC: r265248
Allow GEOM_VINUM to be statically compiled into the kernel.

Submitted by:	gleb
2014-05-07 09:55:47 +00:00
delphij
ebef83dbd2 MFC r264573+264608+264609:
Sync with OpenBSD.
2014-05-07 08:06:54 +00:00
trasz
d6c003e920 MFC r264405:
Fix periph listing when IOCTL buffer border hits result for wanted bus.
2014-05-07 08:04:41 +00:00
trasz
e278af05e2 MFC r264355 by mav@:
Remove unused val argument value from SYSCTL_INT() calls.
2014-05-07 08:03:30 +00:00
trasz
73fdbcd002 MFC r264877:
Style fixes.

Sponsored by:	The FreeBSD Foundation
2014-05-07 08:00:59 +00:00
trasz
09692139dc MFC r264876:
Grammar fix.
2014-05-07 07:59:44 +00:00
trasz
721f1b951c MFC r264604:
Remove redundant code.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:57:53 +00:00
trasz
c8af11f514 MFC r264549:
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
2014-05-07 07:56:36 +00:00
trasz
6f6c510356 MFC r264545:
Fix typo.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:54:47 +00:00
trasz
16f70f6ffb MFC r264348 by mav@:
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.
2014-05-07 07:53:24 +00:00
trasz
a3b0c7e4a8 MFC r264544:
Add kern.iscsi.fail_on_disconnection; this is required for gmultipath
to work.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:48:32 +00:00
trasz
5498c3860b MFC r264538:
Remove useless debug.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:47:29 +00:00
trasz
85e3b0d2dc MFC r264537:
Be more strict with locking for is_waiting_for_iscsid variable.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:46:23 +00:00
trasz
6dac0bfb68 MFC r264536:
Get rid of ISCSIDCLOSE; it wasn't used and is redundant anyway,
because of ISCSIDFAIL.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:45:22 +00:00
trasz
4dda47a3fa MFC r264535:
English.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:44:17 +00:00
trasz
854e04966d MFC r264534:
If we fail to create LUN, try again on next configuration reload.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:43:13 +00:00
trasz
db043740d7 MFC r264533:
Use consistent punctuation.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:41:58 +00:00
trasz
25fa6ec500 MFC r264532:
Use proper terminology in debug messages.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:40:45 +00:00
trasz
4eacdf9453 MFC r264531:
Constify.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:39:16 +00:00
trasz
21ec0cf2d0 MFC r264530:
Properly pass the initiator address when running in proxy mode.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:37:55 +00:00
trasz
a59839947c MFC r264529:
Use socket address from accept(2) instead of retrieving it via
getpeername(2).

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:36:46 +00:00
trasz
04b1f4adf5 MFC r264528:
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
2014-05-07 07:35:21 +00:00
trasz
1abd1411d7 MFC r264527:
Make it possible to interrupt login when running in proxy mode.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:33:56 +00:00
trasz
f2085cbf68 MFC r264526:
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
2014-05-07 07:32:45 +00:00
trasz
f86dc9fb87 MFC r264525:
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
2014-05-07 07:31:25 +00:00
trasz
690b7a7a12 MFC r264524:
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
2014-05-07 07:29:39 +00:00
trasz
7420d3ad26 MFC r264500:
Stop treating LUN 0 as mandatory.  There is no reason to do that.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:28:23 +00:00
trasz
69dfd86371 MFC r263740:
Use a less unusual syntax in debug printfs.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:25:47 +00:00
trasz
91f13dce9c MFC r264264 by mav@:
Wakeup only one thread of added in r263978i at a time.

This slightly reduces lock congestion between threads.
2014-05-07 07:20:02 +00:00
trasz
e342286804 MFC r264163:
Remove hack to pass STAILQ to a function and do it properly instead.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:18:38 +00:00
trasz
c4225c1e15 MFC r264122:
Rework the iSCSI PDU transmit code to avoid lock contention and coalesce
PDUs before sending.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:17:11 +00:00
trasz
339da02d0d MFC r264110:
All the iSCSI sysctls are also tunables; advertise that.

Sponsored by:	The FreeBSD Foundation
2014-05-07 06:46:59 +00:00
trasz
a88bc10e55 MFC r264109:
We don't need TAILQ for iSCSI PDUs; STAILQ is enough.

Sponsored by:	The FreeBSD Foundation
2014-05-07 06:44:19 +00:00
trasz
422c729ba7 MFC r264026:
Enable a KASSERT.

Sponsored by:	The FreeBSD Foundation
2014-05-07 06:41:33 +00:00
trasz
c0421f4379 MFC r264025:
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
2014-05-07 06:38:19 +00:00
trasz
4fd7169afe MFC r264024:
Use atomic ops instead of mutexes where appropriate.

Submitted by:	mav@
Sponsored by:	The FreeBSD Foundation
2014-05-07 06:34:03 +00:00
trasz
26ce3cd6c7 MFC r264023:
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
2014-05-07 06:31:45 +00:00
trasz
76ebd34835 MFC r264022:
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
2014-05-07 06:29:01 +00:00
trasz
dfa8f3f0a1 MFC r264020:
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
2014-05-07 06:26:34 +00:00
trasz
2cb2c64704 MFC r263979:
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
2014-05-07 06:24:46 +00:00
trasz
4ceefd197d MFC r263978:
Make it possible to have multiple CTL worker threads.  Leave the default
of 1 for now.

Sponsored by:	The FreeBSD Foundation
2014-05-07 06:22:51 +00:00
trasz
d026d687fc MFC r263811:
Remove ctl_mem_pool.{c,h}.

Sponsored by:	The FreeBSD Foundation
2014-05-07 06:20:35 +00:00
trasz
0060724119 MFC r263810:
Rework cfiscsi_datamove_in() to obey expected data transfer length
received from the initiator.

Sponsored by:	The FreeBSD Foundation
2014-05-07 06:18:03 +00:00
trasz
6296615c5f MFC r263745:
Target Transfer Tag is opaque; no need to htonl(3) it.

Sponsored by:	The FreeBSD Foundation
2014-05-07 06:14:41 +00:00
trasz
3c0db90228 MFC r263743:
Move the ic_outstanding_count under #ifdef DIAGNOSTIC.

Sponsored by:	The FreeBSD Foundation
2014-05-07 06:12:59 +00:00
trasz
7ccc1ec941 MFC r263742:
Fix harmless warning after reconnecting a session and not doing anything
with it.

Sponsored by:	The FreeBSD Foundation
2014-05-07 06:10:55 +00:00
alc
8be11d4db2 MFC r262338
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
2014-05-07 00:32:49 +00:00
emaste
db8dfd2b0f MFC r261908 by ian: Fix a typo, C_ALSOLUTE -> C_ABSOLUTE. 2014-05-06 23:28:48 +00:00
rmacklem
d706690fda MFC: r264739
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.
2014-05-06 22:04:50 +00:00