]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 months agolibthr: add pshared_destroy() helper
Konstantin Belousov [Wed, 1 Feb 2023 21:06:04 +0000 (23:06 +0200)]
libthr: add pshared_destroy() helper

(cherry picked from commit 3cf37d1251bf71b2171e67af8f2ca43cbe3d874d)

16 months agoirdma(4): remove 14-current specific code
Bartosz Sobczak [Fri, 20 Jan 2023 08:28:36 +0000 (09:28 +0100)]
irdma(4): remove 14-current specific code

This is a direct commit to the stable/13 branch.

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
16 months agoirdma(4): Add code for compilation on stable/13 branch
Bartosz Sobczak [Mon, 6 Feb 2023 22:37:39 +0000 (14:37 -0800)]
irdma(4): Add code for compilation on stable/13 branch

Current content of the irdma(4) driver consists only of code that is
compilable on current 14-CURRENT branch which makes it impossible to
merge into stable/13 branch because of missing dependencies in the ofed
tree.

This patch adds missing code that allows for merging into stable branch.
Once it is there, code relating only to version 14 or higher should be
removed.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: erj@
MFC after: 1 day
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D38170

(cherry picked from commit a527c18cd7ba5d4afacbfb85817ca7b8b2487b52)

16 months agoirdma(4): Upgrade driver to 1.1.5-k
Bartosz Sobczak [Thu, 22 Dec 2022 01:10:15 +0000 (17:10 -0800)]
irdma(4): Upgrade driver to 1.1.5-k

This is to upgrade current irdma driver version (in support of RDMA on
Intel(R) Ethernet Controller E810) to 1.1.5-k

change summary:
- refactor defines for hardware registers
- rereg_mr verb added in libirdma
- fix print warning during compilation
- rt_ros2priority macro fix
- irdma.4 validated with mandoc
- fixing nd6_resolve usage
- added libirdma_query_device
- sysctl for irdma version
- aeq_alloc_db fix
- dwork_flush protected with qp refcount
- PFC fixes

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: erj@
Relnotes: yes
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D36944

(cherry picked from commit 777e472cd86b9394d07bf96c19dbafc2e1ff4fdc)

16 months agoirdma(4): hide tasklet-related definitions to avoid redefines
Bartosz Sobczak [Mon, 23 Jan 2023 10:17:53 +0000 (11:17 +0100)]
irdma(4): hide tasklet-related definitions to avoid redefines

checking if either from_tasklet or tasklet_setup
exists before defining irdma's own version.

This is a result of changes introduced in:
f2978460c7fd ("LinuxKPI: tasklet add (*callback) support", 2022-11-08)

The code should be kept until the from_timer and
tasklet_setup is defined in linuxkpi's interrupt.h

This is a direct commit to the stable/13 branch.

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
16 months agoibcore: The use of IN_LOOPBACK() now requires a valid VNET context.
Hans Petter Selasky [Wed, 31 Aug 2022 10:37:28 +0000 (12:37 +0200)]
ibcore: The use of IN_LOOPBACK() now requires a valid VNET context.

Make sure the VNET is set before using this macro.

Fixes: efe58855f3ea2cfc24cb705aabce3bc0fe1fb6d5
PR: 266054
Sponsored by: NVIDIA Networking

(cherry picked from commit f50274674ebf3a51a77708f569d38a238cbad6ec)

16 months agoAdjust irdma_prep_for_unregister() definition to avoid clang 15 warning
Dimitry Andric [Sun, 24 Jul 2022 21:27:24 +0000 (23:27 +0200)]
Adjust irdma_prep_for_unregister() definition to avoid clang 15 warning

With clang 15, the following -Werror warning is produced:

    sys/dev/irdma/icrdma.c:621:26: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    irdma_prep_for_unregister()
                             ^
                              void

This is because irdma_prep_for_unregister() is declared with a (void)
argument list, but defined with an empty argument list. Make the
definition match the declaration.

(cherry picked from commit ee6c09ac73b5eab848c66e539f8b3293a5abd7f8)

16 months agoirdma: Add RDMA driver for Intel(R) Ethernet Controller E810
Bartosz Sobczak [Mon, 23 May 2022 23:39:27 +0000 (16:39 -0700)]
irdma: Add RDMA driver for Intel(R) Ethernet Controller E810

This is an initial commit for RDMA FreeBSD driver for Intel(R) Ethernet
Controller E810, called irdma.  Supporting both RoCEv2 and iWARP
protocols in per-PF manner, RoCEv2 being the default.

Testing has been done using krping tool, perftest, ucmatose, rping,
ud_pingpong, rc_pingpong and others.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: #manpages (pauamma_gundo.com) [documentation]
Relnotes: yes
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D34690

(cherry picked from commit cdcd52d41e246ba1c0fcfad0769bd691487355ef)
(cherry picked from commit e602a30bb9fc7ee041a0e629d0fd2db7933ffa32)
(cherry picked from commit a6e275af46644af1de365a1edf19742bfa28bb69)

16 months agoOpenSSL: Regen manual pages for OpenSSL 1.1.1t
Jung-uk Kim [Tue, 7 Feb 2023 19:01:15 +0000 (14:01 -0500)]
OpenSSL: Regen manual pages for OpenSSL 1.1.1t

(cherry picked from commit eb9b98fb5aea1b20d71b0be948454f472b024da7)

16 months agoOpenSSL: Regen assembly files for OpenSSL 1.1.1t
Jung-uk Kim [Tue, 7 Feb 2023 18:55:17 +0000 (13:55 -0500)]
OpenSSL: Regen assembly files for OpenSSL 1.1.1t

(cherry picked from commit f1cf49002dbb0b1976ef1ebd8e689a7825e3e06f)

16 months agoOpenSSL: Merge OpenSSL 1.1.1t
Jung-uk Kim [Tue, 7 Feb 2023 18:54:16 +0000 (13:54 -0500)]
OpenSSL: Merge OpenSSL 1.1.1t

(cherry picked from commit fb3134558138e52322ebcdf66fee8288ee308d78)

16 months agoOpenSSL: Merge OpenSSL 1.1.1t
Jung-uk Kim [Tue, 7 Feb 2023 18:51:38 +0000 (13:51 -0500)]
OpenSSL: Merge OpenSSL 1.1.1t

(cherry picked from commit 640242a5915761ce63205bdb0542fa3c1473c0ff)

17 months agotimeout: Move from /usr/bin to /bin
Mateusz Piotrowski [Wed, 1 Feb 2023 15:24:59 +0000 (16:24 +0100)]
timeout: Move from /usr/bin to /bin

