Fix compile warning when compiling with GCC.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
Our packet filters use mbuf's rcvif pointer to determine incoming interface.
Change mbuf's rcvif to enc0 and restore it after pfil processing.

PR:		110959
Sponsored by:	Yandex LLC
make userland __assfail from opensolaris compat honor 'aok' variable

This should allow zdb -A option to actually make difference.

MFC after:	2 weeks
reduce L2ARC_WRITE_SIZE on FreeBSD

FreeBSD has ARC_BUFC_NUMMETADATALISTS metadata lists and ARC_BUFC_NUMDATALISTS
data lists (currently both are 16) while illumos has just a single list
of each kind.

L2ARC_WRITE_SIZE determines the default value of l2arc_write_max which
defines limits on how much data is scanned and written to a cache device
during each run of the l2arc feed thread.  The limits are applied on the
per buffer list basis.
Because FreeBSD has more lists we proportionally reduce the limits.

Reviewed by:	Brendan Gregg (earlier version)
MFC after:	2 weeks
Sponsored by:	HybridCluster
Fix a bug introduced in
https://svnweb.freebsd.org/base?view=revision&revision=272347

MFC after: 3 days
revert r272702: wrong (earlier) change was committed
l2arc_write_buffers: reduce headroom value

FreeBSD has ARC_BUFC_NUMMETADATALISTS metadata lists and ARC_BUFC_NUMDATALISTS
data lists (currently both are 16) while illumos has just a single list
of each kind.

headroom determines how much data is scanned on a single list
during each run of the l2arc feed thread.
Because FreeBSD has more lists we proportionally decrease the limit.

Reviewed by:	Brendan Gregg (earlier version)
MFC after:	2 weeks
Sponsored by:	HybridCluster
Implement the FLUSH operation in the virtio-block emulation.

This gets rid of the following error message during FreeBSD guest bootup:
"vtbd0: hard error cmd=flush fsbn 0"

Reported by:	rodrigc
Reviewed by:	grehan
Add driver for Synopsys DesignWare Mobile Storage Host Controller.

Sponsored by:	DARPA, AFRL
Since introducing the extra mapping in r250103 for architectural performance
events we have actually counted 'Branch Instruction Retired' when people
asked for 'Unhalted core cycles' using the 'unhalted-core-cycles' event mask
mnemonic.

Reviewed by:	jimharris
Discussed with:	gnn, rwatson
MFC after:	3 days
Sponsored by:	DARPA/AFRL
Allow vt(4) to disable terminal bell with `sysctl kern.vt.bell_enable=0`,
similar as syscons(4) do.

Submitted by:	Tiwei Bie <btw@mail.ustc.edu.cn>
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Support the Vodafone R215 LET USB dongle, which is apparently a rebadged
E5372 with different product IDs.

Interestingly, the standard E5372 IDs (12d1:1506) are currently listed in
u3g.c and are the same as the E3131.  However, the R215/E5372 is an NCM
device and works well with cdce(4) whereas the E3131 isn't.  More work
may be needed to better identify the other device IDs.

MFC after:	1 week
Remove call to access(2) which didn't serve any purpose, and make it more
tolerant to errors.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Make kern.nswbuf tunable from loader.

MFC after:	1 week
cxgbe/tom: don't leak resources tied to an active open request that
cannot be sent to the chip because a prerequisite L2 resolution
failed.

Submitted by:	Hariprasad at chelsio dot com (original version)
MFC after:	2 weeks.
Implement PLPMTUD blackhole detection (RFC 4821), inspired by code
from xnu sources.  If we encounter a network where ICMP is blocked
the Needs Frag indicator may not propagate back to us.  Attempt to
downshift the mss once to a preconfigured value.

Default this feature to off for now while we do not have a full PLPMTUD
implementation in our stack.

Adds the following new sysctl's for control:
net.inet.tcp.pmtud_blackhole_detection -- turns on/off this feature
net.inet.tcp.pmtud_blackhole_mss       -- mss to try for ipv4
net.inet.tcp.v6pmtud_blackhole_mss     -- mss to try for ipv6

Adds the following new sysctl's for monitoring:
-- Number of times the code was activated to attempt a mss downshift
net.inet.tcp.pmtud_blackhole_activated
-- Number of times the blackhole mss was used in an attempt to downshift
net.inet.tcp.pmtud_blackhole_min_activated
-- Number of times that we failed to connect after we downshifted the mss
net.inet.tcp.pmtud_blackhole_failed

Phabricator:	https://reviews.freebsd.org/D506
Reviewed by:	rpaulo bz
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	Limelight Networks
Fix a long standing bug in MAC statistics register access.  One
additional register was erroneously added in the MAC register set
such that 7 TX statistics counters were wrong.
don't reinvent the wheel: rely on basename(3)

Reviewed by:	nwhitehorn
Add new quirk PCI_QUIRK_MSI_INTX_BUG to pci(4).
QAC AR816x/E2200 controller has a silicon bug that MSI interrupt
does not assert if PCIM_CMD_INTxDIS bit of command register is set.

Reviewed by:	jhb
Add support for QAC AR816x/AR817x Gigabit/Fast Ethernet controllers.
These controllers seem to have the same feature of AR813x/AR815x and
improved RSS support(4 TX queues and 8 RX queues).  alc(4) supports
all hardware features except RSS.  I didn't implement RX checksum
offloading for AR816x/AR817x just because I couldn't get
confirmation from the Vendor whether AR816x/AR817x corrected its
predecessor's RX checksum offloading bug on fragmented packets.
This change adds supports for the following controllers.
 o AR8161 PCIe Gigabit Ethernet controller
 o AR8162 PCIe Fast Ethernet controller
 o AR8171 PCIe Gigabit Ethernet controller
 o AR8172 PCIe Fast Ethernet controller
 o Killer E2200 Gigabit Ethernet controller

Tested by:	Many
Relnotes:	yes
MFC after:	2 weeks
HW donated by:	Qualcomm Atheros Communications, Inc.