]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agoPass the syscall number to capsicum permission-denied signals
David Chisnall [Sat, 10 Jul 2021 16:19:52 +0000 (17:19 +0100)]
Pass the syscall number to capsicum permission-denied signals

The syscall number is stored in the same register as the syscall return
on amd64 (and possibly other architectures) and so it is impossible to
recover in the signal handler after the call has returned.  This small
tweak delivers it in the `si_value` field of the signal, which is
sufficient to catch capability violations and emulate them with a call
to a more-privileged process in the signal handler.

This reapplies 3a522ba1bc852c3d4660a4fa32e4a94999d09a47 with a fix for
the static assertion failure on i386.

Approved by: markj (mentor)

Reviewed by: kib, bcr (manpages)

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

2 years agoMerge llvm-project 12.0.1 release
Dimitry Andric [Fri, 16 Jul 2021 16:29:42 +0000 (18:29 +0200)]
Merge llvm-project 12.0.1 release

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-0-gfed41342a82f, a.k.a. 12.0.1 release.

PR: 255570
MFC after: 6 weeks

2 years agoAdd some missing osd.9 MLINKs
Mark Johnston [Fri, 16 Jul 2021 16:13:51 +0000 (12:13 -0400)]
Add some missing osd.9 MLINKs

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

2 years agoHide arm64 features that don't have a HWCAP
Andrew Turner [Thu, 15 Jul 2021 23:22:07 +0000 (23:22 +0000)]
Hide arm64 features that don't have a HWCAP

We should only export MSR fields if there is also a HWCAP so it doesn't
matter which software uses.

Sponsored by: The FreeBSD Foundation

2 years agotcp: Lro needs to validate that it does not go beyond the end of the mbuf as it parses.
Randall Stewart [Fri, 16 Jul 2021 10:07:13 +0000 (06:07 -0400)]
tcp: Lro needs to validate that it does not go beyond the end of the mbuf as it parses.

Currently the LRO parser, if given a packet that say has ETH+IP header but the TCP header
is in the next mbuf (split), would walk garbage. Lets make sure we keep track as we
parse of the length and return NULL anytime we exceed the length of the mbuf.

Reviewed by: tuexen, hselasky
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D31195

2 years agoixgbe: Print FW NVM and Option ROM versions
Kevin Bowling [Fri, 16 Jul 2021 06:50:14 +0000 (23:50 -0700)]
ixgbe: Print FW NVM and Option ROM versions

It can be useful for system operators to see this kind of information
when correlating issues or requesting support from the OEM or Intel for
hardware and firmware issues.

Reviewed by: gallatin
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D30178

2 years agofreebsd-update: create a ZFS boot environment on install
Dave Fullard [Fri, 16 Jul 2021 04:02:48 +0000 (23:02 -0500)]
freebsd-update: create a ZFS boot environment on install

Updated freebsd-update to allow it to create boot environments using
bectl should the system support it. The bectl utility was updated in
r352211 (490e13c1403f) to support a 'check' to determine if the system
supports boot environments.  If UFS is used, the bectl check will fail
then no attempt will be made to create the boot environment.

If freebsd-update is run inside a jail, no attempt will be made to
create a boot environment.

The boot environment function will create a new environment using the
format: current FreeBSD kernel version and date/timestamp, example:

12.0-RELEASE-p10_2019-10-03_185233

This functionality can be disabled by setting 'CreateBootEnv' in
freebsd-update.conf to 'no'.

Discussed with: allanjude
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D21892

2 years agocallout: Make cc_cpu local to kern_timeout.c
Mark Johnston [Fri, 16 Jul 2021 02:40:23 +0000 (22:40 -0400)]
callout: Make cc_cpu local to kern_timeout.c

No functional change intended.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

2 years agonfssvc: Zero the buffer copied out when NFSSVC_DUMPMNTOPTS is set
Mark Johnston [Fri, 16 Jul 2021 02:39:27 +0000 (22:39 -0400)]
nfssvc: Zero the buffer copied out when NFSSVC_DUMPMNTOPTS is set

Reported by: KMSAN
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

2 years agolio_listio: Don't post a completion notification if none was requested
Mark Johnston [Fri, 16 Jul 2021 02:38:46 +0000 (22:38 -0400)]
lio_listio: Don't post a completion notification if none was requested

One is allowed to use LIO_NOWAIT without specifying a sigevent.  In this
case, lj->lioj_signal is left uninitialized, but several code paths
examine liov_signal.sigev_notify to figure out which notification to
post.  Unconditionally initialize that field to SIGEV_NONE.

Add a dumb test case which triggers the bug.

Reported by: KMSAN+syzkaller
Reviewed by: asomers
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31197

2 years agolibc: Use the initial-exec TLS model
Mark Johnston [Fri, 16 Jul 2021 02:35:28 +0000 (22:35 -0400)]
libc: Use the initial-exec TLS model

This permits more efficient accesses of thread-local variables, which
are heavily used at least by jemalloc and locale-aware code.  Note that
on amd64 and i386, jemalloc's thread-local variables already have their
TLS model overridden by defining JEMALLOC_TLS_MODEL.

For now the change is applied only to tested platforms, but should in
principle be enabled everywhere.

PR: 255840
Suggested by: jrtc27
Reviewed by: kib
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31070

2 years agortld/arm64: Remove checks for undefined symbols when processing TPREL64
Mark Johnston [Fri, 16 Jul 2021 02:26:25 +0000 (22:26 -0400)]
rtld/arm64: Remove checks for undefined symbols when processing TPREL64

lld emits several GOT relocations referencing the null sumbol in libc.so
when compiled with -ftls-model=initial-exec.  This symbol is specified
to be undefined.

We generally do not handle dynamic TLS relocations against weak,
undefined symbols, so avoid printing a warning here.  This makes it
possible to compile libc.so using the initial-exec TLS model on arm64.