timeout(1) is used by /etc/rc.d/zfskeys. Unfortunately, having
timeout(1) installed in /usr/bin causes problems when /usr is an
encrypted ZFS partition.

Implementing timeout(1) in sh(1) is not trivial. A more elegant solution
is to move timeout(1) to /bin so that it is available to early services
in the boot process.

PR: 265221
Reviewed by: allanjude, des, imp
Approved by: allanjude, des, imp
Reported by: Ivan <r4@sovserv.ru>
Fixes: 33ff39796ffe Add zfskeys rc.d script for auto-loading encryption keys
Relnotes: yes
Sponsored by: Modirum MDPay
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D38344

(cherry picked from commit e7ab133648a168c4bf7c11da840663c5581771d8)

17 months agocontrib/bc: update to version 6.2.2
Stefan Eßer [Mon, 7 Mar 2022 22:23:56 +0000 (23:23 +0100)]
contrib/bc: update to version 6.2.2

This is a squashed commit that updates bc from version 5.2.2 to
version 6.2.2:

contrib/bc: update to version 5.2.3

This version fixes a parse error when passing a file to bc using -f
if that file has a multiline comment or string in it.

Merge commit '3673adf1ee311d6f83176d3e43cf0efb314764e4'

(cherry picked from commit 23210c9f42af94dc6bcdae3996d8a3d010dd6bfe)

contrib/bc: include assert.h when building with C11 or newer

This chunk should have been committed with the MFV commit
23210c9f42af94dc but was missing for an unknown reasn.

(cherry picked from commit b66d67d97aa58d0f239056917bbdbab26f41446a)

contrib/bc: import version 5.2.4

This update fixes an issue in input line editing: when going left to
the start of the line, the cursor would jump to the end of the line
instead.

Merge commit 'bc75dcc4ce682562390fa32e7cd63c08160e21b9'

(cherry picked from commit b85b9c88eb02298ea7fa3885619f54ac0e930ba4)

vendor/bc: import of version 5.2.5

This is a production release that fixes this bc's behavior on ^D to
match GNU bc.

(cherry picked from commit ed0603704174b01c25b49efc08c82e1532dc5622)
(cherry picked from commit f4ff1c300ef4081696bdd6ad34547be9242e419c)

usr.bin/bc: update to version 5.3.1

This version adds support for command line editing and history using
the libedit or readline libraries in addition to the line editing
features available in previous versions.

The version in the base system is configured to use libedit.

This allows to choose between emacs and vi line editing commands and
to use command overrides via a ~/.editrc file.

Merge commit 'bd54318046bfee055b140705a5cfd4148e78da07'

(cherry picked from commit 78bc019d220e05abb5b12f678f9b4a847019bbcc)

contrib/bc: merge from vendor release 5.3.3

This update fixes a build issue of release 5.3.2 on the FreeBSD base
system.

Merge commit '3f739b0595b7d6ac4bac9aaa1cae0910f11f92e2'

(cherry picked from commit f53b5fe7865f4e4240e40ba0f6345f81d337a823)

vendor/bc: update to upstream commit ca53adf83b7a

The filter_text function in scripts/functions.sh in version 5.3.3 had
commented out a "rm" command, probably for debugging purposes. This
caused temporary files to persist in /tmp when the bc program had been
built.

This commit fixes the build process with no change of the resulting
artefacts.

(cherry picked from commit 1576f66712876ee8b0fcc8b35fb062e1813b4fc0)
(cherry picked from commit f6ed05f1233043eb30a7e5a1efcb7247ad2add90)

contrib/bc: merge from vendor release 6.2.2

This update fixes a few issues in history editing and the processing
of the "quit" function. The "quit" function will no longer cause bc
to exit when encountered in a script file (before any command from
the script has been executed).

New functions is_number(), is_string return 1 if the passed argument
is a number resp. a string. The asciify() function has been extended
to support the conversion of an array of numbers into a string.

Merge commit '1a63323d17fedb05b6962853e821c9d7c6b9853e'

(cherry picked from commit d101cdd6edd782f6ec56eef63ed91abd77a8b317)

17 months agoiflib: Add null check to iflib_stop()
Przemyslaw Lewandowski [Tue, 24 Jan 2023 23:41:15 +0000 (15:41 -0800)]
iflib: Add null check to iflib_stop()

Ever since gtaskqueue_drain() was added to iflib_stop(), a kernel panic
occurs when the ice(4) driver is in recovery mode. Queues are not
initialized in this mode, so gt_taskqueue is not initialized, and
gtaskqueue_drain() will panic.

Fix this by only doing a drain if an RX queue's gt_taskqueue is
initialized.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: erj@
MFC after: 1 week
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D37892

(cherry picked from commit 9147969bc277b389a62373c6a5050a2ebfd39071)

17 months agoFix for getmntpoint(3) when checking for NFS mount points.
Kirk McKusick [Sun, 29 Jan 2023 23:12:48 +0000 (15:12 -0800)]
Fix for getmntpoint(3) when checking for NFS mount points.

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

(cherry picked from commit ad055467bec35885dc3eff2f4dd765f5b2f53259)

17 months agoRewrite to avoid Coverity false positive.
Kirk McKusick [Thu, 26 Jan 2023 00:57:26 +0000 (16:57 -0800)]
Rewrite to avoid Coverity false positive.

Reported by:  Coverity (CID 1502669)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37907

(cherry picked from commit 0bd4c448ec1dfdc2300a6cacca42e1fc7c4d8f14)

17 months agoDocument the mntopts(3) functions.
Kirk McKusick [Sun, 15 Jan 2023 18:20:48 +0000 (10:20 -0800)]
Document the mntopts(3) functions.

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

(cherry picked from commit 906c312bbf7493ccbcce883936d67e5c66a9c3c2)

17 months agovtd: Increase DRHD_MAX_UNITS
Eric Joyner [Mon, 30 Jan 2023 21:34:03 +0000 (13:34 -0800)]
vtd: Increase DRHD_MAX_UNITS

Observed on a couple Ice Lake-SP platforms (Intel Coyote Pass, Dell
R750), there are more than 8 DRHD sections enumerated in the DMAR ACPI
section.  Since the previous limit was 8, this resulted in some of these
not being parsed by vtd when the iommu is initialized; in this case when
PCI devices are being passthru'd to a bhyve VM.

This omission later causes a kernel panic later in initialization when
devices could not be found in a valid DRHD scope because the DHRD
containing the device's scope was not added to vtd.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
PR: 268486
Sponsored by: Intel Corporation
Reviewed by: rew@, corvink@
Differential Revision: https://reviews.freebsd.org/D38285

(cherry picked from commit 53545967642d850eee4f2dd9fa27cae52ae981b9)

