mav [Mon, 30 Nov 2015 21:40:20 +0000 (21:40 +0000)]
MFC r291080: Another round of port scanner rewrite.
This change simplifies and unifies port adding/updating for loop and
fabric scanners. It also fixes problems with scanning restarts due to
concurrent port databases changes. It also fixes many cosmetic issues.
mav [Mon, 30 Nov 2015 21:38:51 +0000 (21:38 +0000)]
MFC r291013: Remove some confusions between loopid and nphdl.
Modern cards in most cases operate abstract port handles, that have no
any relation to real loop IDs. Leave loopid used only where it really
goes about local loop IDs.
While there, fix few more cases where LUNs were still printed in decimal.
mav [Mon, 30 Nov 2015 21:28:53 +0000 (21:28 +0000)]
MFC r290104: Improve/fix loop scanning routine.
For the most of chips (except anscient ones) port handlers have no relation
to port IDs. In such situation old code scanning first 125 handlers was
quite naive. Instead of doing that, send to chip single request to get full
list of port handlers available on specific virtual port and scan only them.
Old code had problems with case of several virtual ports enabled, when port
handlers allocated from global address space could easily go above 125.
This change was successfully tested on 23xx, 24xx and 25xx chips in loop
mode with 4 virtual initiator ports, each seing 50 virtual target ports.
rmacklem [Mon, 30 Nov 2015 13:46:22 +0000 (13:46 +0000)]
MFC: r290959
When the smbfs iod thread (smb_iod_thread()) is shutting down, smb_iod_destroy()
would call smb_iod_request(). This call could return as soon as the
wakeup(evp) in smb_iod_main() call is done and then could destroy
the mutexes. This caused a race with the rest of smb_iod_main()s
use of these mutexes.
A crash reported on freebsd-stable@ by Christian Kratzer was
diagnosed as a use of one of these mutexes after it was destroyed.
This patch moves destruction of the mutexes from smb_iod_destroy()
to the end of smb_iod_thread(), so that they aren't destroyed before
the thread is done with them. Christian comfirmed that the patch
stopped the crashes from happening.
mav [Sat, 28 Nov 2015 17:26:46 +0000 (17:26 +0000)]
MFC r291126:
Add API to obtain primary enclosure name and ID for /dev/sesX devices.
sesX device number may change between reboots, so to properly identify
the instance we need more data. Name and ID reported here may mach ones
reported by SCSI device, but that is not really required by specs.
mav [Fri, 27 Nov 2015 15:26:19 +0000 (15:26 +0000)]
MFC r290670: Modify target port groups logic in CTL.
- Introduce "ha_shared" port option, which being set to "on" moves the
port into separate port group, shared between HA nodes. This allows to
better handle cases when iSCSI portals are bound to CARP address that can
dynamically move between nodes. Some initiators (at least VMware) don't
detect that after iSCSI reconnect they've attached to different SCSI port
from different port group, that totally breakes ALUA status parsing.
In theory, I believe, it should be enough to have different iSCSI portal
group tags on different nodes to make initiators detect this condition,
but it seems like VMware ignores those values, and even full LUN retaste
forced by UA does not help.
- Make CTL report up to three port groups: 1 -- non-HA mode or ports
with "ha_shared" option set, 2 -- HA node 1, 3 -- HA node 2.
- Report Transitioning state for all port groups when HA interlink is
connected, but neither of nodes is primary for the LUN.
mav [Fri, 27 Nov 2015 15:19:36 +0000 (15:19 +0000)]
MFC r290615: Introduce portal group options in ctl.conf.
While CTL has concept of port options, used at least for iSCSI ports now,
before this change it was impossible to set them manually. There still
no user-configurable port options now, but I am planning to change that.
gnn [Thu, 26 Nov 2015 02:24:45 +0000 (02:24 +0000)]
MFC 290028:
Turning on IPSEC used to introduce a slight amount of performance
degradation (7%) for host host TCP connections over 10Gbps links,
even when there were no secuirty policies in place. There is no
change in performance on 1Gbps network links. Testing GENERIC vs.
GENERIC-NOIPSEC vs. GENERIC with this change shows that the new
code removes any overhead introduced by having IPSEC always in the
kernel.
ngie [Wed, 25 Nov 2015 08:19:01 +0000 (08:19 +0000)]
MFC r264737:
Discussed with: jilles
r264737 (by jilles):
libc/stdio: Fail fdopen() on an execute-only fd.
An execute-only fd (opened with O_EXEC) allows neither read() nor write()
and is therefore incompatible with all stdio modes. Therefore, the [EINVAL]
error applies.
Also adjust the similar check in freopen() with a NULL path, even though
this checks an fd which is already from a FILE.
smh [Tue, 24 Nov 2015 09:41:50 +0000 (09:41 +0000)]
Belatedly bump __FreeBSD_version after r291215
Due to the change in args for g_dev_setdumpdev by r291215 belatedly bump
__FreeBSD_version to allow any potential consumers to check for this, as
requested by delphij.
hselasky [Mon, 23 Nov 2015 13:30:13 +0000 (13:30 +0000)]
MFC r291072, r291168 and r291169:
Add the mlx5 and mlx5en modules to the i386 and amd64 kernel builds by
default and add a manual page for mlx5en. The mlx5 module contains
shared code for both infiniband and ethernet. The mlx5en module
contains specific code for ethernet functionality only. A mlx5ib
module is in the works for infiniband support.
Refer to the mlx5en(4) manual page for a comprehensive list.
The team porting the mlx5 driver(s) to FreeBSD:
- Hans Petter Selasky <hselasky@freebsd.org>
- Oded Shanoon <odeds@mellanox.com>
- Meny Yossefi <menyy@mellanox.com>
- Shany Michaely <shanim@mellanox.com>
- Shahar Klein <shahark@mellanox.com>
- Daria Genzel <dariaz@mellanox.com>
- Mark Bloch <markb@mellanox.com>
has been left undisturbed. The target `make sh-tests` has been moved over
from tools/regression/lib/libc/gen/Makefile to
lib/libc/tests/gen/Makefile and made into a PHONY target
case2.0 and case3.0 test input generation isn't being done automatically.
This needs additional discussion.
Sponsored by: EMC / Isilon Storage Division
r290646:
Add missing licensing boilerplate to test-fnmatch.c
Carry over licensing author info from fnmatch_test.c (jilles@)
Sponsored by: EMC / Isilon Storage Division
r290848:
Fix -Wunused warnings
Sponsored by: EMC / Isilon Storage Division
r290849:
Fix -Wmissing-braces warnings by adding braces around all the
testcase inputs
hselasky [Mon, 23 Nov 2015 09:32:32 +0000 (09:32 +0000)]
MFC r290650, r290709, r291067, r291068, r291069 and r291070:
Add mlx5 and mlx5en driver(s) for ConnectX-4 and ConnectX-4LX cards
from Mellanox Technologies. The current driver supports ethernet
speeds up to and including 100 GBit/s. Infiniband support will be
done later.
The code added is not compiled by default, which will be done by a
separate commit.
ngie [Mon, 23 Nov 2015 08:31:41 +0000 (08:31 +0000)]
MFC r290532,r290561,r290843,r290844,r290845:
r290532:
Integrate tools/regression/lib/libc/locale into the FreeBSD test suite
as lib/libc/tests/locale
Sponsored by: EMC / Isilon Storage Division
r290561:
Delete leftover printfs from when these were TAP tests
Sponsored by: EMC / Isilon Storage Division
r290843:
Polish up the tests a bit more after projects/collation was merged to head
Provide more meaningful diagnostic messages if LC_CTYPE can't be set properly
instead of segfaulting, because setlocale returns NULL and strcmp(NULL, b) will
always segfault
Split up the testcases so one failing (in this case en_US.ISO8859-15) won't
cause the rest of the testcases to be skipped
Remove some unused variables
Sponsored by: EMC / Isilon Storage Division
r290844:
Polish up iswctype_test
- Split up the testcases into C locale and ja_JP.eucJP testcases.
- Avoid a segfault in the event that setlocale fails, similar to r290843
- Replace `sizeof(x) / sizeof(*x)` pattern with `nitems(x)`
Sponsored by: EMC / Isilon Storage Division
r290845:
Remove unused variables; sort by alignment where needed
jpaetzel [Fri, 20 Nov 2015 15:13:49 +0000 (15:13 +0000)]
MFC 290662
Fix a bug in the CPU % limiting code
If you attempt to set a pcpu limit that is higher than
110% using rctl (for instance, you want a jail to be
able to use 2 cores on your system so you set pcpu to
200%) the thing you are trying to limit becomes unthrottled.
jhb [Thu, 19 Nov 2015 19:40:30 +0000 (19:40 +0000)]
MFC 290416:
Chelsio T5 chips do not properly echo the No Snoop and Relaxed Ordering
attributes when replying to a TLP from a Root Port. As a workaround,
disable No Snoop and Relaxed Ordering in the Root Port of each T5 adapter
during attach so that CPU-initiated requests do not contain these flags.
Note that this affects CPU-initiated requests to all devices under this
root port.
hselasky [Thu, 19 Nov 2015 10:00:17 +0000 (10:00 +0000)]
MFC r290639:
Update the wsp driver to support newer touch pads, like found in
MacBookPro11,4 and MacBook12,1. This update adds support for the
force touch parameter.
hselasky [Thu, 19 Nov 2015 09:57:41 +0000 (09:57 +0000)]
MFC r290542:
Avoid using the bounce buffer when the source or destination buffer is
32-bits aligned. Merge the two bounce buffers into a single one. Some
rough tests showed that the DWC OTG throughput on RPI2 increased by
10% after this patch.
ache [Thu, 19 Nov 2015 02:04:16 +0000 (02:04 +0000)]
MFC: r290549,r290729
r290549:
Reorganize code to elimitate one _sseek() call for append modes.
r290729:
1) Remove my overcomplicated error fallback and just return error
immediatelly as old code does, now for append modes too.
Real use case for such fallback is impossible (unless specially crafted).
2) Remove now unneded include I forgot to remove in prev. commits.
ngie [Mon, 16 Nov 2015 00:37:00 +0000 (00:37 +0000)]
MFC r289446:
Integrate tools/regression/acltools into the FreeBSD test suite as tests/sys/acl
- Make the requirements more complete for the testcases
- Detect prerequisites so the tests won't fail (zfs.ko is loaded, zpool(1)
is available, ACL support is enabled with UFS, etc).
- Work with temporary files/directories/mountpoints that work with atf/kyua
- Limit the testcases to work on temporary filesystems to reduce tainting the
test host
ngie [Sun, 15 Nov 2015 23:54:34 +0000 (23:54 +0000)]
MFC r289195:
Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to
the FreeBSD test suite
functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a
small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided
by upstream.
A handful of testcases in lib/libarchive/tests have been disabled as they
were failing when run with kyua test (see BROKEN_TESTS in
lib/libarchive/tests/Makefile)
As a sidenote: this removes the check/test targets from the Makefiles as they
don't match the pattern used in the rest of the FreeBSD test suite.
ngie [Sun, 15 Nov 2015 22:13:41 +0000 (22:13 +0000)]
MFC r289195:
Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to
the FreeBSD test suite
functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a
small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided
by upstream.
A handful of testcases in lib/libarchive/tests have been disabled as they
were failing when run with kyua test (see BROKEN_TESTS in
lib/libarchive/tests/Makefile)
As a sidenote: this removes the check/test targets from the Makefiles as they
don't match the pattern used in the rest of the FreeBSD test suite.
- Don't use contractions (don't -> do not)
- Change "throw away" to "discard" when describing the -o keep-bad-images option
- Revert author e-mail split I brought over from NetBSD, effectively reverting
the change bapt made in r267668
ngie [Sun, 15 Nov 2015 20:14:54 +0000 (20:14 +0000)]
MFC r289896:
Make vers.c creation atomic by using a temporary file, then moving
the temporary file to vers.c at the end of the script
The previous logic wrote out to vers.c multiple times, so the file
could be incorrectly interpreted as being completely written out
after one of the echo calls with recursive make, when in reality it
was only partially written.
Also, in the event the build was interrupted when creating vers.c
(small race window), it would have a leftover file that needed to
be cleaned up before resuming the build.