Reviewed by: jrtc27, kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31069

2 years agovmd: Rename vmd_bus class to pci
Neel Chauhan [Fri, 16 Jul 2021 02:03:05 +0000 (19:03 -0700)]
vmd: Rename vmd_bus class to pci

This fixes a kernel panic when probing for vmd_bus on Intel TigerLake on
14-CURRENT. Apparently, vmd_bus is a type of PCI bus, but was registered
as a separate device class.

PR: 256915
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D31071

2 years agoUPDATING: Not unusual side effect of the awk bug fixed in d4d252c49976
Warner Losh [Fri, 16 Jul 2021 00:30:53 +0000 (18:30 -0600)]
UPDATING: Not unusual side effect of the awk bug fixed in d4d252c49976

You might not be able to build the kernel if you have an awk between
Jul 7th and today. It does not affect all platforms due to the nature
of the bug (so amd64 is unaffected in stable/13 or current, but
is affected in stable/12. i386 seems to be affected everywhere).

Sponsored by: Netflix

2 years agoawk: revert upstream's attempt to disallow hex strings
Warner Losh [Thu, 15 Jul 2021 22:46:06 +0000 (16:46 -0600)]
awk: revert upstream's attempt to disallow hex strings

Upstream one-true-awk decided to disallow hex strings as numbers. This
is in line with awk's behavior prior to C99, and allowed by the POSIX
standard. The standard, however, allows them to be treated as numbers
because that's what the standard said in the 2001 through 2004 editions.
Since 2001, the nawk in FreeBSD has treated them as numbers, so restore
that behavior, allowed by the standard.

A number of scripts in the FreeBSD tree depend on this interpretation,
including scripts to build the kernel which had mysteriously started
failing for some people and not others. By re-allowing 0x hex numbers,
this fixes those scripts and restores POLA.

Upstream issue: https://github.com/onetrueawk/awk/issues/126
Sponsored by: Netflix
Reviewed by: kevans
MFC After: asap due to regression alrady merged to stable
Differential Revision: https://reviews.freebsd.org/D31199

2 years agoarm64: Sync icache when creating executable superpage mappings
Alan Cox [Wed, 14 Jul 2021 17:59:49 +0000 (12:59 -0500)]
arm64: Sync icache when creating executable superpage mappings

Reviewed by: andrew, kib, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31181

2 years agodevd: remove pccard entries
Warner Losh [Thu, 15 Jul 2021 22:17:33 +0000 (16:17 -0600)]
devd: remove pccard entries

The pccard entries are now obsolete, remove them.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D31184

2 years agonvme: Enable interrupts after qpair fully constructed
Warner Losh [Thu, 15 Jul 2021 22:17:23 +0000 (16:17 -0600)]
nvme: Enable interrupts after qpair fully constructed

To guard against the ill effects of a spurious interrupt during
construction (or one that was bogusly pending), enable interrupts after
the qpair is completely constructed. Otherwise, we can die with null
pointer dereferences in nvme_qpair_process_completions. This has been
observed in at least one pre-release NVMe drive where the MSIX interrupt
fired while the queue was being created, before we'd started the NVMe
controller card.

The alternative of only turning on the interrupts after the rest was
tried, but was insufficient to work around this bug and made the code
more complicated w/o benefit.

Reviewed by: mav, chuck
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D31182

2 years agonanobsd: Bump rescue size to 8GB
Warner Losh [Thu, 15 Jul 2021 22:11:15 +0000 (16:11 -0600)]
nanobsd: Bump rescue size to 8GB

Bump the rescue size from 1.2GB to just shy of 8GB as things have grown
somewhat. Also make it possible to build rescue somewhere other than
/usr/src.

Sponsored by: Netflix

2 years agopcengines: Fix kernel config
Warner Losh [Thu, 15 Jul 2021 22:11:11 +0000 (16:11 -0600)]
pcengines: Fix kernel config

Update the old ALIX config to remove devices, add iflib and remove
trailing white space.

Sponsored by: Netflix

2 years agonanobsd: default to -j $hw.ncpu
Warner Losh [Thu, 15 Jul 2021 22:07:51 +0000 (16:07 -0600)]
nanobsd: default to -j $hw.ncpu

For paralllel builds, default to using all the CPUs on the system. The
old default of -j 3 was too few.

Sponsored by: Netflix

2 years agonanobsd: Use gpart and create code image before full disk image
Arrigo Marchiori [Thu, 15 Jul 2021 22:06:51 +0000 (16:06 -0600)]
nanobsd: Use gpart and create code image before full disk image

The attached patch brings two main changes to the nanobsd script:
 1- gpart is used instead of fdisk;
 2- the code image is created first, and then used to ``assemble'' the
    full disk image.

The patch was first proposed on the freebsd-embedded list:
http://lists.freebsd.org/pipermail/freebsd-embedded/2012-June/001580.html
and is currently under discussion:
http://lists.freebsd.org/pipermail/freebsd-embedded/2014-January/002216.html

Another effect is that the -f option ("suppress code slice extraction")
now imples the -i option ("suppress disk image build").

imp@ applied Patch by hand to new legacy.sh, plus tweaked for NANO_LOG vs
NANO_OBJ confusion in original.

PR: 186030
Reviewed by: imp@
Differential Revision: https://reviews.freebsd.org/D31102

2 years agolibc: add mempcpy(3) and wmempcpy(3)
Konstantin Belousov [Wed, 14 Jul 2021 15:41:36 +0000 (18:41 +0300)]
libc: add mempcpy(3) and wmempcpy(3)

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31180

2 years agoCreate namespace for the symbols added during 14-CURRENT cycle.
Konstantin Belousov [Wed, 14 Jul 2021 15:41:05 +0000 (18:41 +0300)]
Create namespace for the symbols added during 14-CURRENT cycle.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31180

