]> xenbits.xensource.com Git - people/julieng/freebsd.git/log
people/julieng/freebsd.git
9 years agoFor the Cortex-A8 use the a8 and not the a9 events table.
bz [Wed, 14 Oct 2015 16:56:25 +0000 (16:56 +0000)]
For the Cortex-A8 use the a8 and not the a9 events table.

MFC after: 2 weeks
Sponsored by: DARPA/AFRL
Differential Revision: https://reviews.freebsd.org/D3882

9 years agopf: Fix TSO issues
kp [Wed, 14 Oct 2015 16:21:41 +0000 (16:21 +0000)]
pf: Fix TSO issues

In certain configurations (mostly but not exclusively as a VM on Xen) pf
produced packets with an invalid TCP checksum.

The problem was that pf could only handle packets with a full checksum. The
FreeBSD IP stack produces TCP packets with a pseudo-header checksum (only
addresses, length and protocol).
Certain network interfaces expect to see the pseudo-header checksum, so they
end up producing packets with invalid checksums.

To fix this stop calculating the full checksum and teach pf to only update TCP
checksums if TSO is disabled or the change affects the pseudo-header checksum.

PR: 154428, 193579, 198868
Reviewed by: sbruno
MFC after: 1 week
Relnotes: yes
Sponsored by: RootBSD
Differential Revision: https://reviews.freebsd.org/D3779

9 years agoresolver: automatically reload /etc/resolv.conf
vangyzen [Wed, 14 Oct 2015 14:26:44 +0000 (14:26 +0000)]
resolver: automatically reload /etc/resolv.conf

On each resolver query, use stat(2) to see if the modification time
of /etc/resolv.conf has changed.  If so, reload the file and reinitialize
the resolver library.  However, only call stat(2) if at least two seconds
have passed since the last call to stat(2), since calling it on every
query could kill performance.

This new behavior is enabled by default.  Add a "reload-period" option
to disable it or change the period of the test.

Document this behavior and option in resolv.conf(5).

Polish the man page just enough to appease igor.

https://lists.freebsd.org/pipermail/freebsd-arch/2015-October/017342.html

Reviewed by: kp, wblock
Discussed with: jilles, imp, alfred
MFC after: 1 month
Relnotes: yes
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D3867

9 years agoMFV r289311: 5764 "zfs send -nv" directs output to stderr
mav [Wed, 14 Oct 2015 11:52:58 +0000 (11:52 +0000)]
MFV r289311: 5764 "zfs send -nv" directs output to stderr

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Basil Crow <basil.crow@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Manoj Joseph <manoj.joseph@delphix.com>

illumos/illumos-gate@dc5f28a3c341db7c241bba77ddc109c141072f27

9 years agoMFV r289308: 6267 dn_bonus evicted too early
mav [Wed, 14 Oct 2015 10:38:05 +0000 (10:38 +0000)]
MFV r289308: 6267 dn_bonus evicted too early

Reviewed by: Richard Yao <ryao@gentoo.org>
Reviewed by: Xin LI <delphij@freebsd.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Justin T. Gibbs <gibbs@FreeBSD.org>

illumos/illumos-gate@d2058105c61ec61df3a2dd3f839fed8c3fe7bfd6

9 years agoMFV r289306: 6295 metaslab_condense's dbgmsg should include vdev id
mav [Wed, 14 Oct 2015 10:31:50 +0000 (10:31 +0000)]
MFV r289306: 6295 metaslab_condense's dbgmsg should include vdev id

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andriy Gapon <avg@freebsd.org>
Reviewed by: Xin Li <delphij@freebsd.org>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Joe Stein <joe.stein@delphix.com>

illumos/illumos-gate@daec38ecb4fb5e73e4ca9e99be84f6b8c50c02fa

9 years agoMFV r289304: 6293 ztest failure: error == 28 (0xc == 0x1c) in ztest_tx_assign()
mav [Wed, 14 Oct 2015 10:28:29 +0000 (10:28 +0000)]
MFV r289304: 6293 ztest failure: error == 28 (0xc == 0x1c) in ztest_tx_assign()

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@8fe00bfb8790ad51653f67b01d5ac14256cbb404

9 years agoInvalid pages should not appear on the inactive queue. Change the
kib [Wed, 14 Oct 2015 09:03:32 +0000 (09:03 +0000)]
Invalid pages should not appear on the inactive queue.  Change the
check into an assertion.

Reviewed by: alc
Tested by: pho
Sponsored by: The FreeBSD Foundation

9 years agoIntegrate tools/regression/vfs into the FreeBSD test suite as tests/sys/vfs
ngie [Wed, 14 Oct 2015 08:16:15 +0000 (08:16 +0000)]
Integrate tools/regression/vfs into the FreeBSD test suite as tests/sys/vfs

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoMFV r289298: 6286 ZFS internal error when set large block on bootfs
mav [Wed, 14 Oct 2015 07:50:08 +0000 (07:50 +0000)]
MFV r289298: 6286 ZFS internal error when set large block on bootfs

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@6de9bb5603e65b16816b7ab29e39bac820e2da2b

9 years agoMFV r289296: 6288 dmu_buf_will_dirty could be faster
mav [Wed, 14 Oct 2015 07:45:44 +0000 (07:45 +0000)]
MFV r289296: 6288 dmu_buf_will_dirty could be faster

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@0f2e7d03b8f588387cb8dd8dd500cbe5ff4484e0

9 years agoMFV r289294: 5219 l2arc_write_buffers() may write beyond target_sz
mav [Wed, 14 Oct 2015 07:37:02 +0000 (07:37 +0000)]
MFV r289294: 5219 l2arc_write_buffers() may write beyond target_sz

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Saso Kiselkov <skiselkov@gmail.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Steven Hartland <steven.hartland@multiplay.co.uk>
Reviewed by: Justin Gibbs <gibbs@FreeBSD.org>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Andriy Gapon <avg@freebsd.org>