17 months agosctp: improve delivery of stream reset notifications
Michael Tuexen [Thu, 2 Feb 2023 13:46:10 +0000 (14:46 +0100)]
sctp: improve delivery of stream reset notifications

Two functions are not called via sctp_ulp_notify() and therefore
need additional checks when being called.

Reported by: syzbot+eb888d3a5a6c54413de5@syzkaller.appspotmail.com

(cherry picked from commit 7b2f1a7fe9445ea318f34bd3db971076b61ef831)

17 months agotcp: improve error handling of net.inet.tcp.udp_tunneling_port
Michael Tuexen [Thu, 26 Jan 2023 21:55:22 +0000 (22:55 +0100)]
tcp: improve error handling of net.inet.tcp.udp_tunneling_port

In case the new port can't be set, set the port to 0.

Sponsored by: Netflix, Inc.

(cherry picked from commit e2d14a04c5fc49ad1aab280e3c2e7283bbacc948)

17 months agoelftoolchain: update the list of riscv relocations
Mitchell Horne [Sat, 28 Jan 2023 18:19:26 +0000 (14:19 -0400)]
elftoolchain: update the list of riscv relocations

A few have been added, a couple removed.

Reviewed by: jrtc27, imp, emaste
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38175

(cherry picked from commit 537c166b767879398338370701fa60f67acec112)

17 months agoelf_common.h: remove obsolete riscv relocations
Mitchell Horne [Sat, 28 Jan 2023 18:19:44 +0000 (14:19 -0400)]
elf_common.h: remove obsolete riscv relocations

These were specified at one time, but later removed.

Reviewed by: jrtc27, imp, emaste
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38174

(cherry picked from commit 7738bb89a3cc70dc83ed4e80ee5160c18a7721f3)

17 months agoddb: have 'reset' command use normal reboot path
Mitchell Horne [Sat, 7 Jan 2023 18:09:28 +0000 (14:09 -0400)]
ddb: have 'reset' command use normal reboot path

This conditionally gives all registered shutdown handlers a chance to
perform the reboot, with cpu_reset() being the fallback. The '\s'
modifier can be used with the command to get the previous behaviour.

The motivation is that some platforms may not be able do anything
meaningful via cpu_reset(), due to a lack of standardized reset
mechanism and/or firmware shortcomings. However, they may have a
separate device driver attached that normally performs the reboot. Such
is the case for some versions of the Raspberry Pi, where reset via PSCI
fails, but the BCM2835 watchdog driver has a shutdown hook.