2 years agoeli: Zero pad bytes that arise when certain auth algorithms are used
Mark Johnston [Thu, 15 Jul 2021 16:23:04 +0000 (12:23 -0400)]
eli: Zero pad bytes that arise when certain auth algorithms are used

When authentication is configured, GELI ensures that the amount of data
per sector is a multiple of 16 bytes.  This is done in
eli_metadata_softc().  When the digest size is not a multiple of 16
bytes, this leaves some extra pad bytes at the end of every sector, and
they were not being zeroed before being written to disk.  In particular,
this happens with the HMAC/SHA1, HMAC/RIPEMD160 and HMAC/SHA384 data
authentication algorithms.

This change ensures that they are zeroed before being written to disk.

Reported by: KMSAN
Reviewed by: delphij, asomers
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31170

2 years agonfsclient: Avoid copying uninitialized bytes into statfs
Mark Johnston [Thu, 15 Jul 2021 16:18:17 +0000 (12:18 -0400)]
nfsclient: Avoid copying uninitialized bytes into statfs

hst will be nul-terminated but the remaining space in the buffer is left
uninitialized.  Avoid copying the entire buffer to ensure that
uninitialized bytes are not leaked via statfs(2).

Reported by: KMSAN
Reviewed by: rmacklem
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31167

2 years agopf: Constify tag name and queue name helper functions
Mark Johnston [Thu, 15 Jul 2021 16:17:58 +0000 (12:17 -0400)]
pf: Constify tag name and queue name helper functions

No functional change intended.

Reviewed by: kp
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31168

2 years agoAssert that valid PTEs are not overwritten when installing a new PTP
Mark Johnston [Thu, 15 Jul 2021 16:17:33 +0000 (12:17 -0400)]
Assert that valid PTEs are not overwritten when installing a new PTP

amd64 and 32-bit ARM already had assertions to this effect.  Add them to
other pmaps.

Reviewed by: alc, kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31171

2 years agohwpmc: mostly clean up cc --analyze
Mateusz Guzik [Thu, 15 Jul 2021 14:01:11 +0000 (14:01 +0000)]
hwpmc: mostly clean up cc --analyze

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agoAdd __diagused
Mateusz Guzik [Thu, 15 Jul 2021 14:01:02 +0000 (14:01 +0000)]
Add __diagused

This can be used for variables which are only used with either
INVARIANTS or WITNESS. Without any annotation they run into dead store
warnings from cc --analyze and always annotating with __unused may hide
bad vars when it should not.

Reviewed by: kib, markj
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31185

2 years agolinuxkpi: Add spin_trylock_irqsave() macro
Neel Chauhan [Thu, 15 Jul 2021 14:52:42 +0000 (07:52 -0700)]
linuxkpi: Add spin_trylock_irqsave() macro

This is needed by the drm-kmod 5.6 update.

Reviewed by: hselasky
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D30706

2 years agoCleanup unused USB enums.
Hans Petter Selasky [Thu, 15 Jul 2021 10:38:16 +0000 (12:38 +0200)]
Cleanup unused USB enums.

MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agoSend a zero-length-packet first when opening a BULK endpoint for USB serial
Hans Petter Selasky [Tue, 6 Jul 2021 10:29:57 +0000 (12:29 +0200)]
Send a zero-length-packet first when opening a BULK endpoint for USB serial
port devices. If it gets eaten it is fine. Many USB device side implementations
don't properly support the clear endpoint halt command and if they do, data is lost
because the transmit FIFO is typically reset when this command is received.

Tested by: jmg
MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agoAdd virtio_scsi to the arm64 GENERIC config
Andrew Turner [Wed, 14 Jul 2021 20:13:10 +0000 (20:13 +0000)]
Add virtio_scsi to the arm64 GENERIC config

This is needed to boot on the Oracle Cloud VM.Standard.A1.Flex instance

Sponsored by: The FreeBSD Foundation

2 years agoAdd virtio comments to the arm64 GENERIC config
Andrew Turner [Wed, 14 Jul 2021 20:08:29 +0000 (20:08 +0000)]
Add virtio comments to the arm64 GENERIC config

Most of these are from the amd64 GENERIC config.

Sponsored by: The FreeBSD Foundation

2 years agoRemove the newline from arm64 trap panics
Andrew Turner [Wed, 14 Jul 2021 19:49:58 +0000 (19:49 +0000)]
Remove the newline from arm64 trap panics

The panic function will already print a newline so there is no need to
add it here.

Sponsored by: The FreeBSD Foundation

2 years agoUpdate the SCTLR_EL1 register definitions
Andrew Turner [Thu, 8 Jul 2021 12:14:56 +0000 (12:14 +0000)]
Update the SCTLR_EL1 register definitions

They are valid as of the ARMv8.7 XML.

While here remove SCTLR_RES0 as it's unused and depends on which CPU
the kernel is running on and switch to shifted values as they are
easier to compare with the documentation.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31120

2 years agoUpdate the arm64 HCR_EL2 registers
Andrew Turner [Wed, 7 Jul 2021 11:51:40 +0000 (11:51 +0000)]
Update the arm64 HCR_EL2 registers

They are valid as of the ARMv8.7 XML.

While here switch to use shifted values as they are easier to compare
with values in the Arm Reference Manual.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31093

2 years agoloader: make sure CPUTYPE is ignored when building
Warner Losh [Thu, 15 Jul 2021 03:06:08 +0000 (21:06 -0600)]
loader: make sure CPUTYPE is ignored when building

CPUTYPE?=native causes -march=native to be added to the command
line. When the host machine is haswell, this causes some versions of
clang to generate code that can't execute in the efi boot loader
environment. Set _CPUCFLAGS= to undo what's done bsd.cpu.mk. bsd.cpu.mk
is included too early to control with NO_CPU_CFLAGS here. The only other
option is to put that in all the Makefiles, and this is less tedious and
error prone.

