]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agoMFC: r361882:
Warner Losh [Wed, 9 Sep 2020 22:33:11 +0000 (22:33 +0000)]
MFC: r361882:

r361882 | imp | 2020-06-06 20:40:21 -0600 (Sat, 06 Jun 2020) | 2 lines

Mention nda where we mention nvd.

3 years agoMFC: r361868:
Warner Losh [Wed, 9 Sep 2020 22:30:43 +0000 (22:30 +0000)]
MFC: r361868:
r361868 | imp | 2020-06-06 00:49:06 -0600 (Sat, 06 Jun 2020) | 4 lines

Fix typo

Submitted by: Yuri Pankov

3 years agoMFC r361867:
Warner Losh [Wed, 9 Sep 2020 22:29:44 +0000 (22:29 +0000)]
MFC r361867:
r361867 | imp | 2020-06-06 00:21:20 -0600 (Sat, 06 Jun 2020) | 4 lines

Document all the sysctl values for the nda devices. Include some minimal
documentation on namespace support for nda devices. Fix a few typos
and formatting nits to apease igor.

3 years agoMFC r361673:
Warner Losh [Wed, 9 Sep 2020 22:24:09 +0000 (22:24 +0000)]
MFC r361673:
r361673 | imp | 2020-05-31 15:38:33 -0600 (Sun, 31 May 2020) | 14 lines

Correct the release date for 2.11BSD

2.11BSD was announced on March 14, 1991 in comp.bugs.2bsd by
Steven M. Schultz. The document has a 'revised January 1991'
date at the top.

Patch/1 in the official repo is dated March 31, 1991, and an identical copy of
it was posted to comp.bugs.2bsd on May 5, 1991. Patch 2 in 22 parts was likewise
posted May 18, 1991. This makes the Feb 1992 date too late. It's possible it's a
typo for Feb 1991 since that lines up with the announcement being 2 weeks
later. Without an extant copy of the 2.11 tape, however, it's hard to say for
sure. Go with the date we have the most independent, direct evidence for, which
is the announcement date.

3 years agoMFC r360993:
Warner Losh [Wed, 9 Sep 2020 22:22:38 +0000 (22:22 +0000)]
MFC r360993:
r360993 | imp | 2020-05-12 16:44:51 -0600 (Tue, 12 May 2020) | 6 lines

Refine the history of uname. It appeared in 4.4BSD. It was not in v7 unix. It
was one of the additions in PWB, and appeared in System III and later commercial
versions of Unix. The different args to uname weren't aded until System III. Add
a quick note to note the late entry into the BSD fork of Unix since PWB
otherwise implies a pre-fork date.

3 years agoMFC r365279:
Brooks Davis [Wed, 9 Sep 2020 21:57:55 +0000 (21:57 +0000)]
MFC r365279:

Remove risky compatability with old kernels

The badsys() handler for SIGSYS was added as a transtion aid for kernels
lacking sysctl() in 1993.  It is unsafe and unsound so remove it rather
than running the risk of a privilege-dropping system call being silently
omitted.

This partially reverts SCCSID 6.12 (Berkeley) 03/03/93 "add code to
change the system security level".

Reviewed by: mckusick, imp, kevans
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D26289

3 years agoMFC r365262:
Alan Somers [Wed, 9 Sep 2020 13:16:20 +0000 (13:16 +0000)]
MFC r365262:

Fix output of nfsstat -cE in json or xml mode

Due to a copy/paste error, the "getacl" field was duplicated, but only in
XML or JSON mode, not in txt mode.

Discussed with: rmacklem
Sponsored by: Axcient

3 years agoMFC 362123: Fix AES-CCM requests with an AAD size smaller than a single block.
John Baldwin [Tue, 8 Sep 2020 23:19:59 +0000 (23:19 +0000)]
MFC 362123: Fix AES-CCM requests with an AAD size smaller than a single block.

The amount to copy for the first block is the minimum of the size of
the AAD region or the remaining space in the first block.

3 years agoMFC 359900: Export a sysctl count of RX FIFO overrun events.
John Baldwin [Tue, 8 Sep 2020 22:50:24 +0000 (22:50 +0000)]
MFC 359900: Export a sysctl count of RX FIFO overrun events.

uart(4) backends currently detect RX FIFO overrun errors and report
them to the uart(4) core layer.  They are then reported to the generic
TTY layer which promptly ignores them.  As a result, there is
currently no good way to determine if a uart is experiencing RX FIFO
overruns.  One could add a generic per-tty counter, but there did not
appear to be a good way to export those.  Instead, add a sysctl under
the uart(4) sysctl tree to export the count of overruns.

3 years agoMFC 359899: Correct baud rate error calculation.
John Baldwin [Tue, 8 Sep 2020 22:19:06 +0000 (22:19 +0000)]
MFC 359899: Correct baud rate error calculation.

Shifting right by 1 is not the same as dividing by 2 for signed
values.  In particular, dividing a signed value by 2 gives the integer
ceiling of the (e.g. -5 / 2 == -2) whereas shifting right by 1 always
gives the floor (-5 >> 1 == -3).

An embedded board with a 25 Mhz base clock results in an error of
-30.5% when used with a baud rate of 115200.  Using division, this
truncates to -30% and is permitted.  Using the shift, this fails and
is rejected causing TIOCSETA requests to fail with EINVAL and breaking
getty(8).

Using division gives the same error range for both over and under baud
rates and also makes the code match the behavior documented in the
existing comment about supporting boards with 25 Mhz clocks.

3 years agoMFC 359467: Trim some duplicate EIO descriptions.
John Baldwin [Tue, 8 Sep 2020 20:53:44 +0000 (20:53 +0000)]
MFC 359467: Trim some duplicate EIO descriptions.

While here, drop an extra conjunction from the list of error
conditions for the remaining EIO description in symlink(2).