illumos/illumos-gate@d7d9a6d919f92d74ea0510a53f8441396048e800

9 years agoFix an unnecessarily aggressive behavior where mtu clamping begins on first
hiren [Wed, 14 Oct 2015 06:57:28 +0000 (06:57 +0000)]
Fix an unnecessarily aggressive behavior where mtu clamping begins on first
retransmission timeout (rto) when blackhole detection is enabled.  Make
sure it only happens when the second attempt to send the same segment also fails
with rto.

Also make sure that each mtu probing stage (usually 1448 -> 1188 -> 524) follows
the same pattern and gets 2 chances (rto) before further clamping down.

Note: RFC4821 doesn't specify implementation details on how this situation
should be handled.

Differential Revision: https://reviews.freebsd.org/D3434
Reviewed by: sbruno, gnn (previous version)
MFC after: 2 weeks
Sponsored by: Limelight Networks

9 years agoFix support for building a PROG_CXX, and PROG, directly.
bdrewery [Wed, 14 Oct 2015 05:50:16 +0000 (05:50 +0000)]
Fix support for building a PROG_CXX, and PROG, directly.

For example in lib/atf/libatf-c++/tests/detail it is now possible to
run 'make application_test'.  This was intended to worked for PROGS,
but lacked support for PROGS_CXX.

Also fix redefining the main PROG target to recurse.  This isn't needed
since the main process is setting PROG/PROG_CXX to handle it directly
via bsd.prog.mk.

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoFix date.
adrian [Wed, 14 Oct 2015 05:16:56 +0000 (05:16 +0000)]
Fix date.

Noticed by: bdrewery

9 years agoFollow-up r288218 by ensuring common objects are built before recursing.
bdrewery [Wed, 14 Oct 2015 04:42:05 +0000 (04:42 +0000)]
Follow-up r288218 by ensuring common objects are built before recursing.

Some example where this is a problem:
  lib/atf/libatf-c++/tests/Makefile:SRCS.${_T}=   ${_T}.cpp test_helpers.cpp
  lib/atf/libatf-c++/tests/detail/Makefile:SRCS.${_T}=    ${_T}.cpp test_helpers.cpp
  lib/atf/libatf-c/tests/Makefile:SRCS.${_T}=     ${_T}.c test_helpers.c
  lib/atf/libatf-c/tests/detail/Makefile:SRCS.${_T}=      ${_T}.c test_helpers.c
  lib/libpam/libpam/tests/Makefile:SRCS.${test} = ${test}.c ${COMMONSRC}

A similar change may be needed for FILES, SCRIPTS, or INCS, but for now stay
with just SRCS.

Reported by: rodrigc
MFC after: 3 weeks
X-MFC-With: r288218
Sponsored by: EMC / Isilon Storage Division

9 years agorsu(4) manpage updates: add me, add 802.11n support, update caveats.
adrian [Wed, 14 Oct 2015 02:43:04 +0000 (02:43 +0000)]
rsu(4) manpage updates: add me, add 802.11n support, update caveats.

* Add that I indeed added 802.11n support.
* Update caveats - we support 1x1, 1x2 and 2x2 operation now, but
  there's no transmit aggregation support.

9 years agoReplace the out-of-place includes/files/config handling in bsd.subdir.mk with
bdrewery [Wed, 14 Oct 2015 02:37:30 +0000 (02:37 +0000)]
Replace the out-of-place includes/files/config handling in bsd.subdir.mk with
more typical ALL_SUBDIR_TARGETS entries and target hooks in bsd.incs.mk,
bsd.files.mk and bsd.confs.mk.

This allows the targets to be NOPs if unneeded and still work with the
shortcut 'make includes' to build and then install in a parallel-safe manner.

Sort and re-indent the ALL_SUBDIR_TARGETS with the new entries.

Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV e8aeb60c: Disable interrupts and poll under high load
cem [Wed, 14 Oct 2015 02:14:45 +0000 (02:14 +0000)]
NTB: MFV e8aeb60c: Disable interrupts and poll under high load

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV 78958433: Enable Snoop on Primary Side
cem [Wed, 14 Oct 2015 02:14:15 +0000 (02:14 +0000)]
NTB: MFV 78958433: Enable Snoop on Primary Side

Enable Snoop from Primary to Secondary side on BAR23 and BAR45 on all
TLPs.  Previously, Snoop was only enabled from Secondary to Primary
side.  This can have a performance improvement on some workloads.

Also, make the code more obvious about how the link is being enabled.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoParallelize the buffer cache and rewrite getnewbuf(). This results in a
jeff [Wed, 14 Oct 2015 02:10:07 +0000 (02:10 +0000)]
Parallelize the buffer cache and rewrite getnewbuf().  This results in a
8x performance improvement in a micro benchmark on a 4 socket machine.

 - Get buffer headers from a per-cpu uma cache that sits in from of the
   free queue.
 - Use a per-cpu quantum cache in vmem to eliminate contention for kva.
 - Use multiple clean queues according to buffer cache size to eliminate
   clean queue lock contention.
 - Introduce a bufspace daemon that attempts to prevent getnewbuf() callers
   from blocking or doing direct recycling.
 - Close some bufspace allocation races that could lead to endless
   recycling.
 - Further the transition to a more modern style of small functions grouped
   by prefix in order to improve growing complexity.

Sponsored by: EMC / Isilon
Reviewed by: kib
Tested by: pho

9 years agoCorrect a comment in bsd.incs.mk forgotten in r274662 and copied into bsd.confs.mk.
bdrewery [Wed, 14 Oct 2015 00:43:29 +0000 (00:43 +0000)]
Correct a comment in bsd.incs.mk forgotten in r274662 and copied into bsd.confs.mk.

The bsd.confs.mk may be wrong but for now fix it.

Sponsored by: EMC / Isilon Storage Division

9 years agoAdd a note about the mysterious files/includes/config block.
bdrewery [Wed, 14 Oct 2015 00:36:33 +0000 (00:36 +0000)]
Add a note about the mysterious files/includes/config block.