PR: 194641
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D31187
MFC After: 1 week

2 years agoAdd missing libkern/strnstr.c file
Greg V [Thu, 15 Jul 2021 00:56:03 +0000 (17:56 -0700)]
Add missing libkern/strnstr.c file

Apparently it wasn't picked up by git.

Reviewed by: bz, hselasky, nc
Differential Revision: https://reviews.freebsd.org/D31131

2 years agolibkern: import strnstr from libc
Greg V [Thu, 15 Jul 2021 00:52:32 +0000 (17:52 -0700)]
libkern: import strnstr from libc

Required for drm-kmod 5.6 (amdgpu).

Reviewed by: bz, hselasky, nc
Differential Revision: https://reviews.freebsd.org/D31131

2 years agoprocctl(PROC_ASLR_STATUS): fix vmspace leak
Konstantin Belousov [Wed, 14 Jul 2021 23:40:04 +0000 (02:40 +0300)]
procctl(PROC_ASLR_STATUS): fix vmspace leak

Reported by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agoloader: Create loader_simp(8) to document simple version of loader
Warner Losh [Wed, 14 Jul 2021 22:43:25 +0000 (16:43 -0600)]
loader: Create loader_simp(8) to document simple version of loader

loader_simp is a much simplified version of loader that will process a
linear sequence of commands from loader.rc. It has neither Forth nor Lua
built in and is much smaller. Document it. This is largely copied from
loader.8 since it implements those built-in commands. Future revisions
will fix this duplication.

Sponsored by: Netflix

2 years agoloader(8): fix path to be correct loader.4th.
Warner Losh [Wed, 14 Jul 2021 22:34:43 +0000 (16:34 -0600)]
loader(8): fix path to be correct loader.4th.

boot.4th was a thing for only a few months around FreeBSD 3.1. The
correct name has been loader.4th for a long time.

MFC After:    2 days
Sponsored by: Netflix

2 years agoRemove incorrect __restricted labels from strcspn
Alfonso Gregory [Wed, 14 Jul 2021 21:48:35 +0000 (15:48 -0600)]
Remove incorrect __restricted labels from strcspn

strcspn should never have had the __restrict keywords. While both of
these strings are const, it may have unindended side effects. While this
is the kernel, the POSIX definition also omits restrict.

Reviewed by: imp@
Pull Request: https://github.com/freebsd/freebsd-src/pull/497

2 years agonfscl: Avoid KASSERT() panic in cache_enter_time()
Rick Macklem [Wed, 14 Jul 2021 20:33:37 +0000 (13:33 -0700)]
nfscl: Avoid KASSERT() panic in cache_enter_time()

Commit 844aa31c6d87 added cache_enter_time_flags(), specifically
so that the NFS client could specify that cache enter replace
any stale entry for the same name.  Doing so avoids a KASSERT()
panic() in cache_enter_time(), as reported by the PR.

This patch uses cache_enter_time_flags() for Readdirplus, to
avoid the panic(), since it is impossible for the NFS client
to know if another client (or a local process on the NFS server)
has replaced a file with another file of the same name.

This patch only affects NFS mounts that use the "rdirplus"
mount option.

There may be other places in the NFS client where this needs
to be done, but no panic() has been observed during testing.

PR: 257043
MFC after: 2 weeks

2 years agoPartially revert previous commit.
Alexander Motin [Wed, 14 Jul 2021 19:46:22 +0000 (15:46 -0400)]
Partially revert previous commit.

ns identify does not allow nsid of 0xffffffff.  Only general identify
allows it.

MFC after: 1 week

2 years agoFor ns identify/delete allow nsid of 0xffffffff.
Alexander Motin [Wed, 14 Jul 2021 18:56:34 +0000 (14:56 -0400)]
For ns identify/delete allow nsid of 0xffffffff.

The first should report common parameters, the second should delete
all namespaces.

MFC after: 1 week

2 years agoClear the accessed bit when copying a managed superpage mapping
Alan Cox [Tue, 13 Jul 2021 07:30:43 +0000 (02:30 -0500)]
Clear the accessed bit when copying a managed superpage mapping

pmap_copy() is used to speculatively create mappings, so those mappings
should not have their access bit preset.

Reviewed by: kib, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31162

2 years agoFilter out LBA formats with LBA Data Size of 0.
Alexander Motin [Wed, 14 Jul 2021 18:01:22 +0000 (14:01 -0400)]
Filter out LBA formats with LBA Data Size of 0.

According to the spec: "If the value reported is 0h, then LBA format
is not supported / used or is not currently available".

MFC after: 1 week

2 years agoloader: small Makefile style change
Warner Losh [Wed, 14 Jul 2021 13:54:44 +0000 (07:54 -0600)]
loader: small Makefile style change

Move to using M.${option} and M.yes to collecting man pages to install.

Sponsored by: Netflix

2 years agopsm(4): Probe Synaptics touchpad with active multiplexing mode enabled
Vladimir Kondratyev [Wed, 14 Jul 2021 10:30:26 +0000 (13:30 +0300)]
psm(4): Probe Synaptics touchpad with active multiplexing mode enabled

if it is only multiplexed device. Also enable syncbit checks for them.
This fixes touchpad recognition on Panasonic Toughbook CF-MX4 laptop.

Reported by: Tomasz "CeDeROM" CEDRO <tomek_AT_cedro_DOT_info>
MFC after: 1 month
PR: 253279
Differential revision: https://reviews.freebsd.org/D28502

2 years agostress2: Pass program exit code to shell script exit. Do not loop forever in test...
Peter Holm [Wed, 14 Jul 2021 05:59:48 +0000 (07:59 +0200)]
stress2: Pass program exit code to shell script exit. Do not loop forever in test program