Reported by: bz
Reviewed by: markj (slightly earlier version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D37981

(cherry picked from commit 5644850620aead7c257a4e3040e20201b510f499)

17 months agokern_reboot: unconditionally call shutdown_reset()
Mitchell Horne [Mon, 23 Jan 2023 18:47:11 +0000 (14:47 -0400)]
kern_reboot: unconditionally call shutdown_reset()

Currently shutdown_reset() is registered as the final entry of the
shutdown_final event handler. However, if a panic occurs early in boot
before the event is registered (SI_SUB_INTRINSIC), we may end up
spinning in the subsequent infinite for loop and failing to reset
altogether. Instead we can simply call this function unconditionally.

Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D37981

(cherry picked from commit 627ca221c311b5d9c4132e03664a96f390ff5c0d)

17 months agocpuset: Handle CPU_WHICH_TIDPID wherever cpuset_which() is called.
Dmitry Chagin [Mon, 30 Jan 2023 16:28:54 +0000 (19:28 +0300)]
cpuset: Handle CPU_WHICH_TIDPID wherever cpuset_which() is called.

cpuset_which() resolves the argument pair which and id and returns references
to an appropriate resources. To avoid leaking resources or accessing unresolved
references to a resources handle new which CPU_WHICH_TIDPID wherever
cpuset_which() is called.
To avoid code duplication cpuset_which2() has been added.

Reported by: syzbot+331e8402e0f7347f0f2a@syzkaller.appspotmail.com
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D38272
MFC after: 2 weeks

(cherry picked from commit 2058f075b4afc543b8735599bea7278e37b2e9f9)

17 months agomp_x86: Trim trailing whitespaces.
Dmitry Chagin [Sun, 29 Jan 2023 13:18:39 +0000 (16:18 +0300)]
mp_x86: Trim trailing whitespaces.

MFC after: 1 week

(cherry picked from commit 290afc5d55fa370338cb837c7aaabf40670628a8)

17 months agosubr_smp: Trim trailing whitespaces.
Dmitry Chagin [Sun, 29 Jan 2023 13:18:17 +0000 (16:18 +0300)]
subr_smp: Trim trailing whitespaces.

MFC after: 1 week

(cherry picked from commit e4754c80366dcbc28e625efab5cfe84057784c19)

17 months agocpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux.
Dmitry Chagin [Sun, 29 Jan 2023 13:17:33 +0000 (16:17 +0300)]
cpuset: Fix sched_[g|s]etaffinity() for better compatibility with Linux.

Under Linux to sched_[g|s]etaffinity() functions the value returned from a call
to gettid(2) (thread id) can be passed in the argument pid. Specifying pid as 0
will set the attribute for the calling thread, and passing the value returned
from a call to getpid(2) (process id) will set the attribute for the main thread
of the thread group.

Native cpuset(2) family of system calls has "which" argument to determine how
the value of id argument is interpreted, i.e., CPU_WHICH_TID is used to pass
a thread id and CPU_WHICH_PID - to pass a process id.

For now native sched_[g|s]etaffinity() implementation is wrong as uses "which"
CPU_WHICH_PID to pass both (process and thread id) to the kernel. To fix this
adding a new "which" CPU_WHICH_TIDPID intended to handle both id's.

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

(cherry picked from commit c21b080f3dc2f5e91ada608d4385b7ed6538ba9b)

17 months agolibthr: Trim trailing whitespaces in pthread_attr_affinity.
Dmitry Chagin [Sun, 29 Jan 2023 12:38:04 +0000 (15:38 +0300)]
libthr: Trim trailing whitespaces in pthread_attr_affinity.

MFC after: 1 week

(cherry picked from commit f8660ea4b14d8ef8beefd4699d79098c738dddd8)

17 months agolibthr: Fix pthread_attr_[g|s]etaffinity_np manual.
Dmitry Chagin [Sun, 29 Jan 2023 12:37:18 +0000 (15:37 +0300)]
libthr: Fix pthread_attr_[g|s]etaffinity_np manual.

Fix my fault in f35093f8.

MFC after: 1 week

(cherry picked from commit 2b87addf526e058158a332547d44b24a80f71321)

17 months agolibthr: Fix pthread_[g|s]etaffinity_np manual.
Dmitry Chagin [Sun, 29 Jan 2023 12:36:25 +0000 (15:36 +0300)]
libthr: Fix pthread_[g|s]etaffinity_np manual.

Since f35093f8 semantics of a thread affinity functions is changed to be a
compatible with Linux:
In case of getaffinity(), the minimum cpuset_t size that the kernel permits is
the maximum CPU id, present in the system, / NBBY bytes, the maximum size is not
limited.
In case of setaffinity(), the kernel does not limit the size of the user-provided
cpuset_t, internally using only the meaningful part of the set, where the upper
bound is the maximum CPU id, present in the system, no larger than the size of
the kernel cpuset_t.

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

(cherry picked from commit 62801712dfc17fed6f8d4c9b64dca18d51a2bf9b)

17 months agolibthr: Fix pthread_attr_[g|s]etaffinity_np to match it's manual and the kernel.
Dmitry Chagin [Sun, 29 Jan 2023 12:35:18 +0000 (15:35 +0300)]
libthr: Fix pthread_attr_[g|s]etaffinity_np to match it's manual and the kernel.

Since f35093f8 semantics of a thread affinity functions is changed to be a
compatible with Linux:

In case of getaffinity(), the minimum cpuset_t size that the kernel permits is
the maximum CPU id, present in the system, / NBBY bytes, the maximum size is not
limited.
In case of setaffinity(), the kernel does not limit the size of the user-provided
cpuset_t, internally using only the meaningful part of the set, where the upper
bound is the maximum CPU id, present in the system, no larger than the size of
the kernel cpuset_t.

To match pthread_attr_[g|s]etaffinity_np checks of the user-provided cpusets to
the kernel behavior export the minimum cpuset_t size allowed by running kernel
via new sysctl kern.sched.cpusetsizemin and use it in checks.

Reviewed by:
Differential Revision: https://reviews.freebsd.org/D38112
MFC after: 1 week

(cherry picked from commit 01f74ccd5a0d1a444703e931339709c7de5296b5)

17 months agosched.h: Fix _S macros for better compatibility with glibc.
Dmitry Chagin [Sun, 29 Jan 2023 12:34:10 +0000 (15:34 +0300)]
sched.h: Fix _S macros for better compatibility with glibc.

In e2650af157 was added "_S" macros for compatibility with glibc, but it's still
incompatible as under glibc the macros whose names end with "_S" operate on the
dynamically allocated CPU set(s) whose size is in bytes, not in bits.

While here remove limiting ifdef to non-kernel case.

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

(cherry picked from commit 02f7670ed243498aea96150962c2c9916bab7c98)

17 months agosmp: Drop confusing braces and return statement as panic() is never returns.
Dmitry Chagin [Sun, 29 Jan 2023 12:33:16 +0000 (15:33 +0300)]
smp: Drop confusing braces and return statement as panic() is never returns.

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

(cherry picked from commit 6fdf04a2be9b5b509c5b3d927e087122189ad1fb)

17 months agolinux_common: Fixup .PATH.
Dmitry Chagin [Sat, 28 Jan 2023 17:31:38 +0000 (20:31 +0300)]
linux_common: Fixup .PATH.

Since we have arm64, and awaiting ppc64 Linuxulator, do not include x86 specific
path to the module build for non x86 architectures.

MFC after: 1 week

(cherry picked from commit c19fc5cd9b49115604ce2b89279e3434c7f120cc)

17 months agolinux(4): Convert mount exported flags for statfs system calls.
Dmitry Chagin [Sat, 28 Jan 2023 10:20:27 +0000 (13:20 +0300)]
linux(4): Convert mount exported flags for statfs system calls.

MFC after: 1 week

(cherry picked from commit 9922bccbc9c4effb02b99391088d0405f9c0f75e)

17 months agolinux(4): Rework statfs conversion routine.
Dmitry Chagin [Sat, 28 Jan 2023 10:19:41 +0000 (13:19 +0300)]
linux(4): Rework statfs conversion routine.

Rework the routines to convert a native statfs structure (with fixed-size 64-bit
counters) to a Linux statfs structure (with long-sized counters) for 32-bit apps.

Instead of following Linux and return an EOVERFLOW error from statfs() family of
syscalls when actual fs stat value(s) are large enough to not fit into 32 bits,
apply scale logics used by FreeBSD to convert a 5.x statfs structure to a 4.x
statfs structure.

For more details see cc479dda.

Tested by: glebius
MFC after: 1 week

(cherry picked from commit 953688e823a67c3e9c0096252c33b1e7ecf9a095)

17 months agobsd-family-tree: add DragonFly 6.4.0
Sergey A. Osokin [Thu, 5 Jan 2023 21:36:57 +0000 (16:36 -0500)]
bsd-family-tree: add DragonFly 6.4.0

MFC after: 3 days

(cherry picked from commit c47015fafa4836d881977607c4de86f444ae8f14)

17 months agoman(1): Support zstd compressed manpages using zstdcat
Cameron Katri [Mon, 30 Jan 2023 18:11:14 +0000 (13:11 -0500)]
man(1): Support zstd compressed manpages using zstdcat

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

(cherry picked from commit c8abb673a57587fdf9de2d5bd4d3d1f54dfedc19)

17 months agobridge: Fix whitespace
Mark Johnston [Tue, 24 Jan 2023 16:00:56 +0000 (11:00 -0500)]
bridge: Fix whitespace

No functional change intended.

MFC after: 1 week

(cherry picked from commit 92b7d1db9291f11fa56e2c88f70149f319e31622)

17 months agorelease: Don't install ubldr.bin
Warner Losh [Mon, 7 Feb 2022 20:16:15 +0000 (13:16 -0700)]
release: Don't install ubldr.bin

ubldr.bin was obsoleted by our uboot ports last year, so this is
completely unused in the default config (some customers still use
it, but that's not relevant to this script). Don't copy it at all
since it won't be used for re@ produced images.

Sponsored by: Netflix
Reviewed by: kevans, gjb (re@)
Differential Revision: https://reviews.freebsd.org/D34192

(cherry picked from commit 4e46c6fb35b3d5803f10c5edb5dabaf3cc308517)

17 months agorelease: Remove C-like string comparison operator
Jose Luis Duran [Sun, 20 Jun 2021 00:00:19 +0000 (21:00 -0300)]
release: Remove C-like string comparison operator

Per [(1), i.e. test(1), the string comparison operator should be `=`,
not `==` in sh(1) scripts.

No functional change. FreeBSD's test accepts `==` as an alias for `=`
for compatibility with gnu test's `==` extension.

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

(cherry picked from commit 3f197b101f71ee4f4949c53bf330f61b43749ce9)

17 months agosound: add patch for Lenovo Legion 5 Intel
Nuno Teixeira [Fri, 16 Sep 2022 13:29:30 +0000 (14:29 +0100)]
sound: add patch for Lenovo Legion 5 Intel

Laptop Legion Lenovo 5 15MH05 (Intel)

Patch to fix the sound on this machine.
It requires sending the speaker and the headphone jack to the same nid.

PR: 265632
Approved by: emaste
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D36511

(cherry picked from commit b44869cba1b391931b831135a9cefcc6ca635103)

17 months agozfs: fix mounting snapshots in .zfs/snapshot as a regular user
Martin Matuska [Sat, 4 Feb 2023 18:39:12 +0000 (19:39 +0100)]
zfs: fix mounting snapshots in .zfs/snapshot as a regular user

This is a cherry-pick from vendor/openzfs/master resulting
in a direct commit to stable/13

The cherry-pick to branch zfs-2.1-release has been proposed upstream.

Vendor pull requeset merges:
  #13758 Allow mounting snapshots in .zfs/snapshot as a regular user
  #14218 Bugfix: Avoid a null pointer dereference in zfs_mount() on FreeBSD

PR: 260160

(cherry picked from commit 595d3ac2ed61331124feda2cf5787c3dd4c7ae09)
(cherry picked from commit d27a00283faf4ec2b997ff2376dee4a080e1ca7b)

17 months agoiwm(4), iwmfw(4): mention iwm7265Dfw
Piotr Kubaj [Sat, 4 Feb 2023 13:12:56 +0000 (14:12 +0100)]
iwm(4), iwmfw(4): mention iwm7265Dfw

Correct documentation by mentioning iwm7265Dfw.

PR: 234584
Differential review: https://reviews.freebsd.org/D38374
Approved by: erj

(cherry picked from commit 29fa34aadbd3d93343573220a521caa0c248682d)

17 months agoetcupdate: Chase test case after pwd_mkdb(8) no longer copies comments.
Xin LI [Mon, 30 Jan 2023 04:40:58 +0000 (20:40 -0800)]
etcupdate: Chase test case after pwd_mkdb(8) no longer copies comments.

(cherry picked from commit 4bbf45cf561012da0eb10afe14d4da841add84f5)

17 months agopwd_mkdb(8): Don't copy comments from /etc/master.passwd to /etc/passwd.
Andre Albsmeier [Thu, 11 Mar 2010 10:53:47 +0000 (11:53 +0100)]
pwd_mkdb(8): Don't copy comments from /etc/master.passwd to /etc/passwd.

The intention of /etc/passwd was to support legacy applications that are
not yet converted to use modern API like getpwent(3). Comments are not
defined in the legacy format, so copying them could break these
applications. Plus, it could leak sensitive information (e.g. encrypted
form of password of an user that was commented out instead of deleted
or disabled).

PR: bin/144652
(cherry picked from commit 0deb25bd9d6d2cdd4aa22f0e2754161e35f3785c)

17 months agosbin/devfs: Correct usage
Enji Cooper [Sat, 30 Apr 2022 17:54:43 +0000 (10:54 -0700)]
sbin/devfs: Correct usage

The -s applies to rule keyword only and it follows the rule keyword.

PR: 263289
Submitted by: Yuichiro NAITO <naito.yuichiro@gmail.com>
Reviewed by: ngie
Fixes: c3e412c08333 sbin/devfs: clarify usage
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34934

(cherry picked from commit f9f42a709b2b3f8c8d3de517f301d4ccb33e7b16)

17 months agorelease.7: Correct a variable name
Mark Johnston [Fri, 27 Jan 2023 19:00:23 +0000 (14:00 -0500)]
release.7: Correct a variable name

MFC after: 1 week

(cherry picked from commit 96bc40f4dfae4bb40b2512436f58cd2183e42886)

17 months agoDisable sandboxing when building with WITHOUT_CAPSICUM.
Xin LI [Sat, 28 Jan 2023 18:53:47 +0000 (10:53 -0800)]
Disable sandboxing when building with WITHOUT_CAPSICUM.

PR: bin/269185

(cherry picked from commit 8f02c0d15669949bb3b5086800aaf11a65e4c871)

17 months agostat(1): Do not pass S_IFBLK to devname unconditionally
Alexander Naumochkin [Sat, 28 Jan 2023 13:31:39 +0000 (15:31 +0200)]
stat(1): Do not pass S_IFBLK to devname unconditionally

PR: 269190

(cherry picked from commit 050e4bca94e907c046e9ed63f90b5dd0e49fb405)

17 months agodevname(3): apply S_ISBLK() to type, not dev_t
Alexander Naumochkin [Sat, 28 Jan 2023 13:22:50 +0000 (15:22 +0200)]
devname(3): apply S_ISBLK() to type, not dev_t

PR: 269190

(cherry picked from commit 0311fe403d35f6241fa94104c4b92c9d73214cbc)

17 months agoamd64: do not enable PKRU if user disabled saving PKRU register in xsave mask
Konstantin Belousov [Fri, 27 Jan 2023 10:45:02 +0000 (12:45 +0200)]
amd64: do not enable PKRU if user disabled saving PKRU register in xsave mask

(cherry picked from commit 153643a5bc8ac3b1d47fc8e4de18d8c8a59817da)

17 months agox86: add more definitions for XCR0 bits
Konstantin Belousov [Fri, 27 Jan 2023 10:43:56 +0000 (12:43 +0200)]
x86: add more definitions for XCR0 bits

(cherry picked from commit 11989314dc4a62c82193b6727d33625f2269e511)

17 months agocxgbe tom: Force unsigned modulus for queue indices.
John Baldwin [Wed, 4 May 2022 22:59:44 +0000 (15:59 -0700)]
cxgbe tom: Force unsigned modulus for queue indices.

The final transmit and receive queue indices need to be positive
values.  However, since txq_idx and rxq_idx are signed (to permit
using -1 to as a marker for uninitialized values), using %= with
another integer type (vi->nofld[tr]xq) yielded a sign-extended modulus
value.  This resulted in negative queue indices and a buffer underrun
when arc4random() returned a value with the sign bit set.  Use a
temporary unsigned variable to hold the "raw" queue index to force
unsigned modulus.

This worked previously because the modulus was previously applied
directly to the return value of arc4random() which is unsigned before
the result was assigned to txq_idx and rxq_idx.

Discussed with: np
Fixes: db28d4a0cd1c cxgbe/t4_tom: Support for round-robin selection of offload queues.
Sponsored by: Chelsio Communications

(cherry picked from commit b483b6b256b2957f857db9092ef3c420a5143972)

17 months agofb: Add a default getinfo method
Emmanuel Vadot [Tue, 21 Jun 2022 13:52:49 +0000 (15:52 +0200)]
fb: Add a default getinfo method

fb_getinfo is badly designed as it returns either the
info if the driver have the method or ENXIO via the kobj stuff
if the driver doesn't have it.
Add a default method that returns NULL as the code already checks this
and it avoid changing the interface.
None of the drm drivers supported have this method and it sometimes
fails and panic when loading them (for now only usb-c docks seems to be
affected).

MFC after: 3 days
Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 3cbf6518d6eea08e0fbe6d7c609debac5ab31992)

17 months agousb/dwc3: Only force USB2 based on the PHY register and IP version
Emmanuel Vadot [Tue, 15 Nov 2022 12:54:49 +0000 (13:54 +0100)]
usb/dwc3: Only force USB2 based on the PHY register and IP version

We shouldn't force USB2 only based on if we have an external PHY.
The internal PHY register tell us what link speed we can acheive
and we need to force USB2 only if it cannot do USB3.
This is only available after revision 0x290A of the dwc3 IP.

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D37394
Fixed: 1331c0f44b6a ("Add support for RockChip RK356X to DWC3 driver.")
Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit d47f5f2886f082281ae6f97dd5fe9440ad31e6d5)

17 months agolinuxkpi: Move cpu_relax out of ifdef for x86
Emmanuel Vadot [Thu, 10 Nov 2022 11:50:51 +0000 (12:50 +0100)]
linuxkpi: Move cpu_relax out of ifdef for x86

It's needed by drm-kmod and this allow building on arm64 and powerpc.

Reported by: jhibbits
Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit ee247fc1e93e6d37cf509a640a7d273616056f5d)

