Andrew Rybchenko [Thu, 29 Nov 2018 06:46:21 +0000 (06:46 +0000)]
sfxge(4): get max supported value for action MARK
The mark value for MATCH_ACTION_MARK has a maximum value.
Requesting a value larger than the maximum will cause the
filter insertion to fail with EINVAL. This patch allows the
driver to check the value at the filter validation.
Submitted by: Roman Zhukov <roman.zhukov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18240
Andrew Rybchenko [Thu, 29 Nov 2018 06:46:10 +0000 (06:46 +0000)]
sfxge(4): support MARK and FLAG actions in filters
This patch adds support for DPDK rte_flow "MARK" and "FLAG" filter
actions to filters on EF10 family NICs.
Submitted by: Roman Zhukov <roman.zhukov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18239
Andrew Rybchenko [Thu, 29 Nov 2018 06:46:01 +0000 (06:46 +0000)]
sfxge(4): get actions MARK and FLAG support
Filter actions MARK and FLAG are supported on Medford2 by DPDK
firmware variant.
Submitted by: Roman Zhukov <roman.zhukov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18238
Andrew Rybchenko [Thu, 29 Nov 2018 06:45:38 +0000 (06:45 +0000)]
sfxge(4): support equal stride super-buffer Rx mode
Equal stride super-buffer Rx mode is supported by DPDK firmware
variant. One Rx descriptor provides many Rx buffers to firmware.
Rx buffers follow each other with specified stride.
Also it supports head of line blocking with timeout to address
drops when no Rx descriptors are available. So it gives extra time
to the driver to provide Rx descriptors before drop.
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18236
Andrew Rybchenko [Thu, 29 Nov 2018 06:45:15 +0000 (06:45 +0000)]
sfxge(4): make RxQ type data an union
The type is an internal interface. Single integer is insufficient
to carry RxQ type-specific information in the case of equal stride
super-buffer Rx mode (packet buffers per bucket, maximum DMA length,
packet stride, head of line block timeout).
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18234
Andrew Rybchenko [Thu, 29 Nov 2018 06:44:51 +0000 (06:44 +0000)]
sfxge(4): honour packed stream RSS restriction
Packed stream firmware variant on EF10 adapters has a
number of properties which must be taken into account:
- Only one exclusive RSS context is available per port.
- Only IP addresses can contribute to the hash value.
Huntington and Medford have one more limitation which
is important for the drivers capable of packed stream:
- Hash algorithm is non-standard (i.e. non-Toeplitz).
This implies XORing together source + destination
IP addresses (or last four bytes in the case of IPv6)
and using the result as the input to a Toeplitz hash.
This patch provides a number of improvements in order
to treat the mentioned limitations in the common code.
If the firmware variant is packed stream, the list of
supported hash tuples will include less variants, and
the maximum number of RSS contexts will be set to one.
Submitted by: Ivan Malov <ivan.malov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18232
Andrew Rybchenko [Thu, 29 Nov 2018 06:44:39 +0000 (06:44 +0000)]
sfxge(4): support more RSS hash configurations
Modern firmwares on EF10 adapters have support for
more traffic classes eligible for hash computation.
Also, it has become possible to adjust hashing per
individual class and select distinct packet fields
which will be able to contribute to the hash value.
This patch adds support for the mentioned features.
Submitted by: Ivan Malov <ivan.malov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18231
Andrew Rybchenko [Thu, 29 Nov 2018 06:44:28 +0000 (06:44 +0000)]
sfxge(4): add a new means to control RSS hash
Currently, libefx has no support for additional RSS modes
available with later controllers. In order to support this,
libefx should be able to list available hash configurations.
This patch provides basic infrastructure for the new interface.
The client drivers will be able to query the list of supported
hash configurations for a particular hash algorithm. Also, it
will be possible to configure hashing by means of new definitions.
Submitted by: Ivan Malov <ivan.malov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18230
Andrew Rybchenko [Thu, 29 Nov 2018 06:44:20 +0000 (06:44 +0000)]
sfxge(4): cope with clang warning on negative shift
clang 4.0.1-6 on Ubuntu generates false positive warning that shift
is negative. It is done regardless of the fact that the branch is
not taken because of previous check.
The warning is generate in EFX_INSERT_NATIVE32 used by
EFX_INSERT_FIELD_NATIVE32. All similar cases are fixed as well.
It is undesirable to suppress the warning completely.
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18229
Andrew Rybchenko [Thu, 29 Nov 2018 06:44:09 +0000 (06:44 +0000)]
sfxge(4): fix comparison always true warning
Loopback type used as bit index has efx_loopback_type_t type
which is enum. clang complains that it is always true when it
is compared with qword (64 bit) bits number boundary.
Andrew Rybchenko [Thu, 29 Nov 2018 06:43:57 +0000 (06:43 +0000)]
sfxge(4): support FW subvariant choice
If DPDK application or OS does not need checksumming on transmit,
it may be disabled in firmware to achieve higher packet rates.
Choice must be done before VIS allocation and is allowed if
no other non-preboot and firmware subvariant-unaware drivers are
attached.
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18227
FW subvariants allow to tweak NIC global features. For example,
if no drivers require checksumming on transmit, it may be disabled
in FW to increase packet rate.
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18225
Andrew Rybchenko [Thu, 29 Nov 2018 06:43:12 +0000 (06:43 +0000)]
sfxge(4): add values for RxDPCPU firmware id recognition
Submitted by: Roman Zhukov <roman.zhukov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18223
Andrew Rybchenko [Thu, 29 Nov 2018 06:42:49 +0000 (06:42 +0000)]
sfxge(4): support drop filters on EF10 family NICs
Add support for filters which drop packets when forming MCDI request
for a filter.
Submitted by: Roman Zhukov <roman.zhukov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18221
Andrew Rybchenko [Thu, 29 Nov 2018 06:42:38 +0000 (06:42 +0000)]
sfxge(4): distinguish filters for encapsulated packets
Add filter match flag to distinguish filters applied only to
encapsulated packets.
Match flags set should allow to determine whether a filter
is supported or not. The problem is that if specification
has supported set outer match flags and specified
encapsulation without any inner flags, check says that it
is supported, and filter insertion is performed. However,
there is no filtering of the encapsulated traffic. A new
flag is added to solve this problem and separate the
filters for the encapsulated packets.
Submitted by: Roman Zhukov <roman.zhukov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18220
Andrew Rybchenko [Thu, 29 Nov 2018 06:42:15 +0000 (06:42 +0000)]
sfxge(4): support VNI/VSID and inner frame local MAC
This supports VNI/VSID and inner frame local MAC fields to
match in VXLAN, GENEVE, or NVGRE packets.
Submitted by: Roman Zhukov <roman.zhukov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18218
Andrew Rybchenko [Thu, 29 Nov 2018 06:42:04 +0000 (06:42 +0000)]
sfxge(4): support filters for encapsulated packets
This adds filters for encapsulated packets to the list
returned by ef10_filter_supported_filters().
Submitted by: Roman Zhukov <roman.zhukov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18217
Andrew Rybchenko [Thu, 29 Nov 2018 06:41:41 +0000 (06:41 +0000)]
sfxge(4): add signed image layout support
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18215
Andrew Rybchenko [Thu, 29 Nov 2018 06:29:24 +0000 (06:29 +0000)]
sfxge(4): add firmware image layout option
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18214
Mateusz Guzik [Thu, 29 Nov 2018 05:08:46 +0000 (05:08 +0000)]
Deinline racct throttling out of syscall exit path.
racct is not enabled by default and even when it is enabled processes are
typically not throttled. The order of checks is left unchanged since
racct_enable will be annotated as __read_frequently, while checking for the
flag in the processes would probably require an extra fetch.
Mateusz Guzik [Thu, 29 Nov 2018 02:52:08 +0000 (02:52 +0000)]
proc: create a dedicated lock for zombproc to ligthen the load on allproc_lock
waitpid always takes proctree to evaluate the list, but only takes allproc
if it can reap. With this patch allproc is no longer taken, which helps during
poudriere -j 128.
Discussed with: kib
Sponsored by: The FreeBSD Foundation
John Baldwin [Thu, 29 Nov 2018 01:15:53 +0000 (01:15 +0000)]
Move CLIP table handling out of TOM and into the base driver.
- Store the clip table in 'struct adapter' instead of in the TOM softc.
- Init the clip table during attach and teardown during detach.
- While here, add a dev.<nexus>.<unit>.misc.clip sysctl to dump the
CLIP table.
This does mean that we update the clip table even if TOE is not enabled,
but non-TOE things need the CLIP table anyway.
Jilles Tjoelker [Wed, 28 Nov 2018 20:03:53 +0000 (20:03 +0000)]
sh: Fix ${param?} default error message
If word in ${param?word} is missing, the shell shall write a default error
message. So expanding ${param?} when param is not set should write an error
message like
Gleb Smirnoff [Wed, 28 Nov 2018 19:54:02 +0000 (19:54 +0000)]
Fix yet another edge case in uma_startup_count(). If zone size fits into
several pages, but leaves no space for struct uma_slab at the end we
miscalculate number of pages by one. Totally mimic keg_large_init() math
here to cover that problem.
Gleb Smirnoff [Wed, 28 Nov 2018 19:17:27 +0000 (19:17 +0000)]
For not offpage zones the slab is placed at the end of page. Keg's uk_pgoff
is calculated to guarantee that struct uma_slab is placed at pointer size
alignment. Calculation of real struct uma_slab size is done in keg_ctor()
and yet again in keg_large_init(), to check if we need an extra page. This
calculation can actually be performed at compile time.
- Add SIZEOF_UMA_SLAB macro to calculate size of struct uma_slab placed at
an end of a page with alignment requirement.
- Use SIZEOF_UMA_SLAB in keg_ctor() and in keg_large_init(). This is a not
a functional change.
- Use SIZEOF_UMA_SLAB in UMA_SLAB_SPACE definition and in keg_small_init().
This is a potential bugfix, but in reality I don't think there are any
systems affected, since compiler aligns struct uma_slab anyway.
Stephen Hurd [Wed, 28 Nov 2018 17:37:17 +0000 (17:37 +0000)]
Fix first-packet completion
The first packet after the ring is initialized was never
completed as isc_txd_credits_update() would not include it in the
count of completed packets. This caused netmap to never complete
a batch. See PR 233022 for more details.
This is the same fix as the r340310 for e1000
PR: 233607
Reported by: lev
Reviewed by: lev
MFC after: 3 days
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D18368
Justin Hibbits [Wed, 28 Nov 2018 16:00:52 +0000 (16:00 +0000)]
powerpc: Don't include KERNBASE in genassym, it's unnecessary
A related future change, which changes KERNBASE for Book-E for some reason
causes a "KERNBASE redefined" error with assym.inc, even though it only changed
the value of KERNBASE and nothing else. Since machine/vmparam.h is already
included in booke/locore.S, and the requisite guards are already in place for
properly handling KERNBASE in vmparam.h, just remove it from genassym, and
include vmparam.h in the AIM locore files.
Andrew Rybchenko [Wed, 28 Nov 2018 09:25:21 +0000 (09:25 +0000)]
sfxge(4): support CTPIO stats
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18211
Andrew Rybchenko [Wed, 28 Nov 2018 09:25:09 +0000 (09:25 +0000)]
sfxge(4): regenerate headers to pick up CTPIO stats
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18210
Andrew Rybchenko [Wed, 28 Nov 2018 09:24:36 +0000 (09:24 +0000)]
sfxge(4): run genfwdef to update headers
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18207
Andrew Rybchenko [Wed, 28 Nov 2018 09:24:25 +0000 (09:24 +0000)]
sfxge(4): document the event type for CTPIO sends
Document the TX_EV_TYPE used for TX completion events corresponding
to CTPIO sends.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18206
Andrew Rybchenko [Wed, 28 Nov 2018 09:24:14 +0000 (09:24 +0000)]
sfxge(4): add 1.3V voltage and current sensors
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18205
Andrew Rybchenko [Wed, 28 Nov 2018 09:23:52 +0000 (09:23 +0000)]
sfxge(4): add Medford2 support for tunnel encapsulations
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18203
Andrew Rybchenko [Wed, 28 Nov 2018 09:23:41 +0000 (09:23 +0000)]
sfxge(4): add Medford2 support for licensing
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18202
Andrew Rybchenko [Wed, 28 Nov 2018 09:23:30 +0000 (09:23 +0000)]
sfxge(4): add Medford2 support for external port numbers
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18201
Andrew Rybchenko [Wed, 28 Nov 2018 09:23:19 +0000 (09:23 +0000)]
sfxge(4): group Medford external port mapping entries
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18200
Andrew Rybchenko [Wed, 28 Nov 2018 09:23:05 +0000 (09:23 +0000)]
sfxge(4): clarify port mode names and masks
New port mode names are defined for Medford2 and later, and
the existing names are aliased to them. Add comments with the
numeric port mode to clarify the external port modes table.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18199
Andrew Rybchenko [Wed, 28 Nov 2018 09:22:53 +0000 (09:22 +0000)]
sfxge(4): support Medford2 event timer semantics
The event timer interface has changed for Medford2 - for
details see bug66418 comment 9. Update the common code to
use the new timer semantics for Medford2.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18198
Andrew Rybchenko [Wed, 28 Nov 2018 09:22:42 +0000 (09:22 +0000)]
sfxge(4): support FEC mode settings
Medford2 controllers support control and reporting of
FEC modes for 25G and higher links. See SF-109306-TC
for suggested usage in client code.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18197
Andrew Rybchenko [Wed, 28 Nov 2018 06:56:34 +0000 (06:56 +0000)]
sfxge(4): remove obsolete comments
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18196
Andrew Rybchenko [Wed, 28 Nov 2018 06:56:22 +0000 (06:56 +0000)]
sfxge(4): move VI window size config to ef10 NIC board
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18195
Andrew Rybchenko [Wed, 28 Nov 2018 06:56:11 +0000 (06:56 +0000)]
sfxge(4): move privilege config to ef10 NIC board config
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18194
Andrew Rybchenko [Wed, 28 Nov 2018 06:55:59 +0000 (06:55 +0000)]
sfxge(4): move vector config to ef10 NIC board config
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18193
Andrew Rybchenko [Wed, 28 Nov 2018 06:55:47 +0000 (06:55 +0000)]
sfxge(4): move limits config to ef10 NIC board config
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18192
Andrew Rybchenko [Wed, 28 Nov 2018 06:55:36 +0000 (06:55 +0000)]
sfxge(4): move Tx config to ef10 NIC board config
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18191
Andrew Rybchenko [Wed, 28 Nov 2018 06:55:24 +0000 (06:55 +0000)]
sfxge(4): move Rx config to ef10 NIC board config
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18190
Andrew Rybchenko [Wed, 28 Nov 2018 06:55:12 +0000 (06:55 +0000)]
sfxge(4): move datapath config to ef10 NIC board cfg
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18189
Andrew Rybchenko [Wed, 28 Nov 2018 06:55:00 +0000 (06:55 +0000)]
sfxge(4): move PHY/link config to ef10 NIC board cfg
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18188
Andrew Rybchenko [Wed, 28 Nov 2018 06:54:49 +0000 (06:54 +0000)]
sfxge(4): move legacy board config to ef10 NIC board cfg
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18187
Andrew Rybchenko [Wed, 28 Nov 2018 06:54:37 +0000 (06:54 +0000)]
sfxge(4): move MAC address config to ef10 NIC board cfg
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18186
Andrew Rybchenko [Wed, 28 Nov 2018 06:54:25 +0000 (06:54 +0000)]
sfxge(4): move PF/VF config to ef10 NIC board config
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18185
Andrew Rybchenko [Wed, 28 Nov 2018 06:54:13 +0000 (06:54 +0000)]
sfxge(4): move port config to ef10 NIC board config
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18184
Andrew Rybchenko [Wed, 28 Nov 2018 06:53:51 +0000 (06:53 +0000)]
sfxge(4): add ef10 NIC board config method
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18182
Andrew Rybchenko [Wed, 28 Nov 2018 06:53:40 +0000 (06:53 +0000)]
sfxge(4): use correct name for frame truncation event
The RX_ECC_ERR flag in RX events was misnamed, as it
reported frame truncation. Use the new RX_TRUNC_ERR
name for this flag.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18181
Justin Hibbits [Wed, 28 Nov 2018 02:00:27 +0000 (02:00 +0000)]
powerpc: Prepare Book-E kernels for KERNBASE != run base
Book-E kernels really run at VM_MIN_KERNEL_ADDRESS, which currently happens to
be the same as KERNBASE. KERNBASE is the linked address, which the loader also
takes to be the physical load address. Treat KERNBASE as a physical address,
not a virtual, and change virtual address references for KERNBASE to use
something more appropriate.
Justin Hibbits [Wed, 28 Nov 2018 01:47:01 +0000 (01:47 +0000)]
powerpcspe: Don't crash the loader on ubldr with SPE instructions.
-msoft-float seems to be insufficient for disabling the SPE on powerpcspe.
Force it off with -mno-spe as well. This prevents a crash in ubldr on
powerpcspe.
pmap_large_unmap() asserts that an unmapping request covers the
entirety of a 2M or 1G page. The logic in the asserts was out of date
with the loop logic. Correct the test to actually check that
destroying the current superpage mapping does not unmap addresses
beyond those requested by the caller.
Submitted by: D Scott Phillips <d.scott.phillips@intel.com>
Reviewed by: alc
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D18345
Andrew Gallatin [Tue, 27 Nov 2018 20:01:05 +0000 (20:01 +0000)]
Use busdma unconditionally in iflib
- Remove the complex mechanism to choose between using busdma
and raw pmap_kextract at runtime. The reduced complexity makes
the code easier to read and maintain.
- Fix a bug in the small packet receive path where clusters were
repeatedly mapped but never unmapped. We now store the cluster's
bus address and avoid re-mapping the cluster each time a small
packet is received.
This patch fixes bugs I've seen where ixl(4) will not even
respond to ping without seeing DMAR faults.
I see a small improvement (14%) on packet forwarding tests using
a Haswell based Xeon E5-2697 v3. Olivier sees a small
regression (-3% to -6%) with lower end hardware.
Reviewed by: mmacy
Not objected to by: sbruno
MFC after: 8 weeks
Sponsored by: Netflix, Inc
Differential Revision: https://reviews.freebsd.org/D17901
Jamie Gritton [Tue, 27 Nov 2018 17:51:50 +0000 (17:51 +0000)]
In hardened systems, where the security.bsd.unprivileged_proc_debug sysctl
node is set, allow setting security.bsd.unprivileged_proc_debug per-jail.
In part, this is needed to create jails in which the Address Sanitizer
(ASAN) fully works as ASAN utilizes libkvm to inspect the virtual address
space. Instead of having to allow unprivileged process debugging for the
entire system, allow setting it on a per-jail basis.
The sysctl node is still security.bsd.unprivileged_proc_debug and the
jail(8) param is allow.unprivileged_proc_debug. The sysctl code is now a
sysctl proc rather than a sysctl int. This allows us to determine setting
the flag for the corresponding jail (or prison0).
As part of the change, the dynamic allow.* API needed to be modified to
take into account pr_allow flags which may now be disabled in prison0.
This prevents conflicts with new pr_allow flags (like that of vmm(4)) that
are added (and removed) dynamically.
Also teach the jail creation KPI to allow differences for certain pr_allow
flags between the parent and child jail. This can happen when unprivileged
process debugging is disabled in the parent prison, but enabled in the
child.
When deciding whether to send the complete URL or just the document part,
we were looking at the original URL rather than the one we were currently
processing. This meant that if we were trying to retrieve an HTTP URL but
were redirected to an HTTPS URL, and HTTPS proxying was enabled, we would
send an invalid request and most likely get garbage back.
Ian Lepore [Tue, 27 Nov 2018 16:16:38 +0000 (16:16 +0000)]
Restore the ability to override the disk unit/partition at the boot: prompt
in gptboot.
When arch-independent geli support was added, a new static 'gdsk' struct
was added, but there was still a static 'dsk' struct, and when you typed
in an alternate disk/partition, the string was parsed into that struct,
which was then never used for anything. Now the string gets parsed into
gdsk.dsk, the struct that's actually used.
David Bright [Tue, 27 Nov 2018 15:12:34 +0000 (15:12 +0000)]
Make whitespace more consistent in libkqueue tests.
After r337820, which "corrected" some spaces-instead-of-tab whitespace
issues in the libkqueue tests, jmg@ pointed out that these files were
originally space-based, not tab-spaced, and so the correction should
have been to get rid of the tabs that had been introduced in previous
changes, not the spaces. This change does that. This is a whitespace
only change; no functional change is intended.
Add a “skip_dsn” option to g_part's bootcode verb to prevent g_part_mbr
from setting the volume serial number. This unbreaks older boot blocks
that don't support serial numbers, and allows boot0cfg to set the serial
number itself if requested by the user.
Andrew Rybchenko [Tue, 27 Nov 2018 14:16:14 +0000 (14:16 +0000)]
sfxge(4): remove MAC stats size define
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18180
Andrew Rybchenko [Tue, 27 Nov 2018 14:16:03 +0000 (14:16 +0000)]
sfxge(4): resolve code analysis warnings
Minimal changes adding buffer size checks and simplifying checksum
processing.
Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18179
Andrew Rybchenko [Tue, 27 Nov 2018 14:15:52 +0000 (14:15 +0000)]
sfxge(4): decode Medford2 FEC stats if available
Decode Medford2 FEC stats if available in MAC stats DMA buffer.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18178