Commit Graph

238236 Commits

Author SHA1 Message Date
Emmanuel Vadot
c3aec23870 arm64: rockchip: Add RK3399_CLK_PLL
PLLs on the RK3399 are different than the ones on the RK3328.
Add a new type and some dedicated recalc and set_freq functions.
Rename the RK3328 dedicated rk_clk_pll function with rk3328_ prefix.

MFC after:	1 month
2018-12-01 20:26:59 +00:00
Cy Schubert
8a50297550 Restore handling of PMTU discovery, removed through an unifdef(1)
following the MFV of r254219 into r255332. In addition the 'FreeBSD'
macro was never defined in ipfilter 5.1.2 thus it never would have
been enabled in the first place.

This work is prompted by a general cleanup of the IP Filter code
prompted by working to resolve a PR. More to follow.

MFC after:	1 week
2018-12-01 17:59:41 +00:00
Konstantin Belousov
a823302783 Allow to create swap zone larger than v_page_count / 2.
If user configured the maxswapzone tunable, just take the literal
value for the initial zone sizing attempt.  Before, it was only
possible to reduce the zone by the tunable.

While there, correct the message which was not correct when zone
creation rounded the size up.

Reported by:	jmg
Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D18381
2018-12-01 16:50:12 +00:00
Konstantin Belousov
36e1b9702e Correct the tunable name in the message.
Submitted by:	 Andre Albsmeier <mail@fbsd.e4m.org>
PR:	231577
MFC after:	1 week
2018-12-01 16:43:18 +00:00
Mateusz Guzik
ddf6571230 amd64: align target memmove buffer to 16 bytes before using rep movs
See the review for sample test results.

Reviewed by:	kib (kernel part)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D18401
2018-12-01 14:20:32 +00:00
Kristof Provost
df5ceb3b66 pf tests: Test name handling
Provoke a situation where two interfaces have the same name, and verify
pf's reaction to this.
2018-12-01 09:59:32 +00:00
Kristof Provost
b2e0b24f76 pf: Fix panic on overlapping interface names
In rare situations[*] it's possible for two different interfaces to have
the same name. This confuses pf, because kifs are indexed by name (which
is assumed to be unique). As a result we can end up trying to
if_rele(NULL), which panics.

Explicitly checking the ifp pointer before if_rele() prevents the panic.
Note pf will likely behave in unexpected ways on the the overlapping
interfaces.

[*] Insert an interface in a vnet jail. Rename it to an interface which
exists on the host. Remove the jail. There are now two interfaces with
the same name in the host.
2018-12-01 09:58:21 +00:00
Kristof Provost
db785060cb pf tests: Make pass_block:noalias more robust
Send several ICMPv6 echo requests. We've seen occasional failures with a
single request.
2018-12-01 09:57:29 +00:00
Guangyuan Yang
e4c7371cef Clarify that patterns are extended regular expressions in pkill(1) manual page.
PR:		231060
Submitted by:	naddy
MFC after:	3 days
2018-12-01 05:58:33 +00:00
Eugene Grosbein
e0d1669595 Remove trim(8) by multiple demands. 2018-12-01 03:20:10 +00:00
Eric van Gyzen
de7417c40c Maybe make gcc happy
According to Jenkins, the GCC architectures were unhappy because:

    sigaltstack.c:82: warning: missing initializer
    sigaltstack.c:82: warning: (near initialization for 'oss.ss_size')

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2018-11-30 23:47:57 +00:00
Eric van Gyzen
984969cd96 Fix reporting of SS_ONSTACK
Fix reporting of SS_ONSTACK in nested signal delivery when sigaltstack()
is used on some architectures.

Add a unit test for this.  I tested the test by introducing the bug
on amd64.  I did not test it on other architectures.

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D18347
2018-11-30 22:44:33 +00:00
Eugene Grosbein
09057b2c5c trim(8): serveral style fixes
Submitted by:		imp
MFC after:		1 month
Differential Revision:	https://reviews.freebsd.org/D18380
2018-11-30 21:57:02 +00:00
Mateusz Guzik
94243af2da amd64: handle small memmove buffers with overlapping stores
Handling sizes of > 32 backwards will be updated later.

Reviewed by:	kib (kernel part)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D18387
2018-11-30 20:58:08 +00:00
Mariusz Zaborski
1489776d43 iscsi: simplify the capsicumization
Approved by:	trasz
Differential Revision:	https://reviews.freebsd.org/D17962
2018-11-30 19:40:16 +00:00
Mariusz Zaborski
77ebcc05ea libcasper: do not fail if Capsicum is not avilable
Casper service can be also used on the kernels without Capsicum support.