17 months agousb/dwc3: Use more () for macros variables
Emmanuel Vadot [Wed, 16 Nov 2022 10:57:56 +0000 (11:57 +0100)]
usb/dwc3: Use more () for macros variables

Suggested by: andrew
Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 0860c27fe8cf144cb10f8916a0b8fe5ad57a3d9e)

17 months agousb/dwc3: Read the full IDs/version
Emmanuel Vadot [Tue, 15 Nov 2022 10:22:23 +0000 (11:22 +0100)]
usb/dwc3: Read the full IDs/version

We need to enable some quirks based on the version so read it.

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D37393
Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 0e87f58bd7e566d2b7d50cf0ab636e745af591fc)

17 months agodwc3: Handle optional clocks
Emmanuel Vadot [Tue, 15 Nov 2022 08:58:30 +0000 (09:58 +0100)]
dwc3: Handle optional clocks

Usually dwc3 needs a glue node that contain the SoC specific clocks/resets.
For some reason the RK3328 DTS doesn't have this glue node and the clocks
are specified in the dwc3 node directly.
The bindings says that it is allowed but doesn't specified some strict names
for them.
Add a specific case for RK3328 based on the compatible string.

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D37392
Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 0a5f342aa5a0ddd5d173bdfc856c6a81d1c12c6c)