3 years agoMFC 359465: Document EINTEGRITY errors for many system calls.
John Baldwin [Tue, 8 Sep 2020 20:51:19 +0000 (20:51 +0000)]
MFC 359465: Document EINTEGRITY errors for many system calls.

EINTEGRITY was previously documented as a UFS-specific error for
mount(2).  This documents EINTEGRITY as a filesystem-independent error
that may be reported by the backing store of a filesystem.

While here, document EIO as a filesystem-independent error for both
mount(2) and posix_fadvise(2).  EIO was previously only documented for
UFS for mount(2).

3 years agoRevert r365471 as it is breaking with old gcc on various arches:
Dimitry Andric [Tue, 8 Sep 2020 20:28:39 +0000 (20:28 +0000)]
Revert r365471 as it is breaking with old gcc on various arches:

MFC r364753:

Add atomic and bswap functions to libcompiler_rt

There have been several mentions on our mailing lists about missing
atomic functions in our system libraries (e.g. __atomic_load_8 and
friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.

To address this, add implementations for the functions from compiler-rt
to the system compiler support libraries, e.g. libcompiler_rt.a and and
libgcc_s.so.

This also needs a small fixup in compiler-rt's atomic.c, to ensure that
32-bit mips can build correctly.

Bump __FreeBSD_version to make it easier for port maintainers to detect
when these functions were added.

PR: 230888
Differential Revision: https://reviews.freebsd.org/D26159

MFC r364782:

After r364753, there should be no need to suppress -Watomic-alignment
warnings anymore for compiler-rt's atomic.c. This occurred because the
IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
caused the compiler to emit a runtime call to __atomic_is_lock_free(),
and that triggers the warning.

3 years agoMFC r364753:
Dimitry Andric [Tue, 8 Sep 2020 20:02:08 +0000 (20:02 +0000)]
MFC r364753:

Add atomic and bswap functions to libcompiler_rt

There have been several mentions on our mailing lists about missing
atomic functions in our system libraries (e.g. __atomic_load_8 and
friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.

To address this, add implementations for the functions from compiler-rt
to the system compiler support libraries, e.g. libcompiler_rt.a and and
libgcc_s.so.

This also needs a small fixup in compiler-rt's atomic.c, to ensure that
32-bit mips can build correctly.

Bump __FreeBSD_version to make it easier for port maintainers to detect
when these functions were added.

PR: 230888
Differential Revision: https://reviews.freebsd.org/D26159

MFC r364782:

After r364753, there should be no need to suppress -Watomic-alignment
warnings anymore for compiler-rt's atomic.c. This occurred because the
IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
caused the compiler to emit a runtime call to __atomic_is_lock_free(),
and that triggers the warning.

3 years agoMFC 361764: Revise r361712 to disable tcpmd5.ko for 'options TCP_SIGNATURE'
John Baldwin [Tue, 8 Sep 2020 18:58:38 +0000 (18:58 +0000)]
MFC 361764: Revise r361712 to disable tcpmd5.ko for 'options TCP_SIGNATURE'

3 years agoUse kmod.opts.mk in sys/modules/tcp/Makefile to fix standalone builds.
John Baldwin [Tue, 8 Sep 2020 18:49:58 +0000 (18:49 +0000)]
Use kmod.opts.mk in sys/modules/tcp/Makefile to fix standalone builds.

This was included in the original commit to head that added use of
KERN_OPTS (r361638) but was left out of the MFC since kmod.opts.mk
hadn't been MFC'd at the time.  It has since been merged.

This is a direct commit to stable/11 and stable/12.

Reported by: Eugene Grosbein <eugen@grosbein.net>

3 years agoPartial MFC 357275: if_vlan grew a dependency on opt_inet6.h in r356993
John Baldwin [Tue, 8 Sep 2020 18:33:41 +0000 (18:33 +0000)]
Partial MFC 357275: if_vlan grew a dependency on opt_inet6.h in r356993

3 years agoMFC 361634: Add opt_ipsec.h to fix standalone builds after r361633.
John Baldwin [Tue, 8 Sep 2020 18:29:20 +0000 (18:29 +0000)]
MFC 361634: Add opt_ipsec.h to fix standalone builds after r361633.

3 years agoMFC 354970: Add a kmod.opts.mk.
John Baldwin [Tue, 8 Sep 2020 16:43:32 +0000 (16:43 +0000)]
MFC 354970: Add a kmod.opts.mk.

This Makefile sets KERN_OPTS.  This permits kernel module Makefiles to
use KERN_OPTS to control the value of variables such as SRCS that are
used by bsd.kmod.mk for KERN_OPTS values that honor WITH/WITHOUT
options for standalone builds.

3 years agoMFC r365043-r365046:
Mark Johnston [Tue, 8 Sep 2020 12:38:34 +0000 (12:38 +0000)]
MFC r365043-r365046:
pw: Coverity fixes.

3 years agoMFC r365048:
Mark Johnston [Tue, 8 Sep 2020 12:37:46 +0000 (12:37 +0000)]
MFC r365048:
Tighten frame pointer checking in DTrace's amd64 stack unwinder.

3 years agoMFC r365047:
Mark Johnston [Tue, 8 Sep 2020 12:37:18 +0000 (12:37 +0000)]
MFC r365047:
Correct the D definition for EINTEGRITY.

3 years agoMFC r364369:
Robert Wing [Tue, 8 Sep 2020 07:37:45 +0000 (07:37 +0000)]
MFC r364369:

bectl(8): Fix output of 'bectl list' for the 'Mountpoint' column.

PR: 241064

3 years agoMFC 364339
Peter Grehan [Tue, 8 Sep 2020 03:55:49 +0000 (03:55 +0000)]
MFC 364339
   Allow guest device MMIO access from bootmem memory segments.

   Differential Revision: https://reviews.freebsd.org/D25955

3 years agoMFC r364995:
Mark Johnston [Mon, 7 Sep 2020 23:22:16 +0000 (23:22 +0000)]
MFC r364995:
ggated(8): Avoid doubly opening the requested disk device.

PR: 132845

3 years agoMFC r364993:
Mark Johnston [Mon, 7 Sep 2020 23:21:53 +0000 (23:21 +0000)]
MFC r364993:
rtwn(4): Add support for the Belkin N300.

PR: 249034

3 years agoMFC r364982: ipv6: quit dropping packets looping back on p2p interfaces
Kyle Evans [Mon, 7 Sep 2020 23:20:02 +0000 (23:20 +0000)]
MFC r364982: ipv6: quit dropping packets looping back on p2p interfaces

PR: 247718

3 years agoMFC r365429:
Dimitry Andric [Mon, 7 Sep 2020 20:17:13 +0000 (20:17 +0000)]
MFC r365429:

Merge commit 47b0262d3 from llvm git (by me):

  Add <stdarg.h> include to kmp_os.h, to get the va_list type, required
  after cde8f4c164a2. Sort system includes, while here.

The original merged commit works fine by itself on head, but fails to
compile on stable branches because stdarg.h is not implicitly pulled in.

PR: 248864

3 years agoMFC r364732:
Dimitry Andric [Mon, 7 Sep 2020 19:35:30 +0000 (19:35 +0000)]
MFC r364732:

Merge commit cde8f4c16 from llvm git (by me):

  Move special va_list handling to kmp_os.h

  Instead of copying and pasting the same #ifdef expressions in
  multiple places, define a type and a pair of macros in kmp_os.h, to
  handle whether va_list is pointer-like or not:

  * kmp_va_list is the type to use for __kmp_fork_call()
  * kmp_va_deref() dereferences a va_list, if necessary
  * kmp_va_addr_of() takes the address of a va_list, if necessary

  Also add FreeBSD to the list of OSes that has a non pointer-like
  va_list. This can now be easily extended to other OSes too.

  Reviewed By: AndreyChurbanov

  Differential Revision: https://reviews.llvm.org/D86397

This should enable building of LLVM's OpenMP on AArch64. Addition to
share/mk will follow in a subsequent commit.

PR: 248864

MFC r364733:

After r364732, we can now enable MK_OPENMP for aarch64 by default.

PR: 248864

3 years agoMFC r364081:
Dimitry Andric [Mon, 7 Sep 2020 19:29:06 +0000 (19:29 +0000)]
MFC r364081:

Follow-up to r358851 (llvm-project 10.0.0-rc3 import), where I added
subdirectories for compiler-rt's internal fuzzer, profile and xray
headers, but forgot to add installing those headers themselves.

3 years agoRevert r364939 and add a stable/12 approach for populating the ESP
Oleksandr Tymoshenko [Mon, 7 Sep 2020 18:47:25 +0000 (18:47 +0000)]
Revert r364939 and add a stable/12 approach for populating the ESP

make_esp_file is not available in stable/12 so r364939 broke VM-related targets.
Revert offending commit and use pre-r342283 approach to populate ESP partition.

PR: 249168
Tested on: VirtualBox, Hyper-V v2 VM

3 years agoTPC rack: use #error rather than syntax error
Ed Maste [Mon, 7 Sep 2020 17:31:58 +0000 (17:31 +0000)]
TPC rack: use #error rather than syntax error

Until the changes to make this a proper dependency are merged, avoid using
a syntax error for a user-facing error report.

PR: 249037
Suggested by: avg

3 years agoMFC r364684:
Marc Fonvieille [Mon, 7 Sep 2020 16:11:49 +0000 (16:11 +0000)]
MFC r364684:

s/redundacy/redundancy

3 years agoMFC r364682:
Marc Fonvieille [Mon, 7 Sep 2020 16:09:37 +0000 (16:09 +0000)]
MFC r364682:

Add missing Korean doc package entry, remove non-existent Serbian doc
package entry.

Approved by: re (gjb)

3 years agoMFC r365328: fortune(6): Grammar fix for a hint on searching ports
Gordon Bergling [Mon, 7 Sep 2020 14:40:33 +0000 (14:40 +0000)]
MFC r365328: fortune(6): Grammar fix for a hint on searching ports

PR: 249078
Submitted by: PauAmma <pauamma at gundo dot com>
Reported by: PauAmma <pauamma at gundo dot com>

3 years agoMFC r365008: vtnet(4): improve the wording
Gordon Bergling [Mon, 7 Sep 2020 14:38:38 +0000 (14:38 +0000)]
MFC r365008: vtnet(4): improve the wording

PR: 247936
Submitted by: PauAmma <pauamma at gundo dot com>
Reported by: PauAmma <pauamma at gundo dot com>
Differential Revision: https://reviews.freebsd.org/D26244

3 years agoMFC r364466:
Bjoern A. Zeeb [Mon, 7 Sep 2020 14:22:27 +0000 (14:22 +0000)]
MFC r364466:

  After the clang/llvm version 11 import LLD_VERSION is no longer used
  upstream so Version.inc now only defines LLD_VERSION_STRING.

  This breaks the WANT_LINKER_VERSION magic and might lead to us building
  more than needed (e.g., for croos-tools).

  Change the awk script to parse LLD_VERSION_STRING instead of LLD_VERSION,
  which not only unbreaks the current situation but should also be backwards
  compatible as dim points out.

  Merging this before r364284 will ensure that stable/12 won't break.

  PR: 248818
  Reviewed by: emaste, dim (seems right and the way to go)

3 years agoMFC r365003:
Konstantin Belousov [Mon, 7 Sep 2020 10:37:44 +0000 (10:37 +0000)]
MFC r365003:
mlx5 sriov: Add controls for VFs to set port/node GUIDs.

3 years agoMFC r365002:
Konstantin Belousov [Mon, 7 Sep 2020 10:36:53 +0000 (10:36 +0000)]
MFC r365002:
mlx5 sriov: add error message for failed MAC programming on VF.

3 years agoMFC r365001:
Konstantin Belousov [Mon, 7 Sep 2020 10:36:07 +0000 (10:36 +0000)]
MFC r365001:
mlx5en: Implement SIOCGIFDOWNREASON.

3 years agoMFC r365000:
Konstantin Belousov [Mon, 7 Sep 2020 10:35:22 +0000 (10:35 +0000)]
MFC r365000:
mlx5_core: add mlx5_query_pddr().

3 years agoMFC r364999:
Konstantin Belousov [Mon, 7 Sep 2020 10:34:22 +0000 (10:34 +0000)]
MFC r364999:
mlx5_core: Import PDDR register definitions

3 years agoMFC r364149: aw_cir: in pulse encoding actual length is one greater than value
Andriy Gapon [Mon, 7 Sep 2020 06:22:30 +0000 (06:22 +0000)]
MFC r364149: aw_cir: in pulse encoding actual length is one greater than value

3 years agoMFC r364148: aw_cir: lower activation threshold to support NECx protocol
Andriy Gapon [Mon, 7 Sep 2020 06:21:01 +0000 (06:21 +0000)]
MFC r364148: aw_cir: lower activation threshold to support NECx protocol

3 years agoMFC r364145: gpiokeys: add evdev support
Andriy Gapon [Mon, 7 Sep 2020 06:14:42 +0000 (06:14 +0000)]
MFC r364145: gpiokeys: add evdev support

Only linux,code is supported as it maps 1:1 to evdev key codes.
No reverse mapping for freebsd,code yet.

3 years agoMFC r364098 by lwhsu:
Oleksandr Tymoshenko [Sun, 6 Sep 2020 20:03:13 +0000 (20:03 +0000)]
MFC r364098 by lwhsu:

Fix armv{6,7} build after r364088

Sponsored by: The FreeBSD Foundation

3 years agoMFC r362736, r364088
Oleksandr Tymoshenko [Sun, 6 Sep 2020 19:03:19 +0000 (19:03 +0000)]
MFC r362736, r364088

r362736:
Configure rx_delay/tx_delay values for RK3399/RK3328 GMAC

For 1000Mb mode to work reliably TX/RX delays need to be configured
between the TX/RX clock and the respective signals on the PHY
to compensate for differing trace lengths on the PCB.

Reviewed by: manu

r364088:
Improve Rockchip's integration of if_dwc

- Do not rely on U-Boot for clocks configuration, enable and set frequencies
    in the driver's attach method.
- Adjust MAC settings according to detected linespeed on RK3399 and RK3328.
- Add support for RMII PHY mode on RK3328.

Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D26006

3 years agoMFC r360467, r362399, r362405, r362415
Oleksandr Tymoshenko [Sun, 6 Sep 2020 18:48:50 +0000 (18:48 +0000)]
MFC r360467, r362399, r362405, r362415

r360467 by mmel:
Fix style(9). Strip write only variables.
Not a functional change.

r362399 by mmel:
Use naming nomenclature used in DesignWare TRM.
Use naming nomenclature used in DesignWare TRM.
This driver was written by using Altera (now Intel) documentation for Arria
FPGA manual. Unfortunately this manual used very different (and in some cases
opposite naming) for registers and descriptor fields. Unfortunately,
this makes future expansion extremely hard.

Should not been functional change.

r362405 by mmel:
Finish renaming in if_dwc.
By using DWC TRM terminology, normal descriptor format should be named
extended and alternate descriptor format should be named normal.

Should not been functional change.

r362415 by mmel:
Improve if_dwc:
 - refactorize packet receive path. Make sure that we don't leak mbufs
   and/or that we don't create holes in RX descriptor ring
 - slightly simplify handling with TX descriptors

3 years agoMFC r353843 by glebius:
Oleksandr Tymoshenko [Sun, 6 Sep 2020 18:27:36 +0000 (18:27 +0000)]
MFC r353843 by glebius:

Convert to if_foreach_llmaddr() KPI.

3 years agoMFC r350418 by br:
Oleksandr Tymoshenko [Sun, 6 Sep 2020 18:25:50 +0000 (18:25 +0000)]
MFC r350418 by br:

Add glue driver for Altera SOCFPGA Ethernet MAC (EMAC) found in
Terasic DE10-Pro (an Intel Stratix 10 GX/SX FPGA Development Kit).

The Altera EMAC is an instance of Synopsys DesignWare Gigabit MAC.

This driver sets correct clock range for MDIO interface on Intel Stratix 10
platform.

This is required due to lack of support for clock manager device for
this platform that could tell us the clock frequency value for ethernet
clock domain.

Sponsored by: DARPA, AFRL

3 years agoMFC r353419:
Oleksandr Tymoshenko [Sun, 6 Sep 2020 18:20:25 +0000 (18:20 +0000)]
MFC r353419:

Provide new KPI for network drivers to access lists of interface
addresses.  The KPI doesn't reveal neither how addresses are stored,
how the access to them is synchronized, neither reveal struct ifaddr
and struct ifmaddr.

Reviewed by: gallatin, erj, hselasky, philip, stevek
Differential Revision: https://reviews.freebsd.org/D21943

3 years agoMFC r364964: LinuxKPI: Implement ksize() function.
Vladimir Kondratyev [Sun, 6 Sep 2020 17:40:35 +0000 (17:40 +0000)]
MFC r364964: LinuxKPI: Implement ksize() function.

In Linux, ksize() gets the actual amount of memory allocated for a given
object. This commit adds malloc_usable_size() to FreeBSD KPI which does
the same. It also maps LinuxKPI ksize() to newly created function.

ksize() function is used by drm-kmod.

Reviewed by: hselasky, kib
Differential Revision: https://reviews.freebsd.org/D26215

3 years agoMFC: Merge ENA v2.2.0 driver
Marcin Wojtas [Sun, 6 Sep 2020 14:41:35 +0000 (14:41 +0000)]
MFC: Merge ENA v2.2.0 driver

r361530 Update ENA driver version to v2.2.0
r361529 Refactor ena_tx_map_mbuf() function
r361528 Fix double-free bug within ena_detach()
r361527 Allow disabling meta caching for ENA Tx path
r361526 Create ENA IO queues with optional backoff
r361525 Add sysctl node for ENA IO queues number adjustment
r361524 Fix assumptions about number of IO queues in the ENA
r361523 Rework ENA Tx buffer ring size reconfiguration
r361521 Rework ENA Rx queue size configuration
r361518 Improve indentation in ena_up() and ena_down()
r361517 Expose argument names for non static ENA driver functions
r361516 Use single global lock in the ENA driver
r361515 Add trigger reset function in the ENA driver
r361514 Provide ENA driver version in a sysctl node
r361513 Remove unused argument from static function in ena.c
r361512 Enable Tx drops reporting in the ENA driver
r361511 Adjust ENA driver to the new HAL
r358289 Rework and simplify Tx DMA mapping in ENA

Obtained from: Semihalf
Sponsored by:  Amazon, Inc.

3 years agoMFC: ENA netmap support and bug fixes
Marcin Wojtas [Sun, 6 Sep 2020 14:23:31 +0000 (14:23 +0000)]
MFC: ENA netmap support and bug fixes

r363638 Fix ENA build when integrated into kernel
r354242 Make valdiate_rx_req_id static inline because it uses other static
r354225 Update ENA version to v2.1.0
r354224 Add support for ENA NETMAP partial initialization
r354223 Add support for ENA NETMAP Tx
r354222 Add support for ENA NETMAP Rx
r354221 Introduce NETMAP support in ENA
r354220 Split Rx/Tx from initialization code in ENA driver
r354219 Fix ENA keep-alive timeout due to prolonged reset
r354218 Add WC support for arm64 in the ENA driver

Obtained from: Semihalf
Sponsored by:  Amazon, Inc.

3 years agoMFC: Merge ENA v2.0.0 driver
Marcin Wojtas [Sun, 6 Sep 2020 14:13:51 +0000 (14:13 +0000)]
MFC: Merge ENA v2.0.0 driver

r348416 Update ENA version to v2.0.0
r348414 Fix ENA manual issues
r348413 Improve ENA reset handling
r348412 Fix NULL pointer dereference in ena_up()
r348411 Unify new line characters in the ENA driver
r348410 Fix Tx offloads for fragmented pkt headers in ENA
r348409 Split ENA reset routine into restore and destroy stages
r348408 Use bitfield for storing global ENA device states
r348407 Fix error handling when ENA reset fails
r348406 Fill bdf field of the host_info structure in ENA
r348405 Add additional doorbells on ENA Tx path
r348404 Limit maximum size of Rx refill threshold in ENA
r348403 Add support for the LLQv2 and WC in ENA
r348402 Lock optimization in ENA
r348401 Add tuneable drbr ring size and hw queues depth for ENA
r348400 Fix error in validate_tx_req_id() in ENA
r348399 Change attach order to prevent crash upon failure in ENA
r348398 Change order of ifp release on ENA detach
r348397 Check for number of MSI-x upon partial allocation in ENA
r348396 Set error value when allocation of IO irq fails in ENA
r348395 Set vaddr and paddr as NULL when DMA alloc fails in ENA
r348394 Fix DMA synchronization in the ENA driver Tx and Rx paths
r348393 Check for missing MSI-x and Tx completions in ENA
r348392 Fill number of CPUs field on ENA host_info structure
r348391 Print ENA Tx error conditionally
r348390 Trigger reset in ENA if there are too many Rx descriptors
r348389 Remove RSS support in ENA
r348388 Add notification AENQ handler for ENA
r348387 Print information when ENA admin error occurs
r348386 Do not specify active media type in ENA
r348385 Adjust ENA driver to the new ena-com

Obtained from: Semihalf
Sponsored by:  Amazon, Inc.

3 years agoMFC: r364737, r365264 and r365287
Niclas Zeising [Sun, 6 Sep 2020 11:29:06 +0000 (11:29 +0000)]
MFC: r364737, r365264 and r365287

Together, these three revisions improve the drm2 (aka legacy drm or
drm-legacy) drivers to point towards graphics/drm-kmod where relevant, and
to remove references to graphics/drm-legacy-kmd as that is being deprecated.
Since part of the drm2 drivers are still used on arm, arm is currently
excluded from the deprecation message.

Approved by: imp, manu (implicit, MFC)

3 years agodrm: Update deprecation message
Niclas Zeising [Sun, 6 Sep 2020 11:23:58 +0000 (11:23 +0000)]
drm: Update deprecation message

Update the deprecation message in the drm1 (aka legacy drm or drm-legacy)
drivers to not point towards the drm-legacy-kmod port, as that is being
deprecated.

This is a direct commit to stable/12 since the drm1 code has been removed
from 13 already.

Reviewed by: imp
Approved by: imp
Differential Revision: https://reviews.freebsd.org/D26175

3 years agoMFC r364973:
Marko Zec [Sun, 6 Sep 2020 10:18:59 +0000 (10:18 +0000)]
MFC r364973:

Driver for 4x10Gb Ethernet reference NIC FPGA design for NetFPGA SUME
development board.

Submitted by: Denis Salopek <denis.salopek AT fer.hr>
Reviewed by: zec, bz (src); rgrimes, bcr (manpages)
Sponsored by: Google Summer of Code 2020
Differential Revision: https://reviews.freebsd.org/D26074

3 years agoMFC r363095:
Michael Reifenberger [Sat, 5 Sep 2020 17:02:48 +0000 (17:02 +0000)]
MFC r363095:
Handle device removal and removal+add cases to fix infinity rate.

PR: 219829
Submitted by: ota@j.email.ne.jp
Reported by: rezo@live.cn
Differential Revision: https://reviews.freebsd.org/D25226

3 years agoMFC r361967 (by mjg), r362910 (by mjg), r364495:
Konstantin Belousov [Sat, 5 Sep 2020 10:12:06 +0000 (10:12 +0000)]
MFC r361967 (by mjg), r362910 (by mjg), r364495:
Fix several issues with process group orphanage.

3 years agoMFC r365248: caroot: properly remove old distrusted roots
Kyle Evans [Sat, 5 Sep 2020 02:22:07 +0000 (02:22 +0000)]
MFC r365248: caroot: properly remove old distrusted roots

The proper procedure was not followed in r364943; all of these that were
deleted should have instead been moved over to the blacklist so that certctl
can DTRT.

Users must still `certctl rehash` after this, but this should generally be
done by one of mergemaster/etcupdate/freebsd-update/pkgbase already; note
that freebsd-update doesn't come into play for this particular update, as
these have not yet made it into a release.

Future work (after svn -> git) will likely change the script that updatecert
invokes to facilitate the process, rather than trusting that kevans or
whomever updates in the future will remember.

3 years agoMFC r360035-r360037: Split XDR off, minimize ZFS dependency
Kyle Evans [Sat, 5 Sep 2020 02:16:10 +0000 (02:16 +0000)]
MFC r360035-r360037: Split XDR off, minimize ZFS dependency

__FreeBSD_version bumped to indicate the change.

r360035:
Move M_RPC malloc type into XDR.  Both RPC and XDR libraries use
this type, but since RPC depends on XDR (not vice versa) we need
it defined in XDR to make the module loadable without RPC.

r360036:
Split XDR into separate kernel module.  Make krpc depend on xdr.

r360037:
Make ZFS depend on xdr.ko only.  It doesn't need kernel RPC.

3 years agoMFC r365231: ixl(4): Add support for X710-T*L devices
Eric Joyner [Fri, 4 Sep 2020 21:21:23 +0000 (21:21 +0000)]
MFC r365231: ixl(4): Add support for X710-T*L devices

PR: 249058
Sponsored by: Intel Corporation

3 years agoMFC r365060:
Mark Johnston [Fri, 4 Sep 2020 13:17:55 +0000 (13:17 +0000)]
MFC r365060:
qlxgb: Initialize if_mtu before setting max_frame_size.

PR: 249050

3 years agoMFC: r346593
Marcin Wojtas [Fri, 4 Sep 2020 11:22:18 +0000 (11:22 +0000)]
MFC: r346593

Add barrier in buf ring peek function to prevent race in ARM and ARM64.

Obtained from: Semihalf
Sponsored by: Amazon, Inc.

3 years agoMFC r363122:
Oleksandr Tymoshenko [Fri, 4 Sep 2020 00:25:02 +0000 (00:25 +0000)]
MFC r363122:

 Assigned clocks: fix off-by-one bug, don't leak allocated memory.

 MFC after: 1 week

3 years agoMFC r364970:
Jamie Gritton [Fri, 4 Sep 2020 00:24:31 +0000 (00:24 +0000)]
MFC r364970:

    Add __BEGIN_DECLS to jail.h to keep C++ happy.

PR: 238928
Reported by: yuri@

3 years agoMFC r364850:
Jamie Gritton [Fri, 4 Sep 2020 00:22:24 +0000 (00:22 +0000)]
MFC r364850:

    Don't allow jail.conf variables to have the same names as jail parameters.
    It was already not allowed in many cases, but crashed instead of giving an
    error.

PR: 248444

3 years agoMFC r364193:
Mitchell Horne [Thu, 3 Sep 2020 23:17:25 +0000 (23:17 +0000)]
MFC r364193:

Enable interrupts while handling traps

3 years agoMFC r364872:
Mark Johnston [Thu, 3 Sep 2020 13:57:20 +0000 (13:57 +0000)]
MFC r364872:
fdc(4): Handle errors from fdc_in() properly.

PR: 248940

3 years agoMFC r364876:
Mark Johnston [Thu, 3 Sep 2020 13:57:05 +0000 (13:57 +0000)]
MFC r364876:
Fix writing of the final block of encrypted, compressed kernel dumps.

3 years agoMFC r364871:
Mark Johnston [Thu, 3 Sep 2020 13:56:47 +0000 (13:56 +0000)]
MFC r364871:
asmc(4): Handle errors from asmc_key_read() properly.

PR: 248939

3 years agoMFC r364873:
Mark Johnston [Thu, 3 Sep 2020 13:56:30 +0000 (13:56 +0000)]
MFC r364873:
snd_ich(4): Handle errors from ich_init() properly during resume.

PR: 248941

3 years agoMFC r364449, r365004: ls(1): Update POSIX conformance
Gordon Bergling [Thu, 3 Sep 2020 13:22:09 +0000 (13:22 +0000)]
MFC r364449, r365004: ls(1): Update POSIX conformance

- Update the POSIX references for non-standard ls(1) options
- Simplify the STANDARDS section by mention both supported POSIX versions

Verified by checking [1].

[1] https://pubs.opengroup.org/onlinepubs/9699919799.2016edition/toc.htm

PR: 140435 (based on)
Submitted by: Dan Lukes <dan at obluda dot cz>
Reviewed by: hrs, bcr
Approved by: hrs, bcr
Differential Revision: https://reviews.freebsd.org/D26210

3 years agoMFC r364354: TCP Cubic: recalculate cwnd for every ACK.
Richard Scheffenegger [Thu, 3 Sep 2020 09:09:44 +0000 (09:09 +0000)]
MFC r364354: TCP Cubic: recalculate cwnd for every ACK.

Since cubic calculates cwnd based on absolute
time, retaining RFC3465 (ABC) once-per-window updates
can lead to dramatic changes of cwnd in the convex
region. Updating cwnd for each incoming ack minimizes
this delta, preventing unintentional line-rate bursts.

Reviewed by: chengc_netapp.com, tuexen (mentor)
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D26060

3 years agoMFC r364197: TCP Cubic: Have Fast Convergence Heuristic work for ECN, and align conca...
Richard Scheffenegger [Thu, 3 Sep 2020 08:45:21 +0000 (08:45 +0000)]
MFC r364197: TCP Cubic: Have Fast Convergence Heuristic work for ECN, and align concave region

The Cubic concave region was not aligned nicely for the very first exit from
slow start, where a 50% cwnd reduction is done instead of the normal 30%.

This addresses an issue, where a short line-rate burst could result from that
sudden jump of cwnd.

In addition, the Fast Convergence Heuristic has been expanded to work also
with ECN induced congestion response.

Submitted by: chengc_netapp.com
Reported by: chengc_netapp.com
Reviewed by: tuexen (mentor), rgrimes (mentor)
Approved by: tuexen (mentor), rgrimes (mentor)
MFC after: 3 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D25976

3 years agoMFC r364196: TCP Cubic: After leaving slowstart fix unintended cwnd jump.
Richard Scheffenegger [Thu, 3 Sep 2020 08:41:38 +0000 (08:41 +0000)]
MFC r364196: TCP Cubic: After leaving slowstart fix unintended cwnd jump.

Initializing K to zero in D23655 introduced a miscalculation,
where cwnd would suddenly jump to cwnd_max instead of gradually
increasing, after leaving slow-start.

Properly calculating K instead of resetting it to zero resolves
this issue. Also making sure, that cwnd is recalculated at the
earliest opportunity once slow-start is over.

Reported by: chengc_netapp.com
Reviewed by: chengc_netapp.com, tuexen (mentor), rgrimes (mentor)
Approved by: tuexen (mentor), rgrimes (mentor)
MFC after: 3 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D25746

3 years agoMFC r364195: Improve SACK support code for RFC6675 and PRR
Richard Scheffenegger [Thu, 3 Sep 2020 08:38:04 +0000 (08:38 +0000)]
MFC r364195: Improve SACK support code for RFC6675 and PRR

Adding proper accounting of sacked_bytes and (per-ACK)
delivered data to the SACK scoreboard. This will
allow more aspects of RFC6675 to be implemented as well
as Proportional Rate Reduction (RFC6937).

Prior to this change, the pipe calculation controlled with
net.inet.tcp.rfc6675_pipe was also susceptible to incorrect
results when more than 3 (or 4) holes in the sequence space
were present, which can no longer all fit into a single
ACK's SACK option.

Reviewed by: kbowling, rgrimes (mentor)
Approved by: rgrimes (blanket)
MFC after: 3 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D18624

3 years agoMFC 361638,361712: Only build ipsec modules for kernels with IPSEC_SUPPORT.
John Baldwin [Wed, 2 Sep 2020 21:36:55 +0000 (21:36 +0000)]
MFC 361638,361712: Only build ipsec modules for kernels with IPSEC_SUPPORT.

361638:
Only build ipsec modules if the kernel includes IPSEC_SUPPORT.

Honoring the kernel-supplied opt_ipsec.h in r361632 causes builds of
ipsec modules to fail if the kernel doesn't include IPSEC_SUPPORT.
However, the module can never be loaded into such a kernel, so only
build the modules if the kernel includes IPSEC_SUPPORT.

361712: (kevans)
modules: don't build ipsec/tcpmd5 if the kernel is configured for IPSEC

IPSEC_SUPPORT can currently only cope with either IPSEC || IPSEC_SUPPORT,
not both. Refrain from building if IPSEC is set, as the resulting module
won't be able to load anyways if it's built into the kernel.

KERN_OPTS is safe here; for tied modules, it will reflect the kernel
configuration. For untied modules, it will defer to whatever is set in
^/sys/conf/config.mk, which doesn't set IPSEC for modules. The latter
situation has some risk to it for uncommon scenarios, but such is the life
of untied kernel modules.

3 years agoMFC 361633: Consistently include opt_ipsec.h for consumers of <netipsec/ipsec.h>.
John Baldwin [Wed, 2 Sep 2020 20:36:33 +0000 (20:36 +0000)]
MFC 361633: Consistently include opt_ipsec.h for consumers of <netipsec/ipsec.h>.

This fixes ipsec.ko to include all of IPSEC_DEBUG.

3 years agoMFC 361632: Honor opt_ipsec.h from kernel builds.
John Baldwin [Wed, 2 Sep 2020 19:02:48 +0000 (19:02 +0000)]
MFC 361632: Honor opt_ipsec.h from kernel builds.

To make this simpler, set the default contents of opt_ipsec.h
for standalone modules in sys/conf/config.mk.

3 years agoMFC r364790: date.1: note possibly surprising behaviour of -j -f
Ed Maste [Wed, 2 Sep 2020 17:46:56 +0000 (17:46 +0000)]
MFC r364790: date.1: note possibly surprising behaviour of -j -f

PR: 248918

3 years agoMFC r364758:
Hans Petter Selasky [Wed, 2 Sep 2020 10:16:35 +0000 (10:16 +0000)]
MFC r364758:
Add mlx5en(4) to the list of supported netdump network drivers.

Sponsored by: Mellanox Technologies

3 years agoMFC r364374:
Hans Petter Selasky [Wed, 2 Sep 2020 10:13:15 +0000 (10:13 +0000)]
MFC r364374:
Print current buffer latency in dmesg for the USB audio driver and not just
the maximum.

Sponsored by: Mellanox Technologies

3 years agoMFC r364347:
Hans Petter Selasky [Wed, 2 Sep 2020 10:10:28 +0000 (10:10 +0000)]
MFC r364347:
Check the XHCI endpoint state before issuing XHCI endpoint commands.

Differential Revision: https://reviews.freebsd.org/D26064
Reviewed by: kp@ and bz@
Sponsored by: Mellanox Technologies

3 years agoMFC r364943: carrot: update bundle
Kyle Evans [Wed, 2 Sep 2020 01:35:45 +0000 (01:35 +0000)]
MFC r364943: carrot: update bundle

Stats:
- Seven (7) removed
- Four (4) added

3 years agor364770
Vincenzo Maffione [Tue, 1 Sep 2020 20:58:23 +0000 (20:58 +0000)]
r364770

iflib: netmap: publish all the receive buffer

At initialization time, the netmap RX refill function used to
prepare the NIC RX ring with N-1 buffers rather than N (with
N equal to the number of descriptors in the NIC RX ring).
This is not how netmap is supposed to work, as it would keep
kring->nr_hwcur not in sync with the NIC "next index to refill"
(i.e., fl->ifl_pidx). Instead we prepare N buffers, although we
still publish (with isc_rxd_flush()) only the first N-1 buffers,
to avoid the NIC producer pointer to overrun the NIC consumer
pointer (for NICs where this is a real issue, e.g. Intel ones).

3 years agoMFC r364655
Vincenzo Maffione [Tue, 1 Sep 2020 20:50:16 +0000 (20:50 +0000)]
MFC r364655

iflib: fix isc_rxd_flush call in netmap_fl_refill()

The semantic of the pidx argument of isc_rxd_flush() is the
last valid index of in the free list, rather than the next
index to be published. However, netmap was still using the
old convention. While there, also refactor the netmap_fl_refill()
to simplify a little bit and add an assertion.

3 years agoMFC r364165
Vincenzo Maffione [Tue, 1 Sep 2020 20:47:59 +0000 (20:47 +0000)]
MFC r364165

iflib: netmap: improve rxsync to support IFLIB_HAS_RXCQ

For drivers with IFLIB_HAS_RXCQ set, there is a separate completion
queue. In this case, the netmap rxsync routine needs to update
rxq->ifr_cq_cidx in the same way it is updated by iflib_rxeof().
This improves the situation for vmx(4) and bnxt(4) drivers, which
use iflib and have the IFLIB_HAS_RXCQ bit set.

PR:     248494

3 years agoMFC r364164
Vincenzo Maffione [Tue, 1 Sep 2020 20:45:33 +0000 (20:45 +0000)]
MFC r364164

iflib: refactor netmap_fl_refill and fix off-by-one issue

First, fix the initialization of the fl->ifl_rxd_idxs array,
which was affected by an off-by-one bug.
Once there, refactor the function to use better names for
local variables, optimize the variable assignments, and
merge the bus_dmamap_sync() inner loop with the outer one.

PR:     248494

3 years agoMFC r364018:
Bjoern A. Zeeb [Tue, 1 Sep 2020 19:54:43 +0000 (19:54 +0000)]
MFC r364018:

  IPV6_PKTINFO support for v4-mapped IPv6 sockets

  When using v4-mapped IPv6 sockets with IPV6_PKTINFO we do not
  respect the given v4-mapped src address on the IPv4 socket.
  Implement the needed functionality. This allows single-socket
  UDP applications (such as OpenVPN) to work better on FreeBSD.

  Requested by: Gert Doering (gert greenie.net), pfsense
  Tested by: Gert Doering (gert greenie.net)

3 years agoMFC r364779:
Mark Johnston [Tue, 1 Sep 2020 13:58:17 +0000 (13:58 +0000)]
MFC r364779:
sdhci(4): Recognize the Texas Instruments PCIxx12 card reader.

PR: 248650

3 years agoMFC r363305:
Edward Tomasz Napierala [Tue, 1 Sep 2020 12:11:59 +0000 (12:11 +0000)]
MFC r363305:

Regen after r363304.

Sponsored by: The FreeBSD Foundation

3 years agoMFC r363304:
Edward Tomasz Napierala [Tue, 1 Sep 2020 12:09:13 +0000 (12:09 +0000)]
MFC r363304:

Add a trivial linux(4) splice(2) implementation, which simply
returns EINVAL.  Fixes grep (grep-3.1-2build1).

PR: 218699
Sponsored by: The FreeBSD Foundation

3 years agoMFC r364994: dhclient: improve error handling parsing option 119
Ed Maste [Mon, 31 Aug 2020 21:28:09 +0000 (21:28 +0000)]
MFC r364994: dhclient: improve error handling parsing option 119

Reported by: Shlomi Oberman, JSOF
Submitted by: delphij
Reviewed by: markj
Tested by: markj

3 years agoRevert r364987, r364988.
Mark Johnston [Mon, 31 Aug 2020 19:59:05 +0000 (19:59 +0000)]
Revert r364987, r364988.

The removal of the kernel_map symbol breaks at least one out-of-tree module,
the nvidia binary driver.  Revert the removal for now to maintain KBI
compatibility.

Reported by: np

3 years agoStop accounting for MAX_KMAP when allocating UMA boot pages.
Mark Johnston [Mon, 31 Aug 2020 14:47:23 +0000 (14:47 +0000)]
Stop accounting for MAX_KMAP when allocating UMA boot pages.

With r364987 kernel maps are allocated statically.  In head, a different
mechanism is used to bootstrap UMA.

This is a direct commit to stable/12.

Reported by: Jenkins

3 years agoMFC r364302, r364306:
Mark Johnston [Mon, 31 Aug 2020 14:23:41 +0000 (14:23 +0000)]
MFC r364302, r364306:
Remove the VM map zone.

3 years agoIn 13-CURRENT, the linux rc script uses "nocover" mount option to avoid
Edward Tomasz Napierala [Mon, 31 Aug 2020 12:14:20 +0000 (12:14 +0000)]
In 13-CURRENT, the linux rc script uses "nocover" mount option to avoid
mounting required filesystems twice.  However, this option hasn't been MFC'd.
Implement its functionality in a different way, by stating the mount point.

Submitted by: sigsys@gmail.com
Differential Revision: https://reviews.freebsd.org/D26217

3 years agoMFC of 364895
Kirk McKusick [Mon, 31 Aug 2020 05:25:13 +0000 (05:25 +0000)]
MFC of 364895

Comment on when and why pathnames are deleted from the name cache.