This originated from r96668.

9 years agoThere are times when it would be really nice to have a record of the last few
hiren [Wed, 14 Oct 2015 00:35:37 +0000 (00:35 +0000)]
There are times when it would be really nice to have a record of the last few
packets and/or state transitions from each TCP socket. That would help with
narrowing down certain problems we see in the field that are hard to reproduce
without understanding the history of how we got into a certain state. This
change provides just that.

It saves copies of the last N packets in a list in the tcpcb. When the tcpcb is
destroyed, the list is freed. I thought this was likely to be more
performance-friendly than saving copies of the tcpcb. Plus, with the packets,
you should be able to reverse-engineer what happened to the tcpcb.

To enable the feature, you will need to compile a kernel with the TCPPCAP
option. Even then, the feature defaults to being deactivated. You can activate
it by setting a positive value for the number of captured packets. You can do
that on either a global basis or on a per-socket basis (via a setsockopt call).

There is no way to get the packets out of the kernel other than using kmem or
getting a coredump. I thought that would help some of the legal/privacy concerns
regarding such a feature. However, it should be possible to add a future effort
to export them in PCAP format.

I tested this at low scale, and found that there were no mbuf leaks and the peak
mbuf usage appeared to be unchanged with and without the feature.

The main performance concern I can envision is the number of mbufs that would be
used on systems with a large number of sockets. If you save five packets per
direction per socket and have 3,000 sockets, that will consume at least 30,000
mbufs just to keep these packets. I tried to reduce the concerns associated with
this by limiting the number of clusters (not mbufs) that could be used for this
feature. Again, in my testing, that appears to work correctly.

Differential Revision: D3100
Submitted by: Jonathan Looney <jlooney at juniper dot net>
Reviewed by: gnn, hiren

9 years agoAdd WITHOUT_LLDB for src.conf(5)
emaste [Wed, 14 Oct 2015 00:23:31 +0000 (00:23 +0000)]
Add WITHOUT_LLDB for src.conf(5)

It will be enabled by default on certain architectures.

9 years agoNTB: MFV 58b88920: Document HW errata
cem [Tue, 13 Oct 2015 23:43:06 +0000 (23:43 +0000)]
NTB: MFV 58b88920: Document HW errata

Add a comment describing the necessary ordering of modifications to the
NTB Limit and Base registers.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV fca4d518: Fix ntb_transport link down race
cem [Tue, 13 Oct 2015 23:42:13 +0000 (23:42 +0000)]
NTB: MFV fca4d518: Fix ntb_transport link down race

A WARN_ON is being hit in ntb_qp_link_work due to the NTB transport link
being down while the ntb qp link is still active.  This is caused by the
transport link being brought down prior to the qp link worker thread
being terminated.  To correct this, shutdown the qp's prior to bringing
the transport link down.  Also, only call the qp worker thread if it is
in interrupt context, otherwise call the function directly.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV 9fec60c4: Fix NTB-RP Link Up
cem [Tue, 13 Oct 2015 23:41:40 +0000 (23:41 +0000)]
NTB: MFV 9fec60c4: Fix NTB-RP Link Up

The Xeon NTB-RP setup, the transparent side does not get a link up/down
interrupt.  Since the presence of a NTB device on the transparent side
means that we have a NTB link up, we can work around the lack of an
interrupt by simply calling the link up function to notify the upper
layers.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV c529aa30: Xeon Doorbell errata workaround
cem [Tue, 13 Oct 2015 23:41:06 +0000 (23:41 +0000)]
NTB: MFV c529aa30: Xeon Doorbell errata workaround

Modifications to the 14th bit of the B2BDOORBELL register will not be
mirrored to the remote system due to a hardware issue.  To get around
the issue, shrink the number of available doorbell bits by 1.  The max
number of doorbells was being used as a way to referencing the Link
Doorbell bit.  Since this would no longer work, the driver must now
explicitly reference that bit.

This does not affect the xeon_errata_workaround case, as it is not using
the b2bdoorbell register.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoUse chroot(2) instead of using prefixes for files.
delphij [Tue, 13 Oct 2015 22:55:17 +0000 (22:55 +0000)]
Use chroot(2) instead of using prefixes for files.

Previously, the code prefixes the chroot path to actual file paths to
simulate the effect.  This, however, will not work for tzset(3) which
expects the current system have a working set of timezone data files,
and that is not always the case.

This changeset simplifies the handling of paths and use an actual
chroot(2) call to implement the effect.

PR: bin/197313
MFC after: 2 weeks

9 years agoNTB: MFV f9a2cf89: Comment Fix
cem [Tue, 13 Oct 2015 20:55:21 +0000 (20:55 +0000)]
NTB: MFV f9a2cf89: Comment Fix

Add "data" ntb_register_db_callback parameter description comment and
correct poor speling.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV b1ef0043: Remove References of non-B2B BWD HW
cem [Tue, 13 Oct 2015 20:54:38 +0000 (20:54 +0000)]
NTB: MFV b1ef0043: Remove References of non-B2B BWD HW

NTB-RP is not a supported configuration on BWD hardware.  Remove the
code attempting to set it up.