17 months agoAdd support for RockChip RK356X to DWC3 driver.
Søren Schmidt [Tue, 16 Aug 2022 12:24:44 +0000 (12:24 +0000)]
Add support for RockChip RK356X to DWC3 driver.
For RK356x platform, we can set bit 26 of DWC3_GUCTL1 register
for usb 2.0 device.

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

(cherry picked from commit 1331c0f44b6a3b6dec1fbd638103fa15bffac5d8)

17 months agolinuxkpi: seq_read: Fix off by one error
Emmanuel Vadot [Wed, 21 Dec 2022 11:42:24 +0000 (12:42 +0100)]
linuxkpi: seq_read: Fix off by one error

strscpy needs the buffer length not the string length (so including
the '\0').

Reviewed by: bz
Fixes: f697b9432d9c ("linuxkpi: drm-kmod debugfs support")
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D37771

(cherry picked from commit ccd8c4488afb15c2b866b58d5aa9dd994f300f95)

17 months agolinuxkpi: Fix style for dma_map_sgtable
Emmanuel Vadot [Tue, 6 Dec 2022 15:52:16 +0000 (16:52 +0100)]
linuxkpi: Fix style for dma_map_sgtable

Reported by: bz
Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 72621b543e984a2074e1945adc26b49ac04af7e8)

17 months agolinuxkpi: Fix return value of dma_map_sgtable
Austin Shafer [Tue, 6 Dec 2022 15:25:53 +0000 (16:25 +0100)]
linuxkpi: Fix return value of dma_map_sgtable

dma_map_sgtable internally uses the dma_map_sg_attrs helper. The problem is
that dma_map_sg_attrs returns the number of entries mapped, whereas
dma_map_sgtable returns nonzero on failure. This leads to dma_map_sgtable
returning non-zero-but-positive values which tricks other areas of the stack
into thinking nents is a valid pointer.

This checks if nents is valid and returns zero if so, updating the nents field
in sgt. This fixes PRIME render offload with nvidia-drm.

Fixes: 9202c95f47c2 ("linuxkpi: Add dma_{un,}map_sgtable")
(cherry picked from commit 4085bde9fa2ea7ebe861a2e4a07312aac00a26fc)

17 months agorc.d: Put resolv script in FreeBSD-resolvconf
Emmanuel Vadot [Fri, 28 Oct 2022 07:33:38 +0000 (09:33 +0200)]
rc.d: Put resolv script in FreeBSD-resolvconf

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

(cherry picked from commit a6a21bbedc744bae9ce7b20948b53a6d4033adcf)

17 months agorc.d: Put dhclient script in FreeBSD-dhclient
Emmanuel Vadot [Fri, 28 Oct 2022 07:32:27 +0000 (09:32 +0200)]
rc.d: Put dhclient script in FreeBSD-dhclient

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

(cherry picked from commit 81b18bea0935c33fc6aafb084ca72fd427d8364a)

17 months agorc.d: Put devmatch script in FreeBSD-devmatch
Emmanuel Vadot [Fri, 28 Oct 2022 07:31:59 +0000 (09:31 +0200)]
rc.d: Put devmatch script in FreeBSD-devmatch

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

(cherry picked from commit d8799160c2db46ea0caa3752838808c3126e2a6c)

17 months agorc.d: Put devd script in FreeBSD-devd package
Emmanuel Vadot [Fri, 28 Oct 2022 07:31:17 +0000 (09:31 +0200)]
rc.d: Put devd script in FreeBSD-devd package

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

(cherry picked from commit f0435696920bd18d46a31c69105d8cbaa7d479e5)