Reported by:	sbruno
Tested by:	sbruno
2018-11-30 19:27:14 +00:00
Mark Johnston
e7a0ad24b0 Add missing display messages when toggling modes.
PR:		233667
Submitted by:	James Wright <james.wright@jigsawdesign.com>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D18331
2018-11-30 18:02:59 +00:00
Edward Tomasz Napierala
5167a1a737 Silence down the example builds a bit.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-30 16:02:27 +00:00
Edward Tomasz Napierala
f1d1d6f66e Add an example of quick kernel rebuild.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-30 16:01:43 +00:00
Edward Tomasz Napierala
873a1193b7 Add an example of rebuilding a single piece of userspace.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-30 15:56:14 +00:00
Edward Tomasz Napierala
7f92f23316 Revert r341337; according to imp@ we still support these.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-30 15:52:03 +00:00
Edward Tomasz Napierala
fd2f7a7f90 Use .Va for sysctls, not .Dv.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-30 12:17:35 +00:00
Edward Tomasz Napierala
7b8bdbef02 Use .Va for sysctls, not .Dv.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-30 11:50:41 +00:00
Edward Tomasz Napierala
6ce4ddc466 Remove duplicated word.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-30 11:44:43 +00:00
Edward Tomasz Napierala
9599680a9c Say in plain text what the 'debug' keymap action usually is.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-30 11:44:16 +00:00
Edward Tomasz Napierala
b7477b1e5f Remove the hint for ISA buses; we don't support them anymore.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-11-30 11:42:19 +00:00
Michael Tuexen
c8b53ced95 Limit option_len for the TCP_CCALGOOPT.
Limiting the length to 2048 bytes seems to be acceptable, since
the values used right now are using 8 bytes.

Reviewed by:		glebius, bz, rrs
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D18366
2018-11-30 10:50:07 +00:00
Andrey V. Elsukov
851073551d Adapt the fix in r341008 to correctly work with EBR.
IFNET_RLOCK_NOSLEEP() is epoch_enter_preempt() in FreeBSD 12+. Holding
it in sysctl_rtsock() doesn't protect us from ifnet unlinking, because
unlinking occurs with IFNET_WLOCK(), that is rw_wlock+sx_xlock, and it
doesn check that concurrent code is running in epoch section. But while
we are in epoch section, we should be able to do access to ifnet's
fields, even it was unlinked. Thus do not change if_addr and if_hw_addr
fields in ifnet_detach_internal() to NULL, since rtsock code can do
access to these fields and this is allowed while it is running in epoch
section.

This should fix the race, when ifnet_detach_internal() unlinks ifnet
after we checked it for IFF_DYING in sysctl_dumpentry.

Move free(ifp->if_hw_addr) into ifnet_free_internal(). Also remove the
NULL check for ifp->if_description, since free(9) can correctly handle
NULL pointer.

MFC after:	1 week
2018-11-30 10:36:14 +00:00
Emmanuel Vadot
fc6ebb297b arm64: allwinner: Add 792Mhz frequency to sun50i-a64-opp
This is the frequency of the cpu on the Pinebook so add it to make
cpufreq find the current setting.
Note that this dtbo on the Pinebook doesn't work right now as u-boot
dtb doesn't have symbols and so it fails to apply. Linux 4.20 have
the dts and will be imported once taggued.

