100041 Commits

Author SHA1 Message Date
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
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
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
rmacklem
2200ec99a6 MFC: r264738
For an NFSv4 mount with the "nocto" option, don't get the
up to date file attributes upon close. This reduces the
Getattr RPC count by about 65% for software builds.
2014-05-06 21:59:48 +00:00
rmacklem
bb012fd779 MFC: r264705, r264749
Modify the NFSv4 client create/mkdir RPC so that it acquires
post-create/mkdir directory attributes. This allows the RPC to
name cache the newly created directory and reduces the lookup RPC
count for applications creating a lot of directories.
2014-05-06 21:54:52 +00:00
rmacklem
5809be0d87 MFC: r264681
Modify the NFSv4 client open/create RPC so that it acquires
post-open/create directory attributes. This allows the RPC to
name cache the newly created file and reduces the lookup RPC
count by about 10% for software builds.
2014-05-06 21:47:43 +00:00
kib
f5b893b0e8 MFC r265102:
Fix two cases of recursive acquisitions of the vm object lock, only
possible in rare failure situations.
2014-05-06 12:31:25 +00:00
kib
68fab25080 MFC r265100:
Fix the comparision for the end of range in vm_phys_fictitious_reg_range().
2014-05-06 12:20:07 +00:00
rmacklem
cab8f4561e MFC: r264672
Modify the Lookup RPC for NFSv4 so that it acquires directory
attributes. This allows the client to cache directory names
when they are looked up, reducing the Lookup RPC count by
about 40% for software builds.
2014-05-06 12:15:05 +00:00
mav
941905ca5c MFC r264610:
Correct AMD chipsets identification.
2014-05-06 09:54:24 +00:00
mav
4990f3be06 MFC r260830:
Add ID for one more ASMedia AHCI-compatible controller.
2014-05-06 09:51:15 +00:00
np
ccdc23542c MFC r259382:
Read card capabilities after firmware initialization, instead of setting
them up as part of firmware initialization (which the driver gets to do
only if it's the master driver).

Read the range of tids available for the ETHOFLD functionality if it's
enabled.

New is_ftid() and is_etid() functions to test whether a tid falls within
the range of filter tids or ETHOFLD tids respectively.
2014-05-06 07:21:50 +00:00
np
ebd722c9b4 MFC r263317, r263412, and r263451.
r263317:
cxgbe(4): significant rx rework.

- More flexible cluster size selection, including the ability to fall
  back to a safe cluster size (PAGE_SIZE from zone_jumbop by default) in
  case an allocation of a larger size fails.
- A single get_fl_payload() function that assembles the payload into an
  mbuf chain for any kind of freelist.  This replaces two variants: one
  for freelists with buffer packing enabled and another for those without.
- Buffer packing with any sized cluster.  It was limited to 4K clusters
  only before this change.
- Enable buffer packing for TOE rx queues as well.
- Statistics and tunables to go with all these changes.  The driver's
  man page will be updated separately.

r263412:
cxgbe(4): if_iqdrops statistic should include tunnel congestion drops.

r263451:
cxgbe(4): man page updates.
2014-05-06 06:49:39 +00:00
np
c4599dcf44 MFC r260210 (by adrian@):
Add an option to enable or disable the small RX packet copying that
is done to improve performance of small frames.

When doing RX packing, the RX copying isn't necessarily required.
2014-05-06 04:22:06 +00:00
np
34844b41eb MFC r261804:
Provide additional information in some panic strings.
2014-05-06 03:05:14 +00:00
rmacklem
5bd3f1337e MFC: r264630
For NFS mounts using rsize,wsize=65536 over TSO enabled
network interfaces limited to 32 transmit segments, there
are two known issues.
The more serious one is that for an I/O of slightly less than 64K,
the net device driver prepends an ethernet header, resulting in a
TSO segment slightly larger than 64K. Since m_defrag() copies this
into 33 mbuf clusters, the transmit fails with EFBIG.
A tester indicated observing a similar failure using iSCSI.

The second less critical problem is that the network
device driver must copy the mbuf chain via m_defrag()
(m_collapse() is not sufficient), resulting in measurable overhead.

This patch reduces the default size of if_hw_tsomax
slightly, so that the first issue is avoided.
Fixing the second issue will require a way for the
network device driver to inform tcp_output() that it
is limited to 32 transmit segments.
2014-05-06 02:54:59 +00:00
rmacklem
a54326376a MFC: r264517
Vlan did not set the value of if_hw_tsomax, so when vlan
was stacked on top of a network interface that set if_hw_tsomax,
tcp_output() would see the default value instead of the value
set by the network interface. This patch modifies vlan so that
it sets if_hw_tsomax to the value of the parent interface.
2014-05-06 02:49:31 +00:00
rmacklem
1f951a5c9b MFC: r264469, r264498
Lagg did not set the value of if_hw_tsomax, so when lagg
was stacked on top of network interfaces that set if_hw_tsomax,
tcp_output() would see the default value instead of the value
set by the network interface(s). This patch modifies lagg so that
it sets if_hw_tsomax to the minimum of the value(s) for the
underlying network interfaces.
2014-05-06 02:44:01 +00:00
np
3942b0b24c MFC r261533, r261536, r261537, and r263457.
r261533:
cxgbe(4): Use the port's tx channel to identify it to t4_clr_port_stats.

r261536:
cxgbe(4): The T5 allows for a different freelist starvation threshold
for queues with buffer packing.  Use the correct value to calculate a
freelist's low water mark.

r261537:
cxgbe(4): Use the rx channel map (instead of the tx channel map) as the
congestion channel map.

r263457:
cxgbe(4):  Recognize the "spider" configuration where a T5 card's 40G
QSFP port is presented as 4 distinct 10G SFP+ ports to the driver.
2014-05-06 02:22:52 +00:00
ken
a354f057f0 MFC the mpr(4) driver for LSI's 12Gb SAS cards.
This includes r265236, r265237, r265241 and r265261:

  ------------------------------------------------------------------------
  r265236 | ken | 2014-05-02 14:25:09 -0600 (Fri, 02 May 2014) | 51 lines

  Bring in the mpr(4) driver for LSI's MPT3 12Gb SAS controllers.

  This is derived from the mps(4) driver, but it supports only the 12Gb
  IT and IR hardware including the SAS 3004, SAS 3008 and SAS 3108.

  Some notes about this driver:
   o The 12Gb hardware can do "FastPath" I/O, and that capability is included in
     this driver.

   o WarpDrive functionality has been removed, since it isn't supported in
     the 12Gb driver interface.

   o The Scatter/Gather list handling code is significantly different between
     the 6Gb and 12Gb hardware.  The 12Gb boards support IEEE Scatter/Gather
     lists.

  Thanks to LSI for developing and testing this driver for FreeBSD.

  share/man/man4/mpr.4:
  	mpr(4) man page.

  sys/dev/mpr/*:
  	mpr(4) driver files.

  sys/modules/Makefile,
  sys/modules/mpr/Makefile:
  	Add a module Makefile for the mpr(4) driver.

  sys/conf/files:
  	Add the mpr(4) driver.

  sys/amd64/conf/GENERIC,
  sys/i386/conf/GENERIC,
  sys/mips/conf/OCTEON1,
  sys/sparc64/conf/GENERIC:
  	Add the mpr(4) driver to all config files that currently
  	have the mps(4) driver.

  sys/ia64/conf/GENERIC:
  	Add the mps(4) and mpr(4) drivers to the ia64 GENERIC
  	config file.

  sys/i386/conf/XEN:
  	Exclude the mpr module from building here.

  Submitted by:	Steve McConnell <Stephen.McConnell@lsi.com>
  Tested by:	Chris Reeves <chrisr@spectralogic.com>
  Sponsored by:	LSI, Spectra Logic
  Relnotes:	LSI 12Gb SAS driver mpr(4) added

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265237 | ken | 2014-05-02 14:36:20 -0600 (Fri, 02 May 2014) | 8 lines

  Add the mpr(4) man page to the man4 Makefile.

  This should have been included in r265236.

  Submitted by:	Steve McConnell <Stephen.McConnell@lsi.com>
  MFC after:	3 days
  Sponsored by:	LSI, Spectra Logic

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265241 | brueffer | 2014-05-02 15:14:28 -0600 (Fri, 02 May 2014) | 2 lines

  Use our standard SYNOPSIS wording; perform some cleanup while here.

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265261 | brueffer | 2014-05-03 05:15:28 -0600 (Sat, 03 May 2014) | 2 lines

  Add a missing colon.

  ------------------------------------------------------------------------

Submitted by:	Steve McConnell <Stephen.McConnell@lsi.com>
Tested by:	Chris Reeves <chrisr@spectralogic.com>
Sponsored by:	LSI, Spectra Logic
Relnotes:	LSI 12Gb SAS driver mpr(4) added
2014-05-05 20:35:35 +00:00
markj
0bbe9c267f MFC r262661:
Fix emulation of call and jmp instructions on i386 and for 32-bit processes
on amd64.
2014-05-05 03:15:53 +00:00
kevlo
896088154c MFC r264317, r264864:
- Add the Asus USB-N10 NANO [1]
- Fix panic by adding mtx_assert() to urtwn_init_locked() and
  urtwn_stop_locked() [2]

Tested by:	Kuan-Chung Chiu <buganini@gmail.com> [1]
		Anthony Jenkins <scoobi_doo at yahoo dot com> [2]
2014-05-05 01:50:01 +00:00
kib
2dee5cfb76 MFC r265004:
Same as it was done in r263878 for invlrng_handler(), fix order of
checks for special pcid values in invlpg_pcid_handler().
2014-05-04 07:22:51 +00:00
kib
839393d336 MFC r265002:
Fix vm_fault_copy_entry() operation on upgrade; allow it to find the
pages in the shadowed objects.
2014-05-04 07:19:37 +00:00
bryanv
9653be1bc2 MFC r261150, r261151, r261164, r261166, r261167, r261168, r261394, r261395:
- Read and write the MAC address in the config space byte by byte
 - Also include the mbuf's csum_flags in an assert message
 - Remove stray space
 - Move duplicated transmit start code into a single function
 - Avoid queue unlock followed by relock when the enable interrupt race
   is lost
 - Check for a full virtqueue in the multiqueue transmit path
 - Do not place the sglist used for Rx/Tx on the stack
 - Use m_defrag() instead of m_collapse() to compact a long mbuf chain
2014-05-03 19:40:41 +00:00
bryanv
8d49b2e263 MFC r261147:
Remove spaces before tabs in the function prototype list
MFC r261149:
    Read each field of the configuration individually
2014-05-03 17:33:30 +00:00
markj
ca7f99a689 MFC r262543:
Fix the struct reg mappings for i386 and amd64, which differ between illumos
and FreeBSD.
2014-05-03 16:24:18 +00:00
markj
607e8b47f9 MFC r262542:
Move some files that are identical on i386 and amd64 to an x86 subdirectory
rather than keeping duplicate copies.
2014-05-03 16:08:52 +00:00