17 months agopkgbase: share rules for packages without pkgdeps
Ed Maste [Fri, 6 Jan 2023 14:44:54 +0000 (09:44 -0500)]
pkgbase: share rules for packages without pkgdeps

Have liby and libcompat share *-dev and *-lib32_dev rules, and share
*-man rule for libcompat and libelftc.  Also correct name substitution
and description for man rules.

Reviewed by: manu
Fixes: 5391bcf0f7e4 ("pkgbase: Do not record dependency on...")
Fixes: 65fa2fd23b9d ("pkgbase: Do record dependency on non-...")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37964

(cherry picked from commit 0eccd618a36aed1fb33d2f712e6624fdf111406d)

17 months agopkgbase: Do record dependency on non-existent libelftc package
Emmanuel Vadot [Thu, 5 Jan 2023 22:38:14 +0000 (23:38 +0100)]
pkgbase: Do record dependency on non-existent libelftc package

libelftc is an internal lib so it's never installed.
When building with WITH_MANSPLITPKG=yes the libelftc-man package
will have a dependecy on a non-existent libelftc package.

Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 65fa2fd23b9de1dd81a0a5fafc1d69757792edac)

17 months agopkgbase: Do not record dependency on non-existent libcompat package
Emmanuel Vadot [Thu, 5 Jan 2023 22:27:22 +0000 (23:27 +0100)]
pkgbase: Do not record dependency on non-existent libcompat package

libcompat only provides a .a which is put in the -dev package.
Add a special record for it so we do not require a dependency on the
non-existent package FreeBSD-libcompat.

Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 5391bcf0f7e4f9021b56d050cbd798940858d9c0)

17 months agopkgbase: Stop adding FreeBSD-runtime as a dep for every package
Emmanuel Vadot [Thu, 8 Dec 2022 10:55:39 +0000 (11:55 +0100)]
pkgbase: Stop adding FreeBSD-runtime as a dep for every package

shlib_required/provided is enough for the dependencies and this also
causes problems for packages like rescue which shouldn't depend on runtime
at all.

PR: 268063
Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 6933abc3e4bd316c1a10862d7dfc0688765fb723)

17 months agopkgbase: Put less in FreeBSD-runtime
Emmanuel Vadot [Tue, 16 Aug 2022 19:25:38 +0000 (21:25 +0200)]
pkgbase: Put less in FreeBSD-runtime

Useful to have a pager in it.

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

(cherry picked from commit 069ebe6fbae56a70058d24db4d6e310f1f916733)

17 months agopkgbase: Create a FreeBSD-games package
Emmanuel Vadot [Mon, 8 Aug 2022 17:56:50 +0000 (19:56 +0200)]
pkgbase: Create a FreeBSD-games package

And put :
- pom
- caesar
- grdc

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

(cherry picked from commit feec04b3554483ab8e6998200117949ed9ffed61)

17 months agopkgbase: Put devmatch in its own package
Emmanuel Vadot [Fri, 22 Jul 2022 20:30:11 +0000 (22:30 +0200)]
pkgbase: Put devmatch in its own package

devmatch is useful on standalone machine but not on jails.
Put devinfo(8) and libdevinfo there too.

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

(cherry picked from commit e7a5a60ed57d1eeb638f4824479b2ab3663eb8a1)

17 months agopkgbase: Put devd in its own package
Emmanuel Vadot [Fri, 22 Jul 2022 12:46:30 +0000 (14:46 +0200)]
pkgbase: Put devd in its own package

It's not that useful in a jail or in a mdroot.

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

(cherry picked from commit ea0850e4be1a027ba00a53f630bddd8cebebce1d)

17 months agopkgbase: Put ufs related tools and lib in their own package
Emmanuel Vadot [Fri, 22 Jul 2022 11:22:29 +0000 (13:22 +0200)]
pkgbase: Put ufs related tools and lib in their own package

It's not really useful in a jail or in a mdroot or even if a users
wants to do a full zfs machine.

Reviewed by: mckusick
Differential Revision: https://reviews.freebsd.org/D36227

(cherry picked from commit a7ffc948497e04354fa512915f7e383ee04ae269)

17 months agopkgbase: Put libwrap in FreeBSD-tcpd package
Emmanuel Vadot [Fri, 22 Jul 2022 09:06:05 +0000 (11:06 +0200)]
pkgbase: Put libwrap in FreeBSD-tcpd package

It belongs there with the tcp wrapper utilities

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

(cherry picked from commit a099694ecdbdc50445487c5b1ebebdc13c2f0b43)

17 months agopkgbase: Put zfs utilities and lib in their own package
Emmanuel Vadot [Fri, 22 Jul 2022 08:43:39 +0000 (10:43 +0200)]
pkgbase: Put zfs utilities and lib in their own package

It is useful to have zfs utilities and lib in a separate package as
it allow users to create image that can support ZFS (i.e. not with
WITHOUT_ZFS in src.conf set) without bloating the default image with
all zfs tools (for example for jails).

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

(cherry picked from commit a71ea7bea0d2a8ba86373377c3c1443acbeab5d2)

17 months agopkgbase: Put geom utilities in their own package
Emmanuel Vadot [Fri, 22 Jul 2022 08:19:07 +0000 (10:19 +0200)]
pkgbase: Put geom utilities in their own package

For most users it's not needed to boot and they are also
available in the FreeBSD-rescue package in case an update
break and FreeBSD-geom package isn't updated correctly.

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

(cherry picked from commit 0bf688786f7d5508b43b50c62f50f022e33b1352)

17 months agopkgbase: Put resolvconf in its own package
Emmanuel Vadot [Fri, 22 Jul 2022 08:01:59 +0000 (10:01 +0200)]
pkgbase: Put resolvconf in its own package

It doesn't really make sense to have it in runtime and let's not
bloat utilities more.

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

(cherry picked from commit 6987b552ddad55a0392622f6598e4dd6f983d287)

17 months agopkgbase: Put dhclient in its own package
Emmanuel Vadot [Fri, 22 Jul 2022 08:00:03 +0000 (10:00 +0200)]
pkgbase: Put dhclient in its own package

It doesn't really make sense to have it in runtime and let's not
bloat utilities more.

Reviewed by: emaste, imp
Differential Revision: https://reviews.freebsd.org/D36222

(cherry picked from commit ab4bd66752fb8aca307a7a4b4523a1c44a21fc45)

17 months agopkgbase: Put nvmecontrol in its own package
Emmanuel Vadot [Fri, 22 Jul 2022 07:58:11 +0000 (09:58 +0200)]
pkgbase: Put nvmecontrol in its own package

It doesn't really make sense to have it in runtime and let's not
bloat utilities more.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D36221