MFC after:	1 month
X-MFC with:	r341268
2018-11-30 10:31:30 +00:00
Toomas Soome
fb0df66629 loader.efi: fix EFI getchar() for multiple consoles
This fix is ported from illumos (issue #9970), the analysis and initial
implementation was done by John Levon.

See also: https://www.illumos.org/issues/9970

Currently, efi_cons_getchar() will wait for a key. While this seems to make
sense, the implementation of getchar() in common/console.c will loop across
getchar() for all consoles without doing ischar() first.

This means that if we've configured multiple consoles, we can't input into
the serial, as getchar() will be sat waiting for input only from efi_console.c

This patch does implement a bit more generic key buffer to support
translation of input keys, and we use generic efi_readkey() to reduce
duplication from calls from getchar() and poll().
2018-11-30 08:42:14 +00:00
Toomas Soome
cdff10360e loader: create separate lists for fd, cd and hd, merge bioscd with biosdisk
Create unified block IO implementation in BIOS version, like it is done in UEFI
side. Implement fd, disk and cd device lists, this will split floppy devices
from disks and will allow us to have consistent, predictable device naming
(modulo BIOS issues).

Differential Revision:	https://reviews.freebsd.org/D17888
2018-11-30 08:01:11 +00:00
Andrew Rybchenko
ad72d03040 sfxge(4): rollback last seen VLAN TCI if Tx packet is dropped
Early processing of a packet on transmit may change last seen
VLAN TCI in the queue context. If such a packet is eventually
dropped, last seen VLAN TCI must be set to its previous value.

Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D18288
2018-11-30 07:11:05 +00:00
Andrew Rybchenko
b162acfe52 sfxge(4): ensure EvQ poll stops when abort is requested
If an event handler requested an abort, only the inner loop was
guarenteed to be broken out of - the outer loop could continue
if total == batch.

Fix this by poisoning batch to ensure it is different to total.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D18287
2018-11-30 07:10:54 +00:00
Andrew Rybchenko
c6831b0bcb sfxge(4): support Medford2
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18286
2018-11-30 07:10:43 +00:00
Andrew Rybchenko
f0a2945d38 sfxge(4): update external port number calculation
Revise the external port calculation to support all
X2 port modes. The previous algorithm could not
handle different port numbering schemes on each cage.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18285
2018-11-30 07:10:32 +00:00
Andrew Rybchenko
d707fb201e sfxge(4): correct annotations where NULL input is OK
Correct annotations where NULL input can be permitted

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18284
2018-11-30 07:10:20 +00:00
Andrew Rybchenko
405f7a36fe sfxge(4): support new link modes in the driver
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18283
2018-11-30 07:10:09 +00:00
Andrew Rybchenko
f0095e1f86 sfxge(4): use transceiver ID when reading info
In efx_mcdi_phy_module_get_info() probe the
transceiver identification byte rather than assume
the module matches the fixed port type.  This
supports scenarios such as a SFP mounted in a QSFP
port via a QSA module.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18282
2018-11-30 07:09:58 +00:00
Andrew Rybchenko
cf94ca3704 sfxge(4): add accessor to whole link status
Add a function which makes an MCDI GET_LINK request and
packages up the results. Currently, the get-link function
is triggered from several entry points which then pass
on or store selected parts of the data. When the driver
needs to obtain the current link state, it is more
efficient to do this in a single call.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18281
2018-11-30 07:09:46 +00:00
Andrew Rybchenko
5a51b32e4c sfxge(4): guard Rx scale code with corresponding option
Previously only some of the code was guarded by this which caused
a build error when EFSYS_OPT_RX_SCALE is 0 (e.g. in manftest).

Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18280
2018-11-30 07:09:34 +00:00
Andrew Rybchenko
109f5727a0 sfxge(4): infer port mode bandwidth from max link speed
Limit the port mode bandwidth calculations by the maximum
reported link speed. This system detects 25G vs 10G cards,
and 100G port modes vs 40G.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18279
2018-11-30 07:09:23 +00:00
Andrew Rybchenko
c42b6a3560 sfxge(4): support improvements to bandwidth calculations
Change the interface to ef10_nic_get_port_mode_bandwidth()
so more NIC information can be used to infer bandwidth
requirements. Huntington calculations separated out
completely.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18278
2018-11-30 07:09:11 +00:00
Andrew Rybchenko
7e370b0ea7 sfxge(4): add X2 port modes to bandwidth calculator
Add cases for the new port modes supported by X2 NICs.
Lane bandwidth is calculated for pre-X2 cards so is an
underestimate for X2 in 25G/100G modes.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18277
2018-11-30 07:09:00 +00:00
Andrew Rybchenko
e12a751b0d sfxge(4): update to current port mode terminology
>From Medford onwards, the newer constants enumerating
port modes should be used.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18276
2018-11-30 07:08:50 +00:00
Andrew Rybchenko
3c3b954225 sfxge(4): adjust PHY module info interface
Adjust data types in interface to permit the complete
module information buffer to be obtained in a single
call.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18275
2018-11-30 07:08:38 +00:00
Andrew Rybchenko
0bc522c2d6 sfxge(4): expose PHY module device address constants
Rearrange so the valid addresses are visible to the caller.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18274
2018-11-30 07:08:27 +00:00
Andrew Rybchenko
a10539aa18 sfxge(4): make last byte of module information available
Adjust bounds so the interface supports reading
the last available byte of data.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D18273
2018-11-30 07:08:16 +00:00
Andrew Rybchenko
1ad53cbf7e sfxge(4): add helper API to make Geneve filter spec
Submitted by:   Vijay Srivastava <vijays at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18272
2018-11-30 07:08:05 +00:00
Andrew Rybchenko
fe094a7cbc sfxge(4): fix MAC Tx stats for less or equal to 64 bytes
This statistic should include 64byte and smaller frames.
Fix EF10 calculation to match Siena code.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D18271
2018-11-30 07:07:54 +00:00
Andrew Rybchenko
3f3f5d85c5 sfxge(4): modify phy caps to indicate FEC request
The capability bits to request FEC modes are implicitly valid
when the corresponding FEC mode is a supported capability.
Drivers expect that it is only valid to advertise those
capabilities explicitly marked as supported. The capabilities
reported by firmware is modified with the implicit capabilities
to present the explicit model to drivers.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D18270
2018-11-30 07:07:43 +00:00