2 years agoDocument my shiny new doc commit bit
Philip Paeps [Wed, 14 Jul 2021 03:55:16 +0000 (11:55 +0800)]
Document my shiny new doc commit bit

2 years agopccard: remove pccard device from all kernels
Warner Losh [Tue, 13 Jul 2021 22:46:55 +0000 (16:46 -0600)]
pccard: remove pccard device from all kernels

All the PC Card drivers have been removed from the tree. Remove the
pccard drivers from all the kernels.

Sponsored by: Netflix

2 years agopccard: remove pccard module
Warner Losh [Tue, 13 Jul 2021 22:44:34 +0000 (16:44 -0600)]
pccard: remove pccard module

There's no more pccard client drivers, so remove pccard driver.

Sponsored by: Netflix

2 years agocardbus: move card_if.m to sys/dev/cardbus
Warner Losh [Tue, 13 Jul 2021 22:40:39 +0000 (16:40 -0600)]
cardbus: move card_if.m to sys/dev/cardbus

Move card_if.m to sys/dev/cardbus since pccard is disappearing.

Sponsored by: Netflix

2 years agocxgbetool(8): Update the register definitions used to decode regdump.
Navdeep Parhar [Wed, 14 Jul 2021 00:51:13 +0000 (17:51 -0700)]
cxgbetool(8): Update the register definitions used to decode regdump.

Obtained from: Chelsio Communications
MFC after: 1 week
Sponsored by: Chelsio Communications

2 years agocxgbe(4): Skip a few more T5/T6 registers during a regdump.
Navdeep Parhar [Tue, 13 Jul 2021 23:38:55 +0000 (16:38 -0700)]
cxgbe(4): Skip a few more T5/T6 registers during a regdump.

These registers have read side effects and a read at just the right
(wrong?) time can trash some internal hw state.

Obtained from: Chelsio Communications
MFC after: 1 week
Sponsored by: Chelsio Communications

2 years agopmap: Micro-optimize pmap_remove_pages() on amd64 and arm64
Alan Cox [Mon, 12 Jul 2021 23:25:37 +0000 (18:25 -0500)]
pmap: Micro-optimize pmap_remove_pages() on amd64 and arm64

Reduce the live ranges for three variables so that they do not span the
call to PHYS_TO_VM_PAGE().  This enables the compiler to generate
slightly smaller machine code.

Reviewed by: kib, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31161

2 years agouart: Fix an out-of-bounds read in ns8250_bus_probe()
Mark Johnston [Tue, 13 Jul 2021 21:49:39 +0000 (17:49 -0400)]
uart: Fix an out-of-bounds read in ns8250_bus_probe()

The problem is that ns8250_bus_probe() accesses a field from the
ns8250_softc, which embeds the generic UART softc, but the ns8250_softc
hasn't yet been allocated because we're still probing.

This is a regression from commit 0aefb0a63c50.  This fixed a problem
where one of the upper four IER bits, which are usually reserved, needs
to be set in order to get RX interrupts before the RX FIFO is full.  At
the same time, we avoid clearing those reserved bits (see commit
58957d87173, though other UART drivers I looked at do not bother with
this).

So, copy what ns8250_init() does to disable interrupts, since we don't
know what the "right" mask is at this point.

Reported by: syzbot+f256beefd0df9eb796e7@syzkaller.appspotmail.com
Reviewed by: imp
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31124

2 years agoblist: Correct the node count computed in blist_create()
Mark Johnston [Tue, 13 Jul 2021 21:47:27 +0000 (17:47 -0400)]
blist: Correct the node count computed in blist_create()

Commit bb4a27f927a1 added the ability to allocate a span of blocks
crossing a meta node boundary.  To ensure that blst_next_leaf_alloc()
does not walk past the end of the tree, an extra all-zero meta node
needs to be present at the end of the allocation, and
blst_next_leaf_alloc() is implemented such that the presence of this
node terminates the search.

blist_create() computes the number of nodes required.  It had two
problems:
1. When the size of the blist is a power of BLIST_RADIX, we would
   unnecessarily allocate an extra level in the tree.
2. When the size of the blist is a multiple of BLIST_RADIX, we would
   fail to allocate a terminator node.  In this case,
   blst_next_leaf_alloc() could scan beyond the bounds of the
   allocation.  This was found using KASAN.

Modify blist_create() to handle these cases correctly.

Reported by: pho
Reviewed by: dougm
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D31158

2 years agomalloc: Pass the allocation size to malloc_large() by value
Mark Johnston [Tue, 13 Jul 2021 21:47:02 +0000 (17:47 -0400)]
malloc: Pass the allocation size to malloc_large() by value

Its callers do not make use the modified size that malloc_large() was
returning, so there's no need to pass a pointer.  No functional change
intended.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

2 years agograid3: Zero the metadata block before writing
Mark Johnston [Tue, 13 Jul 2021 21:46:02 +0000 (17:46 -0400)]
graid3: Zero the metadata block before writing

Ensure that string buffers and pad bytes are zero-filled before writing
graid3 metadata.

Reported by: KMSAN
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

2 years agogconcat: Zero the metadata block before writing
Mark Johnston [Tue, 13 Jul 2021 21:45:59 +0000 (17:45 -0400)]
gconcat: Zero the metadata block before writing

Ensure that string buffers and pad bytes are zero-filled before writing
gconcat metadata.  Also make sure to zero the full block buffer before
encoding the metadata and writing.

Fix some style bugs in g_concat_write_metadata() while here.

Reported by: KMSAN
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

2 years agogmirror: Zero the metadata block before writing
Mark Johnston [Tue, 13 Jul 2021 21:45:57 +0000 (17:45 -0400)]
gmirror: Zero the metadata block before writing