(cherry picked from commit 5f9db65d8af0b8419ba71749f15ee06d636fb9c4)

17 months agopkgbase: Put accounting utilities in the acct package
Emmanuel Vadot [Thu, 21 Jul 2022 15:09:34 +0000 (17:09 +0200)]
pkgbase: Put accounting utilities in the acct package

(cherry picked from commit 0c6b2a91795167203f442a84aac2570397226e56)

17 months agolib: Gate libfigpar under MK_DIALOG
Emmanuel Vadot [Thu, 21 Jul 2022 14:52:24 +0000 (16:52 +0200)]
lib: Gate libfigpar under MK_DIALOG

libfigpar is only used by dpv and dpv isn't built if WITHOUT_DIALOG
is set.

(cherry picked from commit 15d781b5323315afaed06fb2f2499f9164e1ef86)

17 months agopkgbase: Put mount_nfs in the FreeBSD-nfs package
Emmanuel Vadot [Fri, 22 Jul 2022 11:23:14 +0000 (13:23 +0200)]
pkgbase: Put mount_nfs in the FreeBSD-nfs package

(cherry picked from commit 4efb514b70ba9acdc27026daf3c8c93917ed4fe9)

17 months agopkgbase: mtree: Correctly tag /var/db entries
Emmanuel Vadot [Fri, 22 Jul 2022 09:21:44 +0000 (11:21 +0200)]
pkgbase: mtree: Correctly tag /var/db entries

(cherry picked from commit 1a104a3bf3d23bfe8a1d899f3b668dec7d2f0a27)

17 months agopkgbase: mtree: Correctly tag /var/run entries
Emmanuel Vadot [Fri, 22 Jul 2022 09:14:40 +0000 (11:14 +0200)]
pkgbase: mtree: Correctly tag /var/run entries

(cherry picked from commit d2888f5ccf7dc61a31ceb981d488f648795aa878)

17 months agoumcs(4): Fix a typo in a kernel message
Gordon Bergling [Sat, 28 Jan 2023 14:45:52 +0000 (15:45 +0100)]
umcs(4): Fix a typo in a kernel message

- s/confguration/configuration/
- s/nornal/normal/

Obtained from: NetBSD

(cherry picked from commit ee27834d740df50b7e5834a2075b94ae3c15d81a)

17 months agopciconf(8): Decode ACS extended capability.
Navdeep Parhar [Fri, 4 Nov 2022 19:30:09 +0000 (12:30 -0700)]
pciconf(8): Decode ACS extended capability.

Sponsored by: Chelsio Communications
Reviewed by: kib@
Differential Revision: https://reviews.freebsd.org/D37271

(cherry picked from commit 118cfb829f355a4545f079f12bab5ea8e41fe214)

17 months agopcireg.h: Add values for ACS PCIe Extended capability.
Navdeep Parhar [Fri, 4 Nov 2022 19:22:11 +0000 (12:22 -0700)]
pcireg.h: Add values for ACS PCIe Extended capability.

These values come from section 7.7.11 ("ACS Extended Capability") of the
PCI Express Base Specification Revision 6.0, dated 16 Dec 2021.

Sponsored by: Chelsio Communications
Reviewed by: kib@
Differential Revision: https://reviews.freebsd.org/D37270

(cherry picked from commit b2700160cc4f5ff7d64926ea55a214b5ac970cf5)

17 months agocxgbe/cxgbei: Do not validate the hardware iSCSI tag mask.
Navdeep Parhar [Wed, 5 Oct 2022 18:05:12 +0000 (11:05 -0700)]
cxgbe/cxgbei: Do not validate the hardware iSCSI tag mask.

This was added in 7cba15b16eb2 in 2016 and firmwares at that time were
already setting up the iSCSI tag mask properly.  Since then it has also
become possible to split the iSCSI region between multiple PCIE PFs but
the driver's calculation takes only its own PF's allocation into account
and that means this code is incorrect and not just a harmless no-op.

Sponsored by: Chelsio Communications

(cherry picked from commit 661faa1f77c0fa9d28d60d71087820aaaaee8b1b)

17 months agocxgbe/tom: Fix assertions in the code that maintains TCB history.
Navdeep Parhar [Thu, 29 Sep 2022 02:56:14 +0000 (19:56 -0700)]
cxgbe/tom: Fix assertions in the code that maintains TCB history.

The tids used for TOE connections start from tid_base, not 0.

Sponsored by: Chelsio Communications

(cherry picked from commit 8d2c13931b7e4897ca5d73af57f4cf35e440ec54)

17 months agocxgbe(4): Add knob to control congestion behavior for TOE queues.
Navdeep Parhar [Fri, 9 Sep 2022 22:21:18 +0000 (15:21 -0700)]
cxgbe(4): Add knob to control congestion behavior for TOE queues.

hw.cxgbe.ofld_cong_drop works just like hw.cxgbe.cong_drop but for TOE
rx queues.

Sponsored by: Chelsio Communications

(cherry picked from commit 998eb37aca6670b1ecbb7b5cad2b5b2d85d744b8)

17 months agocxgbe(4): Add another setting to the knob that controls congestion.
Navdeep Parhar [Fri, 9 Sep 2022 22:16:22 +0000 (15:16 -0700)]
cxgbe(4): Add another setting to the knob that controls congestion.

hw.cxgbe.cong_drop=2 will generate backpressure *and* drop frames for
queues that are congested.

Sponsored by: Chelsio Communications

(cherry picked from commit df275ae5090048fb7a8c082d509fae57e891957a)

17 months agocxgbe(4): Specify the ingress queue's type when creating it.
Navdeep Parhar [Thu, 8 Sep 2022 18:47:38 +0000 (11:47 -0700)]
cxgbe(4): Specify the ingress queue's type when creating it.

The firmware takes the type into account when setting up the PCIe
channel for the queue.

Sponsored by: Chelsio Communications

(cherry picked from commit c387ff0045d620d60ed8250360d4196a4c962a13)

17 months agocxgbetool: remove unnecessary vertical whitespace.
Navdeep Parhar [Fri, 19 Aug 2022 19:46:32 +0000 (12:46 -0700)]
cxgbetool: remove unnecessary vertical whitespace.

No functional change.

(cherry picked from commit f6cc21e8e14344ca698c19a2931c04867249dd60)

17 months agocxgbe(4): Add a knob to request that clocks be gated on suspend.
Navdeep Parhar [Tue, 16 Aug 2022 07:48:21 +0000 (00:48 -0700)]
cxgbe(4): Add a knob to request that clocks be gated on suspend.

Sponsored by: Chelsio Communications

(cherry picked from commit a8dc67388ae11a3bbb0175acb3ef9f6478d0c233)