cognet [Fri, 30 Dec 2016 18:23:58 +0000 (18:23 +0000)]
Merge CK as of commit
255a47553aa5e8d0bb5f8eec63acac7f4c25a6d8, mostly
to make sure we don't use any FP instruction.
tsoome [Fri, 30 Dec 2016 18:21:52 +0000 (18:21 +0000)]
boot2 will deadlock if extended keys are used on text input
The boot2 family of bootblocks (zfsboot/gptzfsboot) are using separate
implementation if keyboard reading code, which has deadlock case when
extended key (arrows etc) are pressed.
The problem is about avoiding the noise from some systems, generating
false key events with scan code 1 and ascii code 00, so the code
does attempt to filter such cases out. Unfortunately the extended keys
also set ascii 0, and therefore the pressed key event is ignored and
the keypress is never read, resulting in infinite loop.
This update is moving the check to keyhit() function and is allowing
the rest of the code to process the extended keys.
Reviewed by: bapt, allanjude
Approved by: allanjude (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D8608
cognet [Fri, 30 Dec 2016 18:14:30 +0000 (18:14 +0000)]
Import CK as of commit
255a47553aa5e8d0bb5f8eec63acac7f4c25a6d8, mainly
to add the option to disable double-related functions, as we don't want
them in the kernel.
dim [Fri, 30 Dec 2016 18:00:31 +0000 (18:00 +0000)]
Reapply 310775, now it also builds correctly if lldb is disabled:
Move llvm-objdump from CLANG_EXTRAS to installed by default
We currently install three tools from binutils 2.17.50: as, ld, and
objdump. Work is underway to migrate to a permissively-licensed
tool-chain, with one goal being the retirement of binutils 2.17.50.
LLVM's llvm-objdump is intended to be compatible with GNU objdump
although it is currently missing some options and may have formatting
differences. Enable it by default for testing and further investigation.
It may later be changed to install as /usr/bin/objdump, it becomes a
fully viable replacement.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D8879
kib [Fri, 30 Dec 2016 17:37:06 +0000 (17:37 +0000)]
Assert that the pages found on the object queue by vm_page_next() and
vm_page_prev() have correct ownership.
In collaboration with: alc
Sponsored by: The FreeBSD Foundation (kib)
MFC after: 1 week
kan [Fri, 30 Dec 2016 17:12:41 +0000 (17:12 +0000)]
Restore status quo: mips64 does not need subr_sfbuf.c
Reported by: br
br [Fri, 30 Dec 2016 16:26:54 +0000 (16:26 +0000)]
Add parenthesis.
Noticed by: hps
Sponsored by: DARPA, AFRL
br [Fri, 30 Dec 2016 16:06:05 +0000 (16:06 +0000)]
o Fix unlocking.
o Fix types for ds_addr/ds_len.
Sponsored by: DARPA, AFRL
des [Fri, 30 Dec 2016 14:54:54 +0000 (14:54 +0000)]
Fix inverted loop condition which broke multi-line responses to CONNECT.
PR: 194483
Submitted by: Miłosz Kaniewski <milosz.kaniewski@gmail.com>
MFC after: 1 week
adrian [Fri, 30 Dec 2016 14:47:46 +0000 (14:47 +0000)]
[netmap] fix locking regressions
* Firmware oriented NICs may need to sleep in their configuration paths.
Use RLOCK instead of WLOCK to allow this to again occur.
This fixes netmap on cxgbe.
* Change the worker lock to a normal mutex rather than a spin lock.
Drivers shouldn't be doing netmap work from the fast interrupt
handlers, so it's not required to be a spinlock.
Submitted by: luigi, Vincenzo Maffione <v.maffione@gmail.com>
Reviewed by: jhb
kib [Fri, 30 Dec 2016 13:04:43 +0000 (13:04 +0000)]
Style.
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
arybchik [Fri, 30 Dec 2016 12:23:02 +0000 (12:23 +0000)]
sfxge(4): move queue size checks to after the NIC config has been populated
Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8974
arybchik [Fri, 30 Dec 2016 12:19:40 +0000 (12:19 +0000)]
sfxge(4): cleanup: add efsys_lock_state_t for type of state param in EFSYS_LOCK()
This allows the common code to use the correct type for the lock state
local variable passed to EFSYS_LOCK() and EFSYS_UNLOCK().
On Windows, this allows warning supression pragmas to be removed.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
arybchik [Fri, 30 Dec 2016 12:10:15 +0000 (12:10 +0000)]
sfxge(4): support per-command MCDI timeout
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
arybchik [Fri, 30 Dec 2016 12:06:55 +0000 (12:06 +0000)]
sfxge(4): remove obsolete Wake-On-LAN support
Wake-on-lan is not supported in production on any of our adapters, as
they don't have the required AUX power connector. (It's possible that
AUX power is supplied to some of our ALOM or mezz adapters, but if so
then we've never implemented or tested WoL support.)
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8972
arybchik [Fri, 30 Dec 2016 12:02:16 +0000 (12:02 +0000)]
sfxge(4): fix efx_filter_supported_filters API
The previous API had various problems, including the length of the
caller provided buffer not being specified, no means being available
to discover how big the buffer needs to be, and a lack of clarity of
what the resulting list contains.
To fix it:
- add the buffer length as a parameter
- if the provided buffer is too short, fail with ENOSPC and return the
required length
- ensure that the list contents are valid and add comments
describing it
It is safe to change this API as, unsuprisingly, it has no users.
Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8971
arybchik [Fri, 30 Dec 2016 12:00:17 +0000 (12:00 +0000)]
sfxge(4): add functions to efx_bootcfg supporting whole partition access
Expose expcfg partition layout discovery and validating buffer copy
routines. Needed for whole-partition expcfg operations.
Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8970
arybchik [Fri, 30 Dec 2016 11:58:23 +0000 (11:58 +0000)]
sfxge(4): make verified update result available from ef10_nvram_partn_unlock()
Manftest needs to know exactly what went wrong with the verified update
so that failing boards can be correctly diagnosed.
Submitted by: Tom Millington <tmillington at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8969
arybchik [Fri, 30 Dec 2016 11:56:12 +0000 (11:56 +0000)]
sfxge(4): add per-command timeout reporting to the common code
In newer firmware that supports multithreaded MCDI processing,
longer running commands may be run ina background thread. Add
support for drivers to query the appropriate timeout for each
MCDI request.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8968
arybchik [Fri, 30 Dec 2016 11:54:27 +0000 (11:54 +0000)]
sfxge(4): support non-interrupting event queues creation
Poll-mode driver does not use interrupts and number of used event queues
should not be limitted by the number of interrupts allocated for the
NIC.
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8967
arybchik [Fri, 30 Dec 2016 11:52:55 +0000 (11:52 +0000)]
sfxge(4): cleanup: remove now-unused function flags
Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8966
arybchik [Fri, 30 Dec 2016 11:49:37 +0000 (11:49 +0000)]
sfxge(4): cleanup: check deferred packet list tunables once
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8973
gavin [Fri, 30 Dec 2016 11:02:16 +0000 (11:02 +0000)]
Fix bit value for a debug flag definition.
Pointy hat to: gavin
np [Fri, 30 Dec 2016 08:59:49 +0000 (08:59 +0000)]
cxgbe(4): Updates to link configuration.
- Update struct link_settings and associated shared code.
- Add tunables to control FEC and autonegotiation. All ports inherit
these values as their initial settings.
hw.cxgbe.fec
hw.cxgbe.autoneg
- Add per-port sysctls to control FEC and autonegotiation. These can be
modified at any time.
dev.<port>.<n>.fec
dev.<port>.<n>.autoneg
MFC after: 3 days
Sponsored by: Chelsio Communications
hselasky [Fri, 30 Dec 2016 08:37:30 +0000 (08:37 +0000)]
Add MSIX rewrite table quirk for use with VMs.
This patch solves IRQ generation problems using the mlx5en(4) driver
with xenserver v6.5.0 in SRIOV and PCI-passthrough modes.
Until further the hw.pci.msix_rewrite_table quirk must be set manually
in /boot/loader.conf .
Reviewed by: jhb @
Sponsored by: Mellanox Technologies
MFC after: 2 weeks
mjg [Fri, 30 Dec 2016 06:26:17 +0000 (06:26 +0000)]
Remove cpu_spinwait after seq_consistent.
It does not add any benefit as the read routine will do it as necessary.
kevlo [Fri, 30 Dec 2016 03:08:46 +0000 (03:08 +0000)]
- Fix incorrect values in the computation of OFDM and MCS Tx power.
- Make power a uint8_t rather than a uint16_t.
- Replace the hardcoded RF chains.
Reviewed by: avos
asomers [Fri, 30 Dec 2016 02:22:38 +0000 (02:22 +0000)]
ATFify the gnop tests
Also, add test cases for the -p, -P, and -s options to gnop create
Reviewed by: ngie
MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D8892
kan [Fri, 30 Dec 2016 00:34:52 +0000 (00:34 +0000)]
Support mips[*]hf variants in config files
Recognize new MACHINE_ARCH names now as we have added hardfloat support.
Switch JZ4780 to mipselhf and remove all uses of TARGET_ARCH in kernel
.mk files.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D8989
avos [Thu, 29 Dec 2016 22:36:16 +0000 (22:36 +0000)]
rtwn: silence compiler warning (-Wmaybe-uninitialized).
Reported by: adrian
dim [Thu, 29 Dec 2016 21:57:16 +0000 (21:57 +0000)]
Revert r310775 for now, until we can figure out why it does not seem to
work properly when cross-building. Sorry for the breakage.
gonzo [Thu, 29 Dec 2016 21:55:23 +0000 (21:55 +0000)]
[qemu] Fix VERSATILEPB kernel boot in QEMU broken by r300968
QEMU does not implement hardware debug registers so when
dbg_monitor_is_enabled is called kernel receives "invalid instruction"
exception. QEMU implements only DIDR register and on read returns all
zeroes to indicate that it doesn't support other registers. Real
hardware has Version bits set.
MFC after: 1 week
kan [Thu, 29 Dec 2016 21:36:04 +0000 (21:36 +0000)]
Use TARGET_ARCH instead of MACHINE_ARCH for MIPS kernel
MACHINE_ARCH is overwritten by config file and will not
contain -hf suffix, so uname -p reported by kernel will
be wrong.
kan [Thu, 29 Dec 2016 21:30:52 +0000 (21:30 +0000)]
Use compiler driver to build relocatable object
This works better with external toolchains where LD
will not necessarily defailt to emulation we want.
Compiler driver knows better.
asomers [Thu, 29 Dec 2016 20:28:50 +0000 (20:28 +0000)]
Reduce the runtime of the GELI tests
There is no reduction in test coverage. On my system runtime is reduced
from 38m32s to 6m24s.
tests/sys/geom/class/eli/conf.sh
tests/sys/geom/class/eli/init_a_test.sh
tests/sys/geom/class/eli/init_test.sh
tests/sys/geom/class/eli/integrity_copy_test.sh
tests/sys/geom/class/eli/integrity_data_test.sh
tests/sys/geom/class/eli/integrity_hmac_test.sh
tests/sys/geom/class/eli/onetime_a_test.sh
tests/sys/geom/class/eli/onetime_test.sh
Move the looping code into common functions in conf.sh, and remove
alias ciphers from the list.
tests/sys/geom/class/eli/init_a_test.sh
tests/sys/geom/class/eli/init_test.sh
tests/sys/geom/class/eli/integrity_copy_test.sh
tests/sys/geom/class/eli/integrity_data_test.sh
tests/sys/geom/class/eli/integrity_hmac_test.sh
tests/sys/geom/class/eli/onetime_a_test.sh
Move a few commands that don't need to be in the inner loop out.
tests/sys/geom/class/eli/init_test.sh
tests/sys/geom/class/eli/onetime_a_test.sh
Reduce the sector count
tests/sys/geom/class/eli/Makefile
tests/sys/geom/class/eli/init_alias_test.sh
Add a test for initializing a GELI device using one of the cipher
aliases, and check that the alias is correctly interpreted.
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8814
ae [Thu, 29 Dec 2016 20:27:54 +0000 (20:27 +0000)]
Convert ipv4_flags and ipv4_offset fields into host byte order.
Also save only high bits in the ipv4_flags, because it is defined
as uint8_t. So now it will show DF and MF flags as 0x40 and 0x20.
Reviewed by: markj@
MFC after: 1 week
kan [Thu, 29 Dec 2016 20:11:50 +0000 (20:11 +0000)]
Use mips_dcache_wbinv_range instead of mips_dcache_wb_range on CPU_XBURST
Ingenic CPUs treat plain cache writeback as local-only operation and do
nothing if that is a remote CPU that holds the dirty cache line. They
do broadcast invalidate and write-and-invalidate to other cores though,
so take advantage of that and use wbinv in place of wb as this still gives
us required busdma semantics. Otherwise we'd have to do IPI to remote CPU
ourselves.
ae [Thu, 29 Dec 2016 19:57:46 +0000 (19:57 +0000)]
When we are sending IP fragments, update ip pointers in IP_PROBE() for
each fragment.
MFC after: 1 week
mav [Thu, 29 Dec 2016 18:08:04 +0000 (18:08 +0000)]
Fix build with enabled debug after r310778.
MFC after: 2 weeks
adrian [Thu, 29 Dec 2016 17:31:38 +0000 (17:31 +0000)]
[ar71xx] add EARLY_PRINTF support for the AR933x (Hornet) UART.
Tested:
* Carambola 2
adrian [Thu, 29 Dec 2016 17:31:07 +0000 (17:31 +0000)]
[ar71xx] put in an implicit read-after-write to flush things out.
Note: I may need to revisit this for mips74k.
mjg [Thu, 29 Dec 2016 16:35:49 +0000 (16:35 +0000)]
cache: sprinkle __predict_false
mav [Thu, 29 Dec 2016 15:09:34 +0000 (15:09 +0000)]
Improve use of I/O's private area.
- Since I/Os are allocates from per-port pools, make allocations store
pointer to CTL softc there, and use it where needed instead of global.
- Created bunch of helper macros to access LUN, port and CTL softc.
MFC after: 2 weeks
jmcneill [Thu, 29 Dec 2016 14:08:24 +0000 (14:08 +0000)]
Add support for audio on I2S based DesignWare HDMI controllers.
Relnotes: yes
jmcneill [Thu, 29 Dec 2016 14:00:10 +0000 (14:00 +0000)]
The JZ4780 I2S can feed either the internal audio codec or the HDMI
transmitter, but not both at the same time. This patch:
- Adds a dev.pcm.0.internal_codec sysctl node for selecting between
internal and external codec
- Changes playback sample rate from 96 kHz to 48 kHz for HDMI compatibility
- Enables i2s clock on codec access
Reviewed by: br
Differential Revision: https://reviews.freebsd.org/D8960
dim [Thu, 29 Dec 2016 13:27:04 +0000 (13:27 +0000)]
Move llvm-objdump from CLANG_EXTRAS to installed by default
We currently install three tools from binutils 2.17.50: as, ld, and
objdump. Work is underway to migrate to a permissively-licensed
tool-chain, with one goal being the retirement of binutils 2.17.50.
LLVM's llvm-objdump is intended to be compatible with GNU objdump
although it is currently missing some options and may have formatting
differences. Enable it by default for testing and further investigation.
It may later be changed to install as /usr/bin/objdump, it becomes a
fully viable replacement.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D8879
mjg [Thu, 29 Dec 2016 12:01:54 +0000 (12:01 +0000)]
cache: move shrink lock init to nchinit
This gets rid of unnecesary sysinit usage.
While here also rename the lock to be consistent with the rest.
arybchik [Thu, 29 Dec 2016 09:15:27 +0000 (09:15 +0000)]
sfxge(4): cleanup: clarify/unify variable name used for put-list length
get_count is used for get-list.
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
mjg [Thu, 29 Dec 2016 08:41:25 +0000 (08:41 +0000)]
cache: depessimize hashing macros/inlines
All hash sizes are power-of-2, but the compiler does not know that for sure
and 'foo % size' forces doing a division.
Store the size - 1 and use 'foo & hash' instead which allows mere shift.
mjg [Thu, 29 Dec 2016 08:34:50 +0000 (08:34 +0000)]
cache: drop the NULL check from VP2VNODELOCK
Now that negative entries are annotated with a dedicated flag, NULL vnodes
are no longer passed.
arybchik [Thu, 29 Dec 2016 08:28:42 +0000 (08:28 +0000)]
sfxge(4): add support for firmware-verified NVRAM updates to the common code
Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8942
arybchik [Thu, 29 Dec 2016 08:25:00 +0000 (08:25 +0000)]
sfxge(4): sync up tlv_layout.h (from firmwaresrc
82cd8a5715e9)
Submitted by: Matthew Slattery <mslattery at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
ngie [Thu, 29 Dec 2016 08:16:43 +0000 (08:16 +0000)]
Use uint32_t instead of u_int32_t for or_last_change and services in "struct systemg"
This is being done to match "struct systemg" in snmpmod(3)
No functional change
MFC after: 3 days
arybchik [Thu, 29 Dec 2016 08:10:51 +0000 (08:10 +0000)]
sfxge(4): regenerate MCDI headers from firmwaresrc .yml
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
arybchik [Thu, 29 Dec 2016 07:20:53 +0000 (07:20 +0000)]
sfxge(4): fix typo in pseudo header accessor function names
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
arybchik [Thu, 29 Dec 2016 07:10:25 +0000 (07:10 +0000)]
sfxge(4): delete hunt_phy.c
Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
arybchik [Thu, 29 Dec 2016 07:06:49 +0000 (07:06 +0000)]
sfxge(4): do not use enum type when values are bitmask
ICC complains that enumerated type mixed with another type.
Found by DPDK upstream build sanity check.
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8954
arybchik [Thu, 29 Dec 2016 07:05:47 +0000 (07:05 +0000)]
sfxge(4): do not use enum for filter flags
It is not 100% correct to assign non-enum values to enum type
variables.
Found by ICC build (DPDK PMD upstreaming).
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8953
arybchik [Thu, 29 Dec 2016 07:04:26 +0000 (07:04 +0000)]
sfxge(4): don't use Tx descriptor push with TSO option descriptors
It is not safe to push TSO option descriptors if pacer bypass is
enabled, so to make sure that doesn't happen never push TSO option
descriptors.
Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8952
arybchik [Thu, 29 Dec 2016 07:02:32 +0000 (07:02 +0000)]
sfxge(4): split EFX_FILTER_MATCH_LOC_MAC_IG back into separate flags
The flag EFX_FILTER_MATCH_LOC_MAC_IG to represent filtering on the
individual/group bit of the MAC address (with the two cases being
distingusished by the MAC address in the filter specification) was
introduced to mirror the Linux driver filtering code, but the
implementations are different enough anyway that it isn't of much value.
Having separate flags for unknown unicast and multicast simplifies
the code and allows the set of flags to match those used by MCDI.
It will also makes it easier to report whether these filters are
supported.
In the MCDI definitions, the unknown multicast and unicast flags have
the values 0x40000000 and 0x80000000 respectively, and so using the
same values for simplicity requires 32 bits in the filter specification
to store the flags. This means the structure is now a little bigger
than 64 bytes, but filters are not often used on critical paths so this
shouldn't have much impact - on Linux they are also bigger than they
used to be.
Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8951
arybchik [Thu, 29 Dec 2016 07:00:26 +0000 (07:00 +0000)]
sfxge(4): allow to have no NIC handle on Rx datapath in DPDK PMD
It is required to minimize RxQ context in the driver or avoid chaising
for the NIC handle in adapter (global per-interface) structure.
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8950
arybchik [Thu, 29 Dec 2016 06:58:51 +0000 (06:58 +0000)]
sfxge(4): add missing barrier in common code MCDI response handling
The semantics of the MCDI interfacve require reading the first
dword of the header before any other data in the buffer. Add
a barrier to the common code MCDI handler to enforce this.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8949
arybchik [Thu, 29 Dec 2016 06:57:36 +0000 (06:57 +0000)]
sfxge(4): use correct port number in sensor decoding
The port mask used for per-port sensors in mcdi_sensor_map
assumes zero-based port numbering. The port mask used in
the code is based on the one-based MCDI port number.
Fix this to lookup the correct per-port sensors, and to
allow reporting of sensor events from higher port numbers.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8947
arybchik [Thu, 29 Dec 2016 06:56:18 +0000 (06:56 +0000)]
sfxge(4): cleanup: simplify disable scatter logic in ef10_rx_qcreate
Reviewed by: gnn
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8945
arybchik [Thu, 29 Dec 2016 06:54:40 +0000 (06:54 +0000)]
sfxge(4): provide a way to find out which MAC stats are supported
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8944
arybchik [Thu, 29 Dec 2016 06:52:42 +0000 (06:52 +0000)]
sfxge(4): make the common code determine the number of PFs
Submitted by: Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8941
arybchik [Thu, 29 Dec 2016 06:51:06 +0000 (06:51 +0000)]
sfxge(4): make the common code retrieve the number of FATSOv2 contexts
Submitted by: Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8940
arybchik [Thu, 29 Dec 2016 06:49:32 +0000 (06:49 +0000)]
sfxge(4): fix efx_ev_qpoll for non-Siena builds
Both Siena and EF10 use the siena_ev_qpoll() implementation, but this
function is not defined in builds without EFSYS_OPT_SIENA.
Remove siena_ev_qpoll and inline it into efx_ev_qpoll to allow it
to be used in non-Siena builds.
Also remove outdated FIXME comment, as EF10 event batching/merging has
been implemented long ago without needing to modify this code.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8939
arybchik [Thu, 29 Dec 2016 06:47:53 +0000 (06:47 +0000)]
sfxge(4): fix common code for non-Siena builds
Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8938
arybchik [Thu, 29 Dec 2016 06:46:20 +0000 (06:46 +0000)]
sfxge(4): fix misuse of siena_build_filter in common code
Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8937
jhb [Thu, 29 Dec 2016 01:11:57 +0000 (01:11 +0000)]
Note that the Chelsio T6 also supports 25Gbps.
To avoid overflowing 80 columns, condense the cxgbe description a bit.
Reviewed by: np
ngie [Thu, 29 Dec 2016 00:20:03 +0000 (00:20 +0000)]
Prevent improper memory accesses after calling snmp_pdu_free and snmp_value_free
snmp_pdu_free: set pdu->nbindings to 0 to limit the damage that
could happen if a pdu was reused after calling the function, and
as both stack and heap allocation types are used in contrib/bsnmp
and usr.sbin/bsnmpd.
snmp_value_free: NULL out value->v.octetstring.octets after calling
free on it to prevent a double-free from occurring.
MFC after: 2 weeks
ngie [Wed, 28 Dec 2016 23:55:18 +0000 (23:55 +0000)]
Install {asn1,bsnmpagent,bsnmpclient,bsnmplib}.3 as all of the APIs
they document
Also, alphabetically sort MAN
MFC after: 3 days
marius [Wed, 28 Dec 2016 23:34:28 +0000 (23:34 +0000)]
Fix a bug in r272840; given that the optlen parameter of setsockopt(2)
is a 32-bit socklen_t, do_get3() passes the kernel to access the wrong
32-bit half on big-endian LP64 machines when simply casting the 64-bit
size_t optlen to a socklen_t pointer.
While at it and given that the intention of do_get3() apparently is to
hide/wrap the fact that socket options are used for communication with
ipfw(4), change the optlen parameter of do_set3() to be of type size_t
and as such more appropriate than uintptr_t, too.
MFC after: 3 days
emaste [Wed, 28 Dec 2016 23:02:01 +0000 (23:02 +0000)]
cdboot: add explict suffix to ambiguous or instruction
Clang disallows ambiguous instructions (GNU as has a default based on
chosen .code setting). We only need 'orb' here because KARGS_FLAGS_PXE
fits in a byte; this is the same as done in bxeboot.
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8959
markj [Wed, 28 Dec 2016 21:54:33 +0000 (21:54 +0000)]
Follow DW_AT_specification when looking up DW_AT_type attributes.
dwarf_attrval_*() will search the parent DIE referenced by a
DW_AT_abstract_origin attribute for the value of the DW_AT_type attribute.
Do the same thing for the DW_AT_specification attributes in variable
definitions emitted by GCC 6.2, and ensure that we return an error rather
than crashing if neither DW_AT_abstract_origin or DW_AT_specification is
found when looking for the value of the DW_AT_type attribute.
PR: 215350, 215395
Reviewed by: emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8920
kan [Wed, 28 Dec 2016 19:40:59 +0000 (19:40 +0000)]
Do not use read-modify-write on MSC control register.
The register is write-only, so just write only bits we want.
Submitted by: jmcneill
jhb [Wed, 28 Dec 2016 18:42:43 +0000 (18:42 +0000)]
Mention T6 and 100GbE in description of cxgbe.
MFC after: 3 days
alc [Wed, 28 Dec 2016 18:32:13 +0000 (18:32 +0000)]
Relax the object type restrictions on vm_page_alloc_contig(). Specifically,
add support for object types that were previously prohibited because they
could contain PG_CACHED pages.
Roughly halve the number of radix trie operations performed by
vm_page_alloc_contig() using the same approach that is employed by
vm_page_alloc(). Also, eliminate the radix trie lookup performed with the
free page queues lock held.
Tidy up the handling of radix trie insert failures in vm_page_alloc() and
vm_page_alloc_contig().
Reviewed by: kib, markj
Tested by: pho
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8878
arybchik [Wed, 28 Dec 2016 18:07:17 +0000 (18:07 +0000)]
sfxge(4): cleanup: remove last use of deprecated function flags with privilege check
The function flags were changed to mirror the privileges, but
the privileges are preferred.
Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8936
amdmi3 [Wed, 28 Dec 2016 18:04:18 +0000 (18:04 +0000)]
bzip2 does not exit after showing license as requested with --version
or --license as most apps would do, instead it waits for data to
compress on stdin. Because of that, if `bzip2 --version' is called,
bogus `bzip2: I won't write compressed data to a terminal' error
message will be displayed, and checking for bzip2 version in scripts
as in
bzip2 --version 2>&1 | grep -o "Version [^,]*"
will hand as bzip2 would wait for data to compress on stdin. Fix
this by exiting right after showing version/license text.
I've tried to push this upstream for more than a year, but author
is unresponsive, so upstream may be considered dead.
Ubuntu applies similar fix, for the note.
PR: 199443
Approved by: dim, bapt
MFC after: 2 weeks
Differential Revision: D8924
arybchik [Wed, 28 Dec 2016 17:56:03 +0000 (17:56 +0000)]
sfxge(4): move BIST methods from hunt_phy.c to ef10_phy.c
Submitted by: Mark Spender <mspender at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8935
arybchik [Wed, 28 Dec 2016 17:52:24 +0000 (17:52 +0000)]
sfxge(4): add UEFI ROM support to the common code
Submitted by: Andrew Lee <alee at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8934
arybchik [Wed, 28 Dec 2016 17:50:48 +0000 (17:50 +0000)]
sfxge(4): fix GET_RXDP_CONFIG usage for multi-PF on Medford
On Medford, using MC_CMD_GET_RXDP_CONFIG to query the RX end
padding setting is in the ADMIN group, and so fails for
unprivileged functions. In that case, assume the largest size
supported by Medford hardware (256bytes) to prevent overrun.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8933
arybchik [Wed, 28 Dec 2016 17:49:33 +0000 (17:49 +0000)]
sfxge(4): support Medford bootcfg partition layout in common code
For Siena and Huntington, the per-port bootcfg (aka expcfg) is
stored in a dedicated 4Kbyte partition for each port.
For Medford, the per-PF bootcfg is stored in a 2Kbyte sector
within a single shared partition. Update the common code to support
the new bootcfg layout.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8932
arybchik [Wed, 28 Dec 2016 17:45:52 +0000 (17:45 +0000)]
sfxge(4): add possibility to control event queue performance profile
It is ignored on SFN5xxx/6xxx (aka Siena).
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D8931
marius [Wed, 28 Dec 2016 17:13:03 +0000 (17:13 +0000)]
- Use correct offsets into the keys set array. As the elements of this
zero-length array are dynamically sized at run-time based on the use
of hints, compilers can't be expected to figure out these offsets on
their own. [1]
- Fix incorrect comparison in cmp_nans(). [2]
PR: 204571 [1], 202301 [2]
Submitted by: David Binderman [2]
MFC after: 3 days
ngie [Wed, 28 Dec 2016 16:34:49 +0000 (16:34 +0000)]
Don't explicitly build tcp wrappers support into bsnmpd; make it conditional
on MK_TCP_WRAPPERS != "no"
This likely fixes an issue seen where some of the USE_TCPWRAPPERS code didn't
work as advertised
MFC after: 1 week
arybchik [Wed, 28 Dec 2016 16:28:09 +0000 (16:28 +0000)]
sfxge(4): fix invalid type of eft_unicst_filter_count
Found by clang when boolean_t is defined as bool for DPDK PMD.
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
arybchik [Wed, 28 Dec 2016 16:21:46 +0000 (16:21 +0000)]
sfxge(4): do not initialize enumerated type variable to another type
Fix build warning generated by ICC.
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
loos [Wed, 28 Dec 2016 16:16:48 +0000 (16:16 +0000)]
Fix the parsing of NPt binat rules.
In this specific case the src address can be set to any, which was not
accepted prior to this commit.
pfSense bug report: https://redmine.pfsense.org/issues/6985
Reviewed by: kp
Obtained from: pfSense
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (Netgate)
pfg [Wed, 28 Dec 2016 16:16:36 +0000 (16:16 +0000)]
Undo small wrong style change.
Reported by: kib
pfg [Wed, 28 Dec 2016 15:43:17 +0000 (15:43 +0000)]
style(9) cleanups.
Just to reduce some of the issues found with indent(1).
MFC after: 1 week
arybchik [Wed, 28 Dec 2016 15:24:44 +0000 (15:24 +0000)]
sfxge(4): translate MC_CMD_ERR_ERANGE to host errno value
This is needed because MCDI command MC_CMD_REKEY can return
MC_CMD_ERR_ERANGE.
Submitted by: Tom Millington <tmillington at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
mav [Wed, 28 Dec 2016 14:50:39 +0000 (14:50 +0000)]
Pass proper arguments (handles, not directly structure pointers) to
scif_cb_domain_device_removed().
This should fix NULL dereference on task management function timeout.
Reviewed by: jimharris
MFC after: 2 weeks
emaste [Wed, 28 Dec 2016 14:25:04 +0000 (14:25 +0000)]
btxldr: process all PT_LOAD segments, not just the first two
With default settings GNU ld generates two PT_LOADs for loader.sym while
LLD generates three, because it creates a rodata segment. Previously
btxldr terminated phdr processing after two PT_LOADs. Remove the early
termination to process all PT_LOADs.
Reviewed by: kib, tsoome
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8929
br [Wed, 28 Dec 2016 14:10:33 +0000 (14:10 +0000)]
o Fix style.
o Remove set but not used variable.
Sponsored by: DARPA, AFRL
kan [Wed, 28 Dec 2016 13:48:00 +0000 (13:48 +0000)]
Be more conservative when enabling write-combining on MIPS
Some MIPS revisions do implement uncached-accelerate caching
attribute, but place extra requirement on access, such as
partial-word or out-of-sequence writes potentially having an
“unpredictable” effects.
arybchik [Wed, 28 Dec 2016 13:28:44 +0000 (13:28 +0000)]
sfxge(4): rename hunt_bist_* methods to ef10_bist_*
Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
araujo [Wed, 28 Dec 2016 13:11:22 +0000 (13:11 +0000)]
Print hostcache usage counts with TCP statistics.
PR: 196252
Submitted by: Anton Yuzhaninov <citrin+pr@citrin.ru>
MFC after: 3 weeks.