The mirror metadata fields contain string buffers and pad bytes, neither
were being zeroed before metadata was written to disk.  Also, the
metadata structure is smaller than the sector size, and in one case
gmirror was failing to zero-fill the full buffer before writing.

Fix these problems by pre-zeroing the metadata structure and the sector
buffer.

Reported by: KMSAN
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

2 years agofifo: Explicitly initialize generation numbers when opening
Mark Johnston [Tue, 13 Jul 2021 21:45:49 +0000 (17:45 -0400)]
fifo: Explicitly initialize generation numbers when opening

The fi_rgen and fi_wgen fields are generation numbers used when sleeping
waiting for the other end of the fifo to be opened.  The fields were not
explicitly initialized after allocation, but this was harmless.  To
avoid false positives from KMSAN, though, ensure that they get
initialized to zero.

Reported by: KMSAN
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

2 years agoFix pmbr issues > 2TB
Emrion [Tue, 13 Jul 2021 20:37:59 +0000 (14:37 -0600)]
Fix pmbr issues > 2TB

These issues have low impact because they require precise circumstances
to trigger one of them. The disk must be > 2 TiB in size and either:
- The primary GPT header is dammaged.
- The freebsd-boot partiton is located farther than the first 2 TiB of
  the disc and one of its sectors takes place at a lba value that makes
  the higher 32 bits of this very value change.
Errors and corrections folow:
- decl and incl don't affect CF, so replace with subl/addl $1
- repe uses %cx, so move size to it with movw
- moving a 64-bit value with %cx of 2 (should be 4) so addresses
  > 2TB will work.

PR: 233180
Reviewed by: imp@ (applied patch using description in bug)
Differential Revision: https://reviews.freebsd.org/D31100

2 years agocam_iosched: use tunable flag and make a bool really a bool
Warner Losh [Tue, 13 Jul 2021 06:00:33 +0000 (00:00 -0600)]
cam_iosched: use tunable flag and make a bool really a bool

kern.cam.do_dynamic_iosched is really a bool, so change its type to
bool. While I'm here, also use the CTLFLAG_TUN flag instead of a
separate tunable line for it and kern.cam.iosched_alpha_bits.

MFC After: 1 week
Sponsored by: Netflix

2 years agoFix potential NULL pointer dereference of device physical path
Young Xiao [Tue, 21 May 2019 07:36:29 +0000 (15:36 +0800)]
Fix potential NULL pointer dereference of device physical path

In ata_dev_advinfo() and nvme_dev_advinfo(), if the physical path is
being stored and there is a malloc failure (malloc(9) is called with
M_NOWAIT), we could wind up in a situation where the device's
physpath_len is set to the length the user provided, but the physpath
itself is NULL.

If another context then comes in to fetch the physical path value, we
would wind up trying to memcpy a NULL pointer into the caller's buffer.

So, set the physpath_len to 0 when we free the physpath on entry into
the store case for the physical path.  Reset the length to a non-zero
value only after we've successfully malloced a buffer to hold it.

This code mirrors scsi_xpt.c does already as well.

Signed-off-by: Young Xiao <92siuyang@gmail.com>
Reviewed by: imp
PR: 238014

2 years agovmm: Fix AMD-vi using wrong rid range
Ka Ho Ng [Tue, 13 Jul 2021 17:53:10 +0000 (01:53 +0800)]
vmm: Fix AMD-vi using wrong rid range

The ACPI parsing code around rid range was wrong on assuming there is
only one pair of start/end device id range. Besides, ivhd_dev_parse()
never work as supposed. The start/end rid info was always zero.

Restructure the code to build dynamic-sized tables for each IOMMU softc
holding device entries. The device entries are enumerated to find a
suitable IOMMU unit. Operations on devices not governed (e.g. the IOMMU
unit itself) are no-op from now on. There are also a minor fix on wrong
%b formatting string usage.

Tested on my EPYC 7282.

Sponsored by: The FreeBSD Foundation
Reviewed by: grehan
Differential Revision: https://reviews.freebsd.org/D30827

2 years agotcp: TCP_LRO getting bad checksums and sending it in to TCP incorrectly.
Randall Stewart [Tue, 13 Jul 2021 16:45:15 +0000 (12:45 -0400)]
tcp: TCP_LRO getting bad checksums and sending it in to TCP incorrectly.

In reviewing tcp_lro.c we have a possibility that some drives may send a mbuf into
LRO without making sure that the checksum passes. Some drivers actually are
aware of this and do not call lro when the csum failed, others do not do this and
thus could end up sending data up that we think has a checksum passing when
it does not.

This change will fix that situation by properly verifying that the mbuf
has the correct markings (CSUM VALID bits as well as csum in mbuf header
is set to 0xffff).

Reviewed by: tuexen, hselasky, gallatin
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D31155

2 years agoFix to call callout_init with correct inputs from axp driver
Rajesh Kumar M A [Tue, 13 Jul 2021 14:36:01 +0000 (14:36 +0000)]
Fix to call callout_init with correct inputs from axp driver

Approved by: vmaffione, gallatin

Reviewed by: hselasky, vmaffione, gallatin

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

MFC after: 1 week

2 years agoigc(4): Correct the man page section
Trond Endrestol [Tue, 13 Jul 2021 13:14:24 +0000 (15:14 +0200)]
igc(4): Correct the man page section

When not specifying the man page section the man page is set to 'LOCAL'
in the header of the page.