Authored by: Jon Mason
Obtained from: Linux (dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoFix two memory leaks in config(8).
rpaulo [Tue, 13 Oct 2015 20:25:03 +0000 (20:25 +0000)]
Fix two memory leaks in config(8).

PR: 202145
Submitted by: Kurt Lidl <lidl pix.net>

9 years agoif_ntb: Fix build on i386
cem [Tue, 13 Oct 2015 19:46:54 +0000 (19:46 +0000)]
if_ntb: Fix build on i386

Sponsored by: EMC / Isilon Storage Division

9 years agoioat: Use correct macro, fix build on i386
cem [Tue, 13 Oct 2015 19:46:12 +0000 (19:46 +0000)]
ioat: Use correct macro, fix build on i386

Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: (partial) MFV ed6c24ed: NTB-RP support
cem [Tue, 13 Oct 2015 19:45:29 +0000 (19:45 +0000)]
NTB: (partial) MFV ed6c24ed: NTB-RP support

This commit does not actually add NTB-RP support.  Mostly it serves to
shuffle code around to match the Linux driver.  Original Linux commit
log follows:

Add support for Non-Transparent Bridge connected to a PCI-E Root Port on
the remote system (also known as NTB-RP mode).  This allows for a NTB
enabled system to be connected to a non-NTB enabled system/slot.

Modifications to the registers and BARs/MWs on the Secondary side by the
remote system are reflected into registers on the Primary side for the
local system.  Similarly, modifications of registers and BARs/MWs on
Primary side by the local system are reflected into registers on the
Secondary side for the Remote System.  This allows communication between
the 2 sides via these registers and BARs/MWs.

Note: there is not a fix for the Xeon Errata (that was already worked
around in NTB-B2B mode) for NTB-RP mode.  Due to this limitation, NTB-RP
will not work on the Secondary side with the Xeon Errata workaround
enabled.  To get around this, disable the workaround via the
xeon_errata_workaround=0 modparm.  However, this can cause the hang
described in the errata.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV 49793889: Rename Variables for NTB-RP
cem [Tue, 13 Oct 2015 19:44:25 +0000 (19:44 +0000)]
NTB: MFV 49793889: Rename Variables for NTB-RP

Many variable names in the NTB driver refer to the primary or secondary
side.  However, these variables will be used to access the reverse case
when in NTB-RP mode.  Make these names more generic in anticipation of
NTB-RP support.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

9 years agobsd.subdir.mk: Move all of the targets into ALL_SUBDIR_TARGETS.
bdrewery [Tue, 13 Oct 2015 19:42:57 +0000 (19:42 +0000)]
bsd.subdir.mk: Move all of the targets into ALL_SUBDIR_TARGETS.

Also improve documentation.

The SUBDIR_TARGETS variable should really be named LOCAL_SUBDIR_TARGETS, but
renaming it may be a surprise for downstream vendors who use this variable.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agobsd.subdir.mk: Handle cleanobj.
bdrewery [Tue, 13 Oct 2015 19:11:22 +0000 (19:11 +0000)]
bsd.subdir.mk: Handle cleanobj.

Before this, the target was unknown.  Now it will recurse on subdirs and run
the target in the current directory.  It is required to recurse as there
may be subdirs that have objs in their directory or in the object directory,
so it is not enough to just delete the objdir of the subdir parent.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoPartially revert r288266: Remove SUBDIR_PARALLEL from kerberos5/lib.
bdrewery [Tue, 13 Oct 2015 18:52:56 +0000 (18:52 +0000)]
Partially revert r288266: Remove SUBDIR_PARALLEL from kerberos5/lib.

I intended to remove this before committing r288266.  It works but is clearly
wrong and working by accident due to the dependencies listed in the root
Makefile.inc1 file.

9 years agoFix the timeout for INIT retransmissions in the case where RTO_MIN is
tuexen [Tue, 13 Oct 2015 18:27:55 +0000 (18:27 +0000)]
Fix the timeout for INIT retransmissions in the case where RTO_MIN is
smaller than RTO_INITIAL.

MFC after: 1 week

9 years agoSimplify syscall generation and ABI source file handling for the build.
bdrewery [Tue, 13 Oct 2015 18:23:51 +0000 (18:23 +0000)]
Simplify syscall generation and ABI source file handling for the build.

This is to make the Makefile more easily extendable for new ABIs.

This also makes several other subtle changes:
  -  The build now is given a list of ABIs to use based on the MACHINE_ARCH or
     MACHINE_CPUARCH.  These ABIs have a related path in sys/ that is used
     to generate their syscalls.  For each ABI to build check for a
     ABI.c, MACHINE_ARCH-ABI.c, or a MACHINE_CPUARCH-ABI.c.  This matches
     the old behavior needed for archs such as powerpc* and mips*.
  -  The ABI source file selection allows for simpler assignment of common
     ABIs such as "fbsd32" from sys/compat/freebsd32, or cloudabi64.
  - Expand 'fbsd' to 'freebsd' everywhere for consistency.
  -  Split out the powerpc-fbsd.c file into a powerpc64-freebsd32.c to be more
     like the amd64-freebsd32.c file and to more easily allow the auto-generation
     of ABI handling to work.
  -  Rename 'syscalls.h' to 'fbsd_syscalls.h' to lessen the ambiguity and
     avoid confusion with syscall.h (such as in r288997).
  -  For non-native syscall header files, they are now renamed to be
     ABI_syscalls.h, where ABI is what ABI the Makefile is building.
  -  Remove all of the makesyscalls config files.  The "native" one being
     name i386.conf was a long outstanding bug.  They were all the same
     except for the data they generated, so now it is just auto-generated
     as a build artifact.
  -  The syscalls array is now fixed to be static in the syscalls header to
     remove the compiler warning about non-extern.  This was worked around
     in the aarch64-fbsd.c file but not the others.
  -  All syscall table names are now just 'syscallnames' since they don't
     need to be different as they are all static in their own ABI files.  The
     alternative is to name them ABI_syscallnames which does not seem
     necessary.

Reviewed by: ed, jhb
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D3851

9 years agoAdd support for sysctl knobs to live tune the per interrupt rx/tx packet
sbruno [Tue, 13 Oct 2015 17:34:18 +0000 (17:34 +0000)]
Add support for sysctl knobs to live tune the per interrupt rx/tx packet
processing limits in ixgbe(4)

Differential Revision: https://reviews.freebsd.org/D3719
Submitted by: jason wolfe (j-nitrology.com)
MFC after: 2 weeks

9 years agoNTB: Enable 32-bit support
cem [Tue, 13 Oct 2015 17:22:23 +0000 (17:22 +0000)]
NTB: Enable 32-bit support

Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: Update pci ids
cem [Tue, 13 Oct 2015 17:21:38 +0000 (17:21 +0000)]
NTB: Update pci ids

Add JSF, HSX, BDX ids; add two additional Xeon errata flags while we're
here.

Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV 113bf1c9: BWD Link Recovery
cem [Tue, 13 Oct 2015 17:20:47 +0000 (17:20 +0000)]
NTB: MFV 113bf1c9: BWD Link Recovery

The BWD NTB device will drop the link if an error is encountered on the
point-to-point PCI bridge.  The link will stay down until all errors are
cleared and the link is re-established.  On link down, check to see if
the error is detected, if so do the necessary housekeeping to try and
recover from the error and reestablish the link.

There is a potential race between the 2 NTB devices recovering at the
same time.  If the times are synchronized, the link will not recover and
the driver will be stuck in this loop forever.  Add a random interval to
the recovery time to prevent this race.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

9 years agoixl(4): Remove compile warning for unused function.
sbruno [Tue, 13 Oct 2015 17:20:05 +0000 (17:20 +0000)]
ixl(4): Remove compile warning for unused function.

sys/dev/ixl/if_ixl.c:4377:1: warning: unused function 'ixl_debug_info' [-Wunused-function]
ixl_debug_info(SYSCTL_HANDLER_ARGS)

Differential Revision: https://reviews.freebsd.org/D3718
Submitted by: bz

9 years agoAdd Makefile forgotten in r289224
ngie [Tue, 13 Oct 2015 17:18:26 +0000 (17:18 +0000)]
Add Makefile forgotten in r289224

9 years agoReplace references to /dev/acd0 with /dev/cd0
ngie [Tue, 13 Oct 2015 17:14:27 +0000 (17:14 +0000)]
Replace references to /dev/acd0 with /dev/cd0

atapicd(4) was replaced by cd(4) with the atacam work done by
mav@ and then removed in r249083

X-MFC to: stable/10
MFC after: 2 weeks

9 years agoReplace /dev/acd0 with /dev/cd1 as atapicd(4) has been removed since r249083.
ngie [Tue, 13 Oct 2015 17:09:07 +0000 (17:09 +0000)]
Replace /dev/acd0 with /dev/cd1 as atapicd(4) has been removed since r249083.

Update mount.conf(8) to reflect the change in behavior

9 years agoBump .Dd
ngie [Tue, 13 Oct 2015 17:06:41 +0000 (17:06 +0000)]
Bump .Dd

9 years agoReplace references to /dev/acd0 with /dev/cd0
ngie [Tue, 13 Oct 2015 17:05:07 +0000 (17:05 +0000)]
Replace references to /dev/acd0 with /dev/cd0

atapicd(4) was removed in r249083 (it was replaced by cd(4))

9 years agomakefs(8) leaves sblock.fs_providersize uninitialized (zero) that can be easily
sbruno [Tue, 13 Oct 2015 17:00:14 +0000 (17:00 +0000)]
makefs(8) leaves sblock.fs_providersize uninitialized (zero) that can be easily
checked with dumpfs(8). This may lead to other problems, f.e. geom_label kernel
module sanity checks do not like zero fs_old_size value and skips such UFS1
file system while tasting (fs_old_size derives from sblock.fs_providersize).

PR: 203704
Submitted by: eugen@grosbein.net
Reviewed by: marcel

9 years agoIntegrate tools/regression/vfs into the FreeBSD test suite as tests/sys/vfs
ngie [Tue, 13 Oct 2015 16:51:12 +0000 (16:51 +0000)]
Integrate tools/regression/vfs into the FreeBSD test suite as tests/sys/vfs

9 years agoIntegrate tools/test/posixshm and tools/regression/posixshm into the FreeBSD
ngie [Tue, 13 Oct 2015 16:50:12 +0000 (16:50 +0000)]
Integrate tools/test/posixshm and tools/regression/posixshm into the FreeBSD
test suite as tests/sys/posixshm

9 years agoAdd llvm patch corresponding to r289221.
dim [Tue, 13 Oct 2015 16:25:02 +0000 (16:25 +0000)]
Add llvm patch corresponding to r289221.

9 years agoPull in r250085 from upstream llvm trunk (by Andrea Di Biagio):
dim [Tue, 13 Oct 2015 16:24:22 +0000 (16:24 +0000)]
Pull in r250085 from upstream llvm trunk (by Andrea Di Biagio):

  [x86] Fix wrong lowering of vsetcc nodes (PR25080).

  Function LowerVSETCC (in X86ISelLowering.cpp) worked under the wrong
  assumption that for non-AVX512 targets, the source type and destination type
  of a type-legalized setcc node were always the same type.

  This assumption was unfortunately incorrect; the type legalizer is not always
  able to promote the return type of a setcc to the same type as the first
  operand of a setcc.

  In the case of a vsetcc node, the legalizer firstly checks if the first input
  operand has a legal type. If so, then it promotes the return type of the vsetcc
  to that same type. Otherwise, the return type is promoted to the 'next legal
  type', which, for vectors of MVT::i1 is always a 128-bit integer vector type.

  Example (-mattr=+avx):

    %0 = trunc <8 x i32> %a to <8 x i23>
    %1 = icmp eq <8 x i23> %0, zeroinitializer

  The initial selection dag for the code above is:

  v8i1 = setcc t5, t7, seteq:ch
    t5: v8i23 = truncate t2
      t2: v8i32,ch = CopyFromReg t0, Register:v8i32 %vreg1
      t7: v8i32 = build_vector of all zeroes.

  The type legalizer would firstly check if 't5' has a legal type. If so, then it
  would reuse that same type to promote the return type of the setcc node.
  Unfortunately 't5' is of illegal type v8i23, and therefore it cannot be used to
  promote the return type of the setcc node. Consequently, the setcc return type
  is promoted to v8i16. Later on, 't5' is promoted to v8i32 thus leading to the
  following dag node:
    v8i16 = setcc t32, t25, seteq:ch

    where t32 and t25 are now values of type v8i32.

  Before this patch, function LowerVSETCC would have wrongly expanded the setcc
  to a single X86ISD::PCMPEQ. Surprisingly, ISel was still able to match an
  instruction. In our case, ISel would have matched a VPCMPEQWrr:
    t37: v8i16 = X86ISD::VPCMPEQWrr t36, t25

  However, t36 and t25 are both VR256, while the result type is instead of class
  VR128. This inconsistency ended up causing the insertion of COPY instructions
  like this:
    %vreg7<def> = COPY %vreg3; VR128:%vreg7 VR256:%vreg3

  Which is an invalid full copy (not a sub register copy).
  Eventually, the backend would have hit an UNREACHABLE "Cannot emit physreg copy
  instruction" in the attempt to expand the malformed pseudo COPY instructions.

  This patch fixes the problem adding the missing logic in LowerVSETCC to handle
  the corner case of a setcc with 128-bit return type and 256-bit operand type.

  This problem was originally reported by Dimitry as PR25080. It has been latent
  for a very long time. I have added the minimal reproducible from that bugzilla
  as test setcc-lowering.ll.

  Differential Revision: http://reviews.llvm.org/D13660

This should fix the "Cannot emit physreg copy instruction" errors when
compiling contrib/wpa/src/common/ieee802_11_common.c, and CPUTYPE is set
to a CPU supporting AVX (e.g. sandybridge, ivybridge).

9 years agoRewrap UPDATING entry from r265422 to 80 columns
emaste [Tue, 13 Oct 2015 12:51:44 +0000 (12:51 +0000)]
Rewrap UPDATING entry from r265422 to 80 columns

9 years agoExport bunch of state variables as sysctls.
mav [Tue, 13 Oct 2015 11:02:56 +0000 (11:02 +0000)]
Export bunch of state variables as sysctls.

9 years agoNTB: Style(9) cleanups
cem [Tue, 13 Oct 2015 03:12:55 +0000 (03:12 +0000)]
NTB: Style(9) cleanups

9 years agoNTB: MFV 948d3a65: Xeon Errata Workaround
cem [Tue, 13 Oct 2015 03:12:11 +0000 (03:12 +0000)]
NTB: MFV 948d3a65: Xeon Errata Workaround

There is a Xeon hardware errata related to writes to SDOORBELL or B2BDOORBELL
in conjunction with inbound access to NTB MMIO Space, which may hang the
system.  To workaround this issue, use one of the memory windows to access the
interrupt and scratch pad registers on the remote system.  This bypasses the
issue, but removes one of the memory windows from use by the transport.  This
reduction of MWs necessitates adding some logic to determine the number of
available MWs.

Since some NTB usage methodologies may have unidirectional traffic, the ability
to disable the workaround via modparm has been added.

See BF113 in
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-c5500-c3500-spec-update.pdf
See BT119 in
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-e5-family-spec-update.pdf

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: Add hw.ntb sysctl node
cem [Tue, 13 Oct 2015 03:11:21 +0000 (03:11 +0000)]
NTB: Add hw.ntb sysctl node

9 years agoNTB: MFV b6750cfe: Correct USD/DSD Identification
cem [Tue, 13 Oct 2015 03:10:36 +0000 (03:10 +0000)]
NTB: MFV b6750cfe: Correct USD/DSD Identification

Due to ambiguous documentation, the USD/DSD identification is backward
when compared to the setting in BIOS.  Correct the bits to match the
BIOS setting.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV 87034511: Correct Number of Scratch Pad Registers
cem [Tue, 13 Oct 2015 03:10:04 +0000 (03:10 +0000)]
NTB: MFV 87034511: Correct Number of Scratch Pad Registers

The NTB Xeon hardware has 16 scratch pad registers and 16 back-to-back
scratch pad registers.  Correct the #define to represent this and update
the variable names to reflect their usage.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

9 years agocasperd: bump default socket queue length to SOMAXCONN; make length configurable.
adrian [Tue, 13 Oct 2015 02:34:41 +0000 (02:34 +0000)]
casperd: bump default socket queue length to SOMAXCONN; make length configurable.

The current default listen queue for casperd is too small (8) and
hard-coded.

This patch increases the default to SOMAXCONN, and introduces a command
line flag that can used to further increase or decrease the queue length.

PR: bin/202147
Submitted by: <lidl@pix.net>

9 years agomakefs: introduce a new option to specify what to round the resulting
adrian [Tue, 13 Oct 2015 02:32:15 +0000 (02:32 +0000)]
makefs: introduce a new option to specify what to round the resulting
image up to.

From ticket:

While trying to run FreeBSD/mips on some device having very small flash media,
one is forced to compress file system with mkulzma(8) utility. It is desirable
to specify small UFS block/fragment sizes like 4096/512 bytes for makefs(8)
and big compression block size like 65535 bytes to mkulzma at the same time.
Then one obtains very good comression ratios (like 75% and more) but faces
the following problem.

geom_uncompress kernel module reports GEOM provider size rounded up to its
compression block size. Generally, this changes original media size and now
it fails to match the size of embedded UFS file system that leads to other
problems, f.e. geom_label kernel module does not like this and skips the
file system while tasting the GEOM and looking for UFS label.

This makes it impossible to refer to the file system using known UFS label
instead of something like /dev/map/rootfs.uncompress.

The following patch introduces new command line option "-r roundup" for makefs
that makes it round up the image to specified block size. Hence, geom_uncompress
does not change GEOM media size for images rounded that way and geom_label
accepts such GEOMs just fine.

With the patch applied, one can use following commands:

$ makefs -t ffs -r 65536 -o bsize=4096,fsize=512,label=flash optimization=space fs.img fs
$ mkulzma -s 65536 -o fs.img.ulzma fs.img

PR: bin/203707
Submitted by: <eugen@grosbein.net>

9 years agoEnsure the client regions for unmapped bounce buffers created through bus_dmamap_load...
jah [Tue, 13 Oct 2015 02:17:56 +0000 (02:17 +0000)]
Ensure the client regions for unmapped bounce buffers created through bus_dmamap_load_phys() do not span multiple pages.
This is already done for mapped buffers.
While here, stop casting bus_addr_t to vm_offset_t.

9 years agoiw_cxgbe: MPA v2 is always available.
np [Tue, 13 Oct 2015 01:04:38 +0000 (01:04 +0000)]
iw_cxgbe: MPA v2 is always available.

Submitted by: Krishnamraju Eraparaju at chelsio dot com
Reviewed by: Steve Wise at opengridcomputing dot com

9 years agoIf world is built with a custom sendmail.cf, use it for the distribution
peter [Mon, 12 Oct 2015 21:02:36 +0000 (21:02 +0000)]
If world is built with a custom sendmail.cf, use it for the distribution
target.  This is the feeder for mergemaster / etcupdate.  This change
makes installworld/mergemaster/etcupdate behave the same regardless of
whether SENDMAIL_MC or SENDMAIL_CF is used.

If you use a custom SENDMAIL_MC/CF in make.conf and excluded it from
mergemaster.rc/etcupdate.conf to work around the conflicts, you may wish
to revert that or change it from 'ignore' to 'always install'.

If you do not use a custom SENDMAIL_MC/CF, there should be no change in
behavior.

9 years agoAdd support for reading device temperature
davidcs [Mon, 12 Oct 2015 20:21:17 +0000 (20:21 +0000)]
Add support for reading device temperature

MFC after:5 days

9 years agoIntegrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to
ngie [Mon, 12 Oct 2015 18:31:21 +0000 (18:31 +0000)]
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.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoFreeBSD-specific addition to r289191.
mav [Mon, 12 Oct 2015 18:15:25 +0000 (18:15 +0000)]
FreeBSD-specific addition to r289191.

9 years agoMFV r289188: 6281 prefetching should apply to 1MB reads
mav [Mon, 12 Oct 2015 15:48:45 +0000 (15:48 +0000)]
MFV r289188: 6281 prefetching should apply to 1MB reads

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Alexander Motin <mav@freebsd.org>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@632802744ef6d17e06d6980a95f631615c3b060f

9 years agoMFV r289187: 6251 add tunable to disable free_bpobj processing
mav [Mon, 12 Oct 2015 15:44:44 +0000 (15:44 +0000)]
MFV r289187: 6251 add tunable to disable free_bpobj processing

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@139510fb6efa97dbe5f5479594b308d940cab8d1

9 years agoMFV r289185: 6250 zvol_dump_init() can hold txg open
mav [Mon, 12 Oct 2015 15:39:03 +0000 (15:39 +0000)]
MFV r289185: 6250 zvol_dump_init() can hold txg open

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@b10bba72460aeaa53119c76ff5e647fd5585bece

9 years agoAdd missing commas
emaste [Mon, 12 Oct 2015 15:35:34 +0000 (15:35 +0000)]
Add missing commas

Pointy hat to: kan
Obtained from: ELF Tool Chain r3253

9 years agoFix indentation in etc/rc.d/fsck.
vangyzen [Mon, 12 Oct 2015 14:23:10 +0000 (14:23 +0000)]
Fix indentation in etc/rc.d/fsck.

MFC after: 3 days
Sponsored by: Dell Inc.

9 years agoUpdate from svn-1.8.14 to 1.9.2.
peter [Mon, 12 Oct 2015 09:53:55 +0000 (09:53 +0000)]
Update from svn-1.8.14 to 1.9.2.

Formal release notes are available:
  https://subversion.apache.org/docs/release-notes/1.9.html

Of particular note, the client checkout format has *not* changed so
upgrades should *not* be required.

When reading a repository (file:// or running as a local server), an
improved fsfs version 7 is available with significant performance
improvements.  An optional upgrade is possible to use the new features.
Without the upgrade, this is fully read/write compatible with the
version 6 fsfs as in svn-1.8.

Relnotes: yes

9 years agoVendor import of subversion-1.9.2
peter [Mon, 12 Oct 2015 08:54:49 +0000 (08:54 +0000)]
Vendor import of subversion-1.9.2

9 years agoUse OBJTOP, not OBJROOT
ngie [Mon, 12 Oct 2015 08:25:08 +0000 (08:25 +0000)]
Use OBJTOP, not OBJROOT

9 years agoMFhead @ r289173
ngie [Mon, 12 Oct 2015 08:20:41 +0000 (08:20 +0000)]
MFhead @ r289173

9 years agoAccept any correct frames from any source when MONITOR mode is used.
kevlo [Mon, 12 Oct 2015 08:17:21 +0000 (08:17 +0000)]
Accept any correct frames from any source when MONITOR mode is used.

Submitted by: Andriy Voskoboinyk <s3erios at gmail.com>
Differential Revision: https://reviews.freebsd.org/D3812

9 years agoRefactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
ngie [Mon, 12 Oct 2015 08:16:03 +0000 (08:16 +0000)]
Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
netbsd-tests.test.mk (r289151)

- Eliminate explicit OBJTOP/SRCTOP setting
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Divison

9 years agonet80211 drivers: eliminate any references to sc_rxtap_len/sc_txtap_len (never used...
adrian [Mon, 12 Oct 2015 05:21:51 +0000 (05:21 +0000)]
net80211 drivers: eliminate any references to sc_rxtap_len/sc_txtap_len (never used here)

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3776

9 years agourtwn(4): split *reg and *var parts (no functional change).
adrian [Mon, 12 Oct 2015 05:14:49 +0000 (05:14 +0000)]
urtwn(4): split *reg and *var parts (no functional change).

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3775

9 years agonet80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ieee80211_ra...
adrian [Mon, 12 Oct 2015 04:55:20 +0000 (04:55 +0000)]
net80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ieee80211_raw_output().

This doesn't free the mbuf upon error; the driver ic_raw_xmit method is still
doing that.

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3774

9 years agonet80211: free node reference in the ieee80211_parent_xmitpkt() when error happened.
adrian [Mon, 12 Oct 2015 04:30:38 +0000 (04:30 +0000)]
net80211: free node reference in the ieee80211_parent_xmitpkt() when error happened.

Move error handling into ieee80211_parent_xmitpkt() instead of spreading it
between functions.

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3772

9 years agowpi(4): add support for TX fragmentation.
adrian [Mon, 12 Oct 2015 04:05:12 +0000 (04:05 +0000)]
wpi(4): add support for TX fragmentation.

Tested:

* Tested with Intel 3945BG, HOSTAP and STA modes

Differential Revision: https://reviews.freebsd.org/D3770

9 years agonet80211: separate mbuf cleanup from ieee80211_fragment()
adrian [Mon, 12 Oct 2015 03:27:08 +0000 (03:27 +0000)]
net80211: separate mbuf cleanup from ieee80211_fragment()

* Create ieee80211_free_mbuf() which frees a list of mbufs.
* Use it in the fragment transmit path and ath / uath transmit paths.
* Call it in xmit_pkt() if the transmission fails; otherwise fragments
  may be leaked.

This should be a big no-op.

Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3769

9 years agoRevert r289150:
pfg [Mon, 12 Oct 2015 02:05:25 +0000 (02:05 +0000)]
Revert r289150:
Correct handling of enum attributes with g++

It is causing issues on some platforms.

Reported by: sbruno (through adrian)

9 years agosh: Make struct arglist an array instead of a linked list.
jilles [Sun, 11 Oct 2015 21:33:00 +0000 (21:33 +0000)]
sh: Make struct arglist an array instead of a linked list.

This simplifies the code (e.g. allowing use of qsort(3) instead of a
hand-rolled mergesort) and should have better cache properties.

The waste of unused args arrays after resizes is approximately the same as
the savings from getting rid of the next pointers.

At the same time, remove a piece of global state and move some duplicated
code into a function.

9 years agoDefault TESTSDIR to /usr/tests/${RELDIR:H}
ngie [Sun, 11 Oct 2015 21:29:24 +0000 (21:29 +0000)]
Default TESTSDIR to /usr/tests/${RELDIR:H}

When run from bin/ls/tests, for example, the value of TESTSDIR would be
${TESTSBASE}/${RELDIR:H} -> /usr/tests/bin/ls/tests/.. ->
/usr/tests/bin/ls

Document the new behavior in bsd.README.

While here, also document TESTSBASE

Relnotes: yes
Differential Revision: D1022
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV c336acd3: memcpy lockup workaround
cem [Sun, 11 Oct 2015 21:01:14 +0000 (21:01 +0000)]
NTB: MFV c336acd3: memcpy lockup workaround

The system will appear to lockup for long periods of time due to the NTB
driver spending too much time in memcpy.  Avoid this by reducing the
number of packets that can be serviced on a given interrupt.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV c9d534c8: Correctly handle receive buffers of the minimal size
cem [Sun, 11 Oct 2015 21:00:19 +0000 (21:00 +0000)]
NTB: MFV c9d534c8: Correctly handle receive buffers of the minimal size

The ring logic of the NTB receive buffer/transmit memory window requires
there to be at least 2 payload sized allotments.  For the minimal size
case, split the buffer into two and set the transport_mtu to the
appropriate size.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV 90f9e934: reset tx_index on link toggle
cem [Sun, 11 Oct 2015 20:59:40 +0000 (20:59 +0000)]
NTB: MFV 90f9e934: reset tx_index on link toggle

If the NTB link toggles, the driver could stop receiving due to the
tx_index not being set to 0 on the transmitting size on a link-up event.
This is due to the driver expecting the incoming data to start at the
beginning of the receive buffer and not at a random place.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV b77b2637: Link toggle memory leak
cem [Sun, 11 Oct 2015 20:59:02 +0000 (20:59 +0000)]
NTB: MFV b77b2637: Link toggle memory leak

Each link-up will allocate a new NTB receive buffer when the NTB
properties are negotiated with the remote system.  These allocations did
not check for existing buffers and thus did not free them.  Now, the
driver will check for an existing buffer and free it if not of the
correct size, before trying to alloc a new one.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV 113fc505: Handle 64bit BAR sizes
cem [Sun, 11 Oct 2015 20:58:00 +0000 (20:58 +0000)]
NTB: MFV 113fc505: Handle 64bit BAR sizes

64bit BAR sizes are permissible with an NTB device.  To support them
various modifications and clean-ups were required, most significantly
using 2 32bit scratch pad registers for each BAR.

Also, modify the driver to allow more than 2 Memory Windows.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: MFV cc0f868d: fix pointer math issues
cem [Sun, 11 Oct 2015 20:57:09 +0000 (20:57 +0000)]
NTB: MFV cc0f868d: fix pointer math issues

->remote_rx_info and ->rx_info are struct ntb_rx_info pointers.  If we
add sizeof(struct ntb_rx_info) then it goes too far.

Authored by: Dan Carpenter
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division

9 years agoSimplify netbsd-tests.test.mk
ngie [Sun, 11 Oct 2015 20:02:10 +0000 (20:02 +0000)]
Simplify netbsd-tests.test.mk

- projects/bmake and subsequent commits provide SRCTOP; there's no need to
  manually specify it now.
- Compute a sane default for OBJTOP based on .OBJDIR and RELDIR. Manually
  specifying this is probably no longer needed, but it persists just in case
  (supporting commits will need to be made to move it out of some of the meta
  .mk files).
- Compute a sane default for TESTSRC. Error out if the path cannot be found.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoCorrect handling of enum attributes with g++
pfg [Sun, 11 Oct 2015 19:58:57 +0000 (19:58 +0000)]
Correct handling of enum attributes with g++

From OpenBSD's commit log:

This was responsible for memory corruption with recent versions
of Mesa where c and c++ code share a header with a packed enum type.

Reference:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219

Obtained from: OpenBSD (CVS rev. 1.2)
MFC after: 1 week