r339653 markj Oct. 23, 2018, 1:49 p.m.
PR:		231926
Reviewed by:	emaste
MFC after:	1 month
r339651 tsoome Oct. 23, 2018, 1:38 p.m.
In current tftp code we drop out-of-order packets; however, we should play
nice and re-send ACK for older data packets we are receiving. This will
hopefully stop server repeating those packets we already have received.
Note we do not answer duplicates from "previous" session (that is, session
with different port number), those will eventually time out.

Differential Revision:	https://reviews.freebsd.org/D17087
r339649 ae Oct. 23, 2018, 1:11 p.m.
This change is similar to r339646. The callback that checks for appearing
and disappearing of tunnel ingress address can be called during VNET
teardown. To prevent access to already freed memory, add check to the
callback and epoch_wait() call to be sure that callback has finished its

MFC after:	20 days
r339648 emaste Oct. 23, 2018, 1:07 p.m.
Previously ar would report an error like "ar: fatal: Write error"
without including additional errno information.  Change warnings and
errors to include archive_errno() so that the user may have some idea
of the reason for the failure.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17650
r339647 emaste Oct. 23, 2018, 1:03 p.m.
No more 10.x releases are planned.
r339646 ae Oct. 23, 2018, 1:03 p.m.

ipsec_srcaddr() callback can be called during VNET teardown, since
ingress address checking subsystem isn't VNET specific. And thus
callback can make access to already freed memory. To prevent this,
use V_ipsec_idhtbl pointer as indicator of VNET readiness. And make
epoch_wait() after resetting it to NULL in vnet_ipsec_uninit() to
be sure that ipsec_srcaddr() is finished its work.

Reported by:	kp
MFC after:	20 days
r339645 emaste Oct. 23, 2018, 1 p.m.
It is more convenient to review old libraries, files, and directories
in order.

Sort check-* after checking for existence of files for efficiency, and
because /usr/lib/debug entries are added while iterating over the list.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17649
r339643 glebius Oct. 23, 2018, 12:53 p.m.
PR:		232554
Submitted by:	gl00my@mail.ru
r339642 ae Oct. 23, 2018, 12:50 p.m.
MFC after:	20 days
r339639 vmaffione Oct. 23, 2018, 8:55 a.m.
    - Move large parts of VALE code to a new file and header netmap_bdg.[ch].
      This is useful to reuse the code within upcoming projects.
    - Improvements and bug fixes to pipes and monitors.
    - Introduce nm_os_onattach(), nm_os_onenter() and nm_os_onexit() to
      handle differences between FreeBSD and Linux.
    - Introduce some new helper functions to handle more host rings and fake
      rings (netmap_all_rings(), netmap_real_rings(), ...)
    - Added new sysctl to enable/disable hw checksum in emulated netmap mode.
    - nm_inject: add support for NS_MOREFRAG

Approved by:	gnn (mentor)
Differential Revision:	https://reviews.freebsd.org/D17364
r339637 arichardson Oct. 23, 2018, 6:31 a.m.
The script uses shift three times and when building with a strict /bin/sh
shifting without any arguments will cause the script to fail. In this case
the target will fail and we write an empty output file. When doing a
NO_CLEAN build after this will mean fallback.c is up to date and clang
will happily compile the empty input file which leads to strange build
errors later.

Fixed by passing three empty arguments to MkFallback.sh and only creating
fallback.c if MKfallback.sh succeeds.

Aproved By:	brooks (mentor)
Differential Revision: https://reviews.freebsd.org/D16867
r339636 arichardson Oct. 23, 2018, 6:31 a.m.
When building CheriBSD we have to set XLD/XCC/XCFLAGS on the command line.
This triggers the $XCC != $CC case in bsd.compiler.mk (and the same for LD
in bsd.linker.mk) which causes it to call ${XCC} --version and
${XLD} --version (plus various awk+sed+echo calls) in every subdirectory.
For incremental builds and stages that only walk the source tree this is
often the majority of the time spent in that directory.

By only computing the value of the X_COMPILER_*/X_LINKER_* variables if
_WANT_TOOLCHAIN_CROSS_VARS is set we can reduce the number of cc/ld calls
to once per build stage instead of once per recursive make.

With this change (and no changes to the sources) the `make includes` stage
now takes 28 seconds at -j1 instead of 86 seconds.

Approved By:	brooks (mentor)
Differential Revision: https://reviews.freebsd.org/D17046
r339635 arichardson Oct. 23, 2018, 6:31 a.m.
There was an additional + after the {6} which is apparently ignored by the
FreeBSD regex implementation but was giving me an error when compiling on

While changing this also make sure that tables.h is not created if mktables
fails. The current rule would create a partial tables.h which causes following
incremental builds to use that broken file and fail with an unrelated
compilation error or even succeed even though they shouldn't.

Approved By:	jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D17069
r339634 erj Oct. 23, 2018, 4:37 a.m.
The taskqgroup_detach function does not check if task is already enqueued when
detaching it. This may lead to kernel panic if enqueued task starts after
context state lock is destroyed. Ensure that the already enqueued admin tasks
are executed before detaching them.

The issue was discovered during validation of D16429. Unloading of if_ixlv
followed by immediate removal of VFs with iovctl -D may lead to panic on
NODEBUG kernel.

As well, check if iflib is in detach before enqueueing new admin or iov
tasks, to prevent new tasks from executing while the taskqgroup tasks
are being drained.

Submitted by:	Krzysztof Galazka <krzysztof.galazka@intel.com>
Reviewed by:	shurd@, erj@
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D17404
r339632 jhibbits Oct. 23, 2018, 1:56 a.m.
The BMan softc must exist when dtsec devices are created, else a NULL
pointer is dereferenced.  QMan likely as well.  Until now, we have relied on
order within the fdt parsing to attach correctly, but this obviously is not
foolproof.  Mark these as BUS_PASS_SUPPORTDEV so they're probed and attached
explicitly before dtsec devices.