PR: 257145
Reviewed by: gbe
MFC after: 1 month (when the driver is MFC'ed)

2 years agotcpdump: decode packets on pfsync interfaces
Luiz Otavio O Souza [Mon, 12 Jul 2021 17:15:15 +0000 (19:15 +0200)]
tcpdump: decode packets on pfsync interfaces

Reviewed by: kp, scottl
Obtained from: pfsense
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31153

2 years agolinux(4): Improve comment about SA_RESTORER
Edward Tomasz Napierala [Tue, 13 Jul 2021 09:38:08 +0000 (10:38 +0100)]
linux(4): Improve comment about SA_RESTORER

No functional changes.

Sponsored By: EPSRC

2 years agolinux(4): remove unfinished vsyscall bits on arm64
Edward Tomasz Napierala [Tue, 13 Jul 2021 09:52:13 +0000 (09:52 +0000)]
linux(4): remove unfinished vsyscall bits on arm64

The vsyscall mechanism is obsolete.

Reviewed By: dchagin, emaste
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D31091

2 years agocxgbe(4): Update firmwares to 1.26.0.0.
Navdeep Parhar [Thu, 24 Jun 2021 20:21:51 +0000 (13:21 -0700)]
cxgbe(4): Update firmwares to 1.26.0.0.

Changes since 1.25.6.0 are listed here.  This list comes from the
Release Notes for "Chelsio Unified Wire 3.14.0.4 for Linux" dated
2021-07-08.

Fixes
-----

BASE:
- Wait 5ms before and after the i2c command that clears the mod_select.
  This fixes incorrect port module type read from i2c.

Obtained from: Chelsio Communications
MFC after: 1 week
Sponsored by: Chelsio Communications

2 years agoloader: Don't reserve space for symbols twice.
Warner Losh [Mon, 12 Jul 2021 21:17:05 +0000 (15:17 -0600)]
loader: Don't reserve space for symbols twice.

The current code bumps lastaddr twice for the symbol table
location. However, the first bump is bogus and results in wasted
space. Remove it.

PR: 110995
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D31017

2 years agozfs: merge openzfs/zfs@07a4c76e9 (master) into main
Martin Matuska [Mon, 12 Jul 2021 21:23:38 +0000 (23:23 +0200)]
zfs: merge openzfs/zfs@07a4c76e9 (master) into main

Notable upstream pull request merges:
  #12299 file reference counts can get corrupted
  #12320 FreeBSD: Use unmapped I/O for scattered/gang ABD buffers

Obtained from: OpenZFS
OpenZFS commit: 07a4c76e9016fad22f1ce2613ab5abc4b2652114

2 years agoddb(4): improve wording
Warner Losh [Mon, 12 Jul 2021 21:13:13 +0000 (15:13 -0600)]
ddb(4): improve wording

Incorporate feedback overlooked in revew by wblock@

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D4860

2 years agoloader: update autoboot description and move to loader.conf.5
Daniel Gerzo [Mon, 12 Jul 2021 21:13:03 +0000 (15:13 -0600)]
loader: update autoboot description and move to loader.conf.5

Document "NO" special value for the autoboot_delay and move the
description to loader.conf.5.

imp reworked some of the wording from danger's patch.

Reviewed by: imp
PR: 85128
Differential Revision: https://reviews.freebsd.org/D11887

2 years agoUpdate bug report template
Brian Behlendorf [Mon, 12 Jul 2021 20:05:50 +0000 (13:05 -0700)]
Update bug report template

- Remove the "SPL Version" line, the repositories have been merged
  since the 0.8 release and we no longer need to ask about this.

- Simply ask for the kernel version / patch level and add a hint
  about how to get this information on Linux and FreeBSD.

- Remove "Status: Triage Needed" from the template, in practice
  we really haven't been using this label so let's step setting it.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes: #12340
2 years agoFix bsd.subdir.mk-related issues after 0a0f7486413c
Jessica Clarke [Mon, 12 Jul 2021 19:54:01 +0000 (20:54 +0100)]
Fix bsd.subdir.mk-related issues after 0a0f7486413c

Since bsd.prog.mk includes bsd.obj.mk, and thus bsd.subdir.mk, we must
ensure all our bsd.subdir.mk-affecting variables are set before
including bsd.prog.mk. Since sbin's various Makefile.arch files add to
SUBDIR this results in those not taking effect, and presumably we also
end up not having buildworld as parallel as it should be due to the fact
that SUBDIR_PARALLEL was not being set before including bsd.prog.mk.

MFC with: 0a0f7486413c147d56808b38055c40c64cff61f5
Reviewed by: olivier
Differential Revision: https://reviews.freebsd.org/D31125

2 years agobsd.compiler.mk: Use CCACHE_PKG_PREFIX as ports now supports.
Bryan Drewery [Mon, 12 Jul 2021 19:51:41 +0000 (12:51 -0700)]
bsd.compiler.mk: Use CCACHE_PKG_PREFIX as ports now supports.

2 years agommc_cam_sim_default_action: do not touch the ccb after dispatching it
Andriy Gapon [Fri, 9 Jul 2021 14:53:17 +0000 (17:53 +0300)]
mmc_cam_sim_default_action: do not touch the ccb after dispatching it

If MMC_SIM_CAM_REQUEST() is successful the ccb could be running or being
completed as the method returns.  Modifying the ccb status could override
whatever status was already set by a MMC driver.

I am not sure what was the purpose of setting the status to CAM_REQ_INVALID
in the success path.  I assume that it was to catch a possibility that the
ccb could be completed without its status explicitly set.  So, I am keeping
the code, it's just moved to before the MMC_SIM_CAM_REQUEST call.

Without this change I was getting random and phantom EIO errors on Rock64
running off an SD card (dwmmc driver) plus occasional panics like:
  Memory modified after free 0xffffa00003985800(2040) val=6 @ 0xffffa00003985854
  panic: Most recently used by CAM CCB

MFC after: 1 week

2 years agoFix LINT kernel build issues after c3987b8ea793c11f61fecb14ef93195a23e3522c .
Hans Petter Selasky [Mon, 12 Jul 2021 15:47:15 +0000 (17:47 +0200)]
Fix LINT kernel build issues after c3987b8ea793c11f61fecb14ef93195a23e3522c .

Fixes the IPOIB_CM and SDP kernel options.

Reported by: lwhsu @
MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agoipoib: Fix for accessing uninitialized pointers and freed memory during attach and...
Hans Petter Selasky [Mon, 12 Jul 2021 13:01:19 +0000 (15:01 +0200)]
ipoib: Fix for accessing uninitialized pointers and freed memory during attach and detach.

Call infiniband_ifdetach() early to stop ifioctl(9) calls from user-space
during device removal. Also make sure that ifioctl(9) calls are blocked from
executing until the device is fully initialized. Ideally we would delay the
infiniband_ifattach() call, but because part of the initialization is to update
the link level address, that is not possible without more significant changes.

MFC after: 1 week
Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

2 years agomlx5: Numa domain improvements.
Hans Petter Selasky [Mon, 21 Jun 2021 13:42:20 +0000 (15:42 +0200)]
mlx5: Numa domain improvements.

Properly allocate all mlx5en(4) structures from correct numa domain.

While at it cleanup unused numa domain integers deriving from the
Linux version of mlx5en(4).

MFC after: 1 week
Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

2 years agomlx5: Fix for uninitialized "uid" field.
Hans Petter Selasky [Mon, 21 Jun 2021 13:41:11 +0000 (15:41 +0200)]
mlx5: Fix for uninitialized "uid" field.

Make sure the "uid" field gets properly set when destroying DCT and QP
objects by making a copy of the field when creating such objects.

MFC after: 1 week
Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

2 years agomlx4: Map core_clock page to user space only when allowed
Hans Petter Selasky [Wed, 16 Jun 2021 13:02:02 +0000 (15:02 +0200)]
mlx4: Map core_clock page to user space only when allowed

Currently when we map the hca_core_clock page to the user space,
there are vulnerable registers, one of which is semaphore, on
this page as well. If user read the wrong offset, it can modify the
above semaphore and hang the device.

Hence, mapping the hca_core_clock page to the user space only when
user required it specifically.

After this patch, mlx4 core_clock won't be mapped to user space by
default. Oppose to current state, where mlx4 core_clock is always mapped
to user space.

MFC after: 1 week
Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

2 years agomlx5en: Allow binding channels to CPUs when RSS is not enabled.
Hans Petter Selasky [Wed, 16 Jun 2021 13:02:02 +0000 (15:02 +0200)]
mlx5en: Allow binding channels to CPUs when RSS is not enabled.

MFC after: 1 week
Submitted by: Netflix
Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

2 years agoibcore: Add some functions and definitions for selecting and querying retryable ucont...
Hans Petter Selasky [Wed, 16 Jun 2021 13:02:00 +0000 (15:02 +0200)]
ibcore: Add some functions and definitions for selecting and querying retryable ucontext cleanup.

Linux commit:
1c77483e4c50339b0306572167ccbff6b55d051b

MFC after: 1 week
Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

2 years agomlx5en: Allocate per-channel doorbells.
Hans Petter Selasky [Wed, 16 Jun 2021 13:01:59 +0000 (15:01 +0200)]
mlx5en: Allocate per-channel doorbells.

To avoid congestion on the same PCI memory register space when
traffic consists mostly of small packets.

MFC after: 1 week
Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

2 years agomlx5en: Wait for all TLS connections to terminate when unloading driver.
Hans Petter Selasky [Wed, 16 Jun 2021 13:01:58 +0000 (15:01 +0200)]
mlx5en: Wait for all TLS connections to terminate when unloading driver.

The driver expects all TLS tags to be returned to the driver before
it can free the UMA zone where the TLS tags reside.

MFC after: 1 week
Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

2 years agomlx4ib and mlx5ib: Set slid to zero in Ethernet completion struct
Hans Petter Selasky [Wed, 16 Jun 2021 13:01:58 +0000 (15:01 +0200)]
mlx4ib and mlx5ib: Set slid to zero in Ethernet completion struct

IB spec says that a lid should be ignored when link layer is Ethernet,
for example when building or parsing a CM request message (CA17-34).
However, since ib_lid_be16() and ib_lid_cpu16()  validates the slid,
not only when link layer is IB, we set the slid to zero to prevent
false warnings in the kernel log.

Linux commit:
65389322b28f81cc137b60a41044c2d958a7b950

MFC after: 1 week
Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

2 years agomlx5en: Configure relaxed PCI read and write ordering for ethernet.
Hans Petter Selasky [Wed, 16 Jun 2021 13:01:57 +0000 (15:01 +0200)]
mlx5en: Configure relaxed PCI read and write ordering for ethernet.

This may improve performance in some configurations.

MFC after: 1 week
Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

2 years agomlx5en: Check for pci_channel_offline() when draining sendqueue.
Hans Petter Selasky [Wed, 16 Jun 2021 13:01:56 +0000 (15:01 +0200)]
mlx5en: Check for pci_channel_offline() when draining sendqueue.

This speeds up detach in hypervisor environments.

MFC after: 1 week
Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

2 years agomlx5ib: Implement support for enabling and disabling RoCE ECN.
Hans Petter Selasky [Wed, 16 Jun 2021 13:01:56 +0000 (15:01 +0200)]
mlx5ib: Implement support for enabling and disabling RoCE ECN.

RoCE is short for Remote direct memory access over Converged Ethernet.
ECN is short for Explicit Congestion Notification.

MFC after: 1 week
Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking

2 years agomlx5ib: Extend parameter macros so that more arguments may be added.
Hans Petter Selasky [Wed, 16 Jun 2021 13:01:55 +0000 (15:01 +0200)]
mlx5ib: Extend parameter macros so that more arguments may be added.

MFC after: 1 week
Reviewed by: kib
Sponsored by: Mellanox Technologies // NVIDIA Networking