]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 months agoif_wg: use proper barriers around pkt->p_state
Kyle Evans [Fri, 15 Mar 2024 01:19:18 +0000 (20:19 -0500)]
if_wg: use proper barriers around pkt->p_state

Without appropriate load-synchronization to pair with store barriers in
wg_encrypt() and wg_decrypt(), the compiler and hardware are often
allowed to reorder these loads in wg_deliver_out() and wg_deliver_in()
such that we end up with a garbage or intermediate mbuf that we try to
pass on.  The issue is particularly prevalent with the weaker
memory models of !x86 platforms.

Switch from the big-hammer wmb() to more explicit acq/rel atomics to
both make it obvious what we're syncing up with, and to avoid somewhat
hefty fences on platforms that don't necessarily need this.

With this patch, my dual-iperf3 reproducer is dramatically more stable
than it is without on aarch64.

PR: 264115
MFC after: 1 week
Reviewed by: andrew, zlei
Differential Revision: https://reviews.freebsd.org/D44283

2 months agovfs_vnops.c: Use va_bytes >= va_size hint to avoid SEEK_DATA/SEEKHOLE
Rick Macklem [Fri, 15 Mar 2024 00:35:32 +0000 (17:35 -0700)]
vfs_vnops.c: Use va_bytes >= va_size hint to avoid SEEK_DATA/SEEKHOLE

vn_generic_copy_file_range() tries to maintain holes
in file ranges being copied, using SEEK_DATA/SEEK_HOLE
where possible,

Unfortunately SEEK_DATA/SEEK_HOLE operations can take
a long time under certain circumstances.
Although it is not currently possible to know if a file has
unallocated data regions, the case where va_bytes >= va_size
is a strong hint that there are no unallocated data regions.
This hint does not work well for file systems doing compression,
but since it is only a hint, it is still useful.

For the case of va_bytes >= va_size, avoid doing SEEK_DATA/SEEK_HOLE.

Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D44509

2 months agoOpenBSM: Remove $FreeSBD$ tags from the configuration files
Gordon Bergling [Thu, 14 Mar 2024 06:02:44 +0000 (07:02 +0100)]
OpenBSM: Remove $FreeSBD$ tags from the configuration files

In e61dc6cac4001f1abfc48ee27e4e623c2c044fa8 the configuration
files were taken off the vendor branch to help mergemaster
comparing them.

Since mergemaster will be deprecated and $FreeBSD$ tags aren't
used anymore, remove them.

While here, sync audit_filter with upstream commit 5e6da76 (typo).

Reviewed by: imp
Approved by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D44318

2 months agoUpdate dirdeps.mk et al
Simon J. Gerraty [Thu, 14 Mar 2024 05:51:08 +0000 (22:51 -0700)]
Update dirdeps.mk et al

bmake-20240309 includes updates to dirdeps and meta mode makefiles

2 months agobmake Makefile.config
Simon J. Gerraty [Thu, 14 Mar 2024 05:08:29 +0000 (22:08 -0700)]
bmake Makefile.config

2 months agobmake updated config.h
Simon J. Gerraty [Thu, 14 Mar 2024 05:03:50 +0000 (22:03 -0700)]
bmake updated config.h

2 months agoMerge bmake-20240309
Simon J. Gerraty [Thu, 14 Mar 2024 04:54:47 +0000 (21:54 -0700)]
Merge bmake-20240309

Merge commit '368b06ce6b0135d6de13f7265f6dcbaeb791b3bb'

2 months agorack: don't define TCPOUTFLAGS
Gleb Smirnoff [Thu, 14 Mar 2024 04:07:59 +0000 (21:07 -0700)]
rack: don't define TCPOUTFLAGS

as the code doesn't use tcp_outflags.  This should fix gcc builds.

2 months agoNeed a blank line after brief summary
Simon J. Gerraty [Thu, 14 Mar 2024 02:16:35 +0000 (19:16 -0700)]
Need a blank line after brief summary

2 months agoImport bmake-20240309
Simon J. Gerraty [Thu, 14 Mar 2024 02:14:41 +0000 (19:14 -0700)]
Import bmake-20240309

Intersting/relevant changes since bmake-20240108

ChangeLog since bmake-20240108

2024-03-10  Simon J Gerraty  <sjg@beast.crufty.net>

* boot-strap: tests can take a long time; use a cookie to
skip them if bmake has not been updated since tests last
ran successfully.

* Makefile: Cygwin handles MANTARGET man

* unit-tests/Makefile: set BROKEN_TESTS for Cygwin

2024-03-09  Simon J Gerraty  <sjg@beast.crufty.net>

* VERSION (_MAKE_VERSION): 20240309
Merge with NetBSD make, pick up
o set .ERROR_EXIT to the exit status of .ERROR_TARGET
this allows a .ERROR target to ignore the case of
.ERROR_EXIT==6 which just means that the build actually
failed somewhere else.

2024-03-04  Simon J Gerraty  <sjg@beast.crufty.net>

* VERSION (_MAKE_VERSION): 20240303

* var.c: on IRIX we need both inttypes.h and stdint.h

2024-03-01  Simon J Gerraty  <sjg@beast.crufty.net>

* VERSION (_MAKE_VERSION): 20240301
Merge with NetBSD make, pick up
o export variables with value from target scope
when appropriate.

2024-02-12  Simon J Gerraty  <sjg@beast.crufty.net>

* VERSION (_MAKE_VERSION): 20240212
Merge with NetBSD make, pick up
o remove unneeded conditional-compilation toggles
INCLUDES, LIBRARIES, POSIX, SYSVINCLUDE, SYSVVARSUB,
GMAKEEXPORT NO_REGEX and SUNSHCMD

* configure.in: add check for regex.h

* var.c: replace use of NO_REGEX with HAVE_REGEX_H

2024-02-04  Simon J Gerraty  <sjg@beast.crufty.net>

* VERSION (_MAKE_VERSION): 20240204
Merge with NetBSD make, pick up
o var.c: fix some lint (-dL) mode parsing issues

2024-02-02  Simon J Gerraty  <sjg@beast.crufty.net>

* VERSION: (_MAKE_VERSION): 20240202
Merge with NetBSD make, pick up
o make.1: note that arg to :D and :U can be empty
o var.c: $$ is not a parse error when .MAKE.SAVE_DOLLARS=no

mk/ChangeLog since bmake-20240108

2024-03-09  Simon J Gerraty  <sjg@beast.crufty.net>

* install-mk (MK_VERSION): 20240309

* meta.sys.mk: _metaError: if .ERROR_EXIT == 6, we do not
want to save the .ERROR_META_FILE

2024-02-20  Simon J Gerraty  <sjg@beast.crufty.net>

* install-mk (MK_VERSION): 20240220

* sys.dirdeps.mk, dirdeps-targets.mk, init.mk:
do not set .MAIN: dirdeps in sys.dirdeps.mk
dirdeps-targets.mk will do that for top-level builds
and init.mk will do it for others.
This allows a Makefile which has no need of 'dirdeps' to
set .MAIN for itself and "just work".

2024-02-18  Simon J Gerraty  <sjg@beast.crufty.net>

* bsd.*.mk: for makefiles that get a bsd. symlink,
use _this in  multiple inclusion tags since .PARSEFILE will not
DTRT when such a makefile is included directly by Makefile and
automatically (without bsd. prefix).
Since we cannot guarantee that our sys.mk will be used, we provide
a default _this in each makefile that gets a bsd. prefix such that
the value is the same regardless of bsd. prefix.

* subdir.mk: drop the !target guard on $SUBDIR_TARGETS

2024-02-12  Simon J Gerraty  <sjg@beast.crufty.net>

* install-mk (MK_VERSION): 20240212

* SPDX-License-Identifier: BSD-2-Clause
Add SPDX-License-Identifier to inidicate that I consider
my copyright on any of these makefiles equivalent to BSD-2-Clause

* autoconf.mk: allow for configure.ac as currently recommended

* subdir.mk: support @auto
which is replaced with each subdir that
has a [Mm]akefile.

* subdir.mk: include local.subdir.mk if it exists.

* subdir.mk: rework to handle .WAIT

2024-02-11  Simon J Gerraty  <sjg@beast.crufty.net>

* subdir.mk: _SUBDIRUSE report the target we are entering subdirs for.

2024-02-10  Simon J Gerraty  <sjg@beast.crufty.net>

* prog.mk: treat empty SRCS the same as undefined

2024-02-02  Simon J Gerraty  <sjg@beast.crufty.net>

* Avoid undefined errors in lint (-dL) mode

* man.mk (CMT2DOC_FLAGS): note that -mm does mdoc(7)

2024-01-28  Simon J Gerraty  <sjg@beast.crufty.net>

* install-mk (MK_VERSION): 20240128

* FILES: add ccm.dep.mk for C++ modules
add suffixes.mk for common location for generic SUFFIX rules.

* auto.dep.mk autodep.mk meta.autodep.mk: include ccm.dep.mk
replace OBJ_EXTENSIONS with OBJ_SUFFIXES

* autodep.mk: leverage CXX_SUFFIXES for __depsrcs
and update style (spaces around = etc)

* init.mk: add OBJS_SRCS_FILTER to filter SRCS when
setting OBJS

* meta2deps.py: handle multiple ./ embedded in path better.

2 months agohyperv/hn: Don't return error when setting media to autoselect
Mark Peek [Wed, 13 Mar 2024 23:53:07 +0000 (16:53 -0700)]
hyperv/hn: Don't return error when setting media to autoselect

Setting media to autoselect would always return EOPNOTSUPP.
As autoselect is the only valid media, this change now returns
success instead.

PR: 264253
Reported by: Prakash Shiva <prakashs0234@gmail.com>
Reviewed by: Dexuan Cui <decui microsoft com>, whu
Approved by: whu
MFC after: 2 weeks

2 months agonetinet/tcp_var.h: always define IS_FASTOPEN() for kernel compilation env
Konstantin Belousov [Wed, 13 Mar 2024 11:54:50 +0000 (13:54 +0200)]
netinet/tcp_var.h: always define IS_FASTOPEN() for kernel compilation env

and drop the definition for userspace (which matched TCP_RFC7413) since
it depends on presence of the kernel option.

Reviewed by: glebius, rscheff
Sponsored by: NVIDIA networking
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D44349

2 months agoBump __FreeBSD_version for bus resource API change
John Baldwin [Wed, 13 Mar 2024 22:14:23 +0000 (15:14 -0700)]
Bump __FreeBSD_version for bus resource API change

Specifically, the change to remove redundant rid and type arguments
from bus_* when passing an allocated struct resource.

2 months agonew-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCE
John Baldwin [Wed, 13 Mar 2024 22:05:54 +0000 (15:05 -0700)]
new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCE

The public bus_release_resource() API still accepts both forms, but
the internal kobj method no longer passes the arguments.
Implementations which need the rid or type now use rman_get_rid() or
rman_get_type() to fetch the value from the allocated resource.

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

2 months agonew-bus: Remove the 'rid' and 'type' arguments from BUS_*ACTIVATE_RESOURCE
John Baldwin [Wed, 13 Mar 2024 22:05:54 +0000 (15:05 -0700)]
new-bus: Remove the 'rid' and 'type' arguments from BUS_*ACTIVATE_RESOURCE

The public bus_activate/deactivate_resource() API still accepts both
forms, but the internal kobj methods no longer pass the arguments.
Implementations which need the rid or type now use rman_get_rid() or
rman_get_type() to fetch the value from the allocated resource.

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

2 months agonew-bus: Remove the 'type' argument from BUS_MAP/UNMAP_RESOURCE
John Baldwin [Wed, 13 Mar 2024 22:05:54 +0000 (15:05 -0700)]
new-bus: Remove the 'type' argument from BUS_MAP/UNMAP_RESOURCE

The public bus_map/unmap_resource() API still accepts both forms, but
the internal kobj methods no longer pass the argument.
Implementations which need the type now use rman_get_type() to fetch
the value from the allocated resource.

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

2 months agonew-bus: Remove the 'type' argument from BUS_ADJUST_RESOURCE
John Baldwin [Wed, 13 Mar 2024 22:05:54 +0000 (15:05 -0700)]
new-bus: Remove the 'type' argument from BUS_ADJUST_RESOURCE

The public bus_adjust_resource() API still accepts both forms, but the
internal kobj method no longer passes the argument.  Implementations
which need the type now use rman_get_type() to fetch the value from
the allocated resource.

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

2 months agopcib: Use rman_get_type in internal functions
John Baldwin [Wed, 13 Mar 2024 22:05:54 +0000 (15:05 -0700)]
pcib: Use rman_get_type in internal functions

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

2 months agobhnd: Use rman_get_type in bhndb_find_resource_limits
John Baldwin [Wed, 13 Mar 2024 22:05:53 +0000 (15:05 -0700)]
bhnd: Use rman_get_type in bhndb_find_resource_limits

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

2 months agoacpi: Use rman_get_type in acpi_is_resource_managed
John Baldwin [Wed, 13 Mar 2024 22:05:53 +0000 (15:05 -0700)]
acpi: Use rman_get_type in acpi_is_resource_managed

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

2 months agonew-bus: Introduce a simpler bus API for managing resources
John Baldwin [Wed, 13 Mar 2024 22:05:53 +0000 (15:05 -0700)]
new-bus: Introduce a simpler bus API for managing resources

Remove the 'type' and 'rid' arguments from the wrapper bus API
functions (e.g. bus_release_resource) that accept a struct resource.
The "new" versions extract the 'type' and/or 'rid' from the passed in
resource object via rman_get_type and rman_get_rid.

This commit adds the new API as functions with a _new suffix.  Wrapper
macros choose between the old and new functions based on the number of
arguments provided to the macro.  This commit does not change the ABI
but can be safely MFCd to older branches so long as older kernels use
rman_set_type when allocating resources.

Future commits will push the removal of these extraneous arguments
through the bus implementation.

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

2 months agosys: Set the type of allocated bus resources
John Baldwin [Wed, 13 Mar 2024 22:05:53 +0000 (15:05 -0700)]
sys: Set the type of allocated bus resources

Use rman_set_type to set the type of allocated resources everywhere
rman_set_rid is currently called.

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

2 months agorman: Add rman_get/set_type
John Baldwin [Wed, 13 Mar 2024 22:05:53 +0000 (15:05 -0700)]
rman: Add rman_get/set_type

This permits associating a resource type (e.g. SYS_RES_MEMORY) with a
struct resource.

I considered adding a new field to struct rman to store the type and
only providing rman_get_type as an accessor.  However, changing
'struct rman' is an ABI breakage.  I might revisit this in main, but
the current approach is MFC'able.

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

2 months agoktls: deep copy tls_enable struct for in-kernel tcp consumers
Richard Scheffenegger [Wed, 13 Mar 2024 11:35:51 +0000 (12:35 +0100)]
ktls: deep copy tls_enable struct for in-kernel tcp consumers

Doing a deep copy of the keys early allows users of the
tls_enable structure to assume kernel memory.
This enables the socket options to be set by kernel threads.

Reviewed By: #transport, tuexen, jhb, rrs
Sponsored by: NetApp, Inc.
X-NetApp-PR: #79
Differential Revision: https://reviews.freebsd.org/D44250

2 months agolibc/softfloat: we don't export _fp[gs]et* symbols
Brooks Davis [Wed, 13 Mar 2024 20:34:46 +0000 (20:34 +0000)]
libc/softfloat: we don't export _fp[gs]et* symbols

Remove attempts to use NetBSD __weak_alias macros to export _-prefixed
versions of various fp[sg]et* symbols under softfloat.  __weak_alias
isn't defined so we didn't export them and thus the Symbol.map entries
were wrong.

Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D44327

2 months agoRevert "new-bus: Disable assertions for rman mismatches for activate/deactivate"
John Baldwin [Wed, 13 Mar 2024 20:19:10 +0000 (13:19 -0700)]
Revert "new-bus: Disable assertions for rman mismatches for activate/deactivate"

With recent fixes to the ACPI and pcib drivers to translate mapping
requests of child resources into mappings of sub-ranges of parent
resources these assertions should now be true.

This reverts commit ed88eef140a1c3d57d546f409c216806dd3da809.

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

2 months agolib{c,sys}: fix powerpcspe build
Brooks Davis [Wed, 13 Mar 2024 20:07:02 +0000 (20:07 +0000)]
lib{c,sys}: fix powerpcspe build

libsys/powerpc/Symbol.sys.map was removed due to all symbols moving to
libc.

Fixes: d7847a8d3514 lib{c,sys}: return wrapped syscall APIs to libc

2 months agotcp: move struct tcp_ifcap declaration under _KERNEL
Gleb Smirnoff [Wed, 13 Mar 2024 19:14:18 +0000 (12:14 -0700)]
tcp: move struct tcp_ifcap declaration under _KERNEL

Reviewed by: rscheff, tuexen, kib
Differential Revision: https://reviews.freebsd.org/D44340

2 months agolib{c,sys}: return wrapped syscall APIs to libc
Brooks Davis [Wed, 13 Mar 2024 17:42:01 +0000 (17:42 +0000)]
lib{c,sys}: return wrapped syscall APIs to libc

These provide standard APIs, but are implemented using another system
call (e.g., pipe implemented in terms of pipe2) or are interposed by the
threading library to support cancelation.

After discussion with kib (see D44111), I've concluded that it is
better to keep most public interfaces in libc with as little
as possible in libsys.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44241

2 months agolibsys: make __libsys_interposing static
Brooks Davis [Wed, 13 Mar 2024 17:31:48 +0000 (17:31 +0000)]
libsys: make __libsys_interposing static

Access __libsys_interposing with __libc_interposing_slot() in all
cases to support a move of these wrappers back to libc.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44239

2 months agolibsys: don't expose sigwait wrapper
Brooks Davis [Wed, 13 Mar 2024 17:04:07 +0000 (17:04 +0000)]
libsys: don't expose sigwait wrapper

Long ago (e129c18a83ef) __sys_sigwait was wrapped to prevent sigwait()
from returning with EINTR.  Through a series of changes this wrapper
become __libc_sigwait which was internal to libc and used solely in the
interposing table.  To support a move of sigwait back to libc, move this
wrapper into libsys and rename it with an __libsys_ prefix.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44238

2 months agolibc: remove remnants of __fcntl_compat
Brooks Davis [Wed, 13 Mar 2024 16:52:49 +0000 (16:52 +0000)]
libc: remove remnants of __fcntl_compat

Reviewed by: kib
Fixes: 60b2e2d3ee82 libc: stop exposing __fcntl_compat
Differential Revision: https://reviews.freebsd.org/D44326

2 months agoLinuxKPI: 802.11: return proper value for IEEE80211_CRYPTO_AES_CCM
Bjoern A. Zeeb [Mon, 4 Mar 2024 23:03:58 +0000 (23:03 +0000)]
LinuxKPI: 802.11: return proper value for IEEE80211_CRYPTO_AES_CCM

In case of LKPI_80211_HW_CRYPTO we convert from LinuxKPI cipher_suites
to net80211 ic_cryptocaps fields. For WLAN_CIPHER_SUITE_CCMP we
accidentally returned the bit number instead of the shifted value
which leads to ieee80211_crypto_newkey() setting IEEE80211_KEY_SWCRYPT,
which in turned lead to us trying to decode the frame again despite
HW had already done it.  This was found out of a discussion in D43634.

MFC after: 3 days
Reviewed by: cc, adrian
Differential Revision: https://reviews.freebsd.org/D44208

2 months agoath_hal/ar9300: allow JUPITER cards to read eeprom
Bjoern A. Zeeb [Tue, 12 Mar 2024 21:22:36 +0000 (21:22 +0000)]
ath_hal/ar9300: allow JUPITER cards to read eeprom

Summary:
In ar9300_eeprom_read_word() also allow JUPITER cards read the eeprom
instead of returning an error.  While this will not help all the
9462, 9485, 9565 OEM cards to work, it will make debugging of the
next steps a lot easier.

While here fix a typo in the error message if we do not get CAL.

PR: 255337
Tested by: John Nielsen (john jnielsen net)
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D44328

2 months agolibthr: restore _pthread_cond_timedwait
Brooks Davis [Tue, 12 Mar 2024 21:01:47 +0000 (21:01 +0000)]
libthr: restore _pthread_cond_timedwait

The function was renamed to _thr_cond_timedwait in commit 0ab1bfc7b28f
and for some reason did not get the same __weak_reference treatment as
other _pthread_cond symbols.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44244

2 months agoping: Fix protocol selection with NOINET6 kernel.
Dag-Erling Smørgrav [Tue, 12 Mar 2024 19:40:36 +0000 (20:40 +0100)]
ping: Fix protocol selection with NOINET6 kernel.

A missing else caused the correct resolver hint (AF_INET) to be
overwritten with AF_UNSPEC when the kernel supports IPv4 but not
IPv6.

MFC after: 3 days
PR: 277592
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D44304

2 months agosqlite3: Vendor import of sqlite3 3.45.1
Cy Schubert [Tue, 12 Mar 2024 14:01:21 +0000 (08:01 -0600)]
sqlite3: Vendor import of sqlite3 3.45.1

Release notes at https://www.sqlite.org/releaselog/3_45_1.html.

Obtained from:  https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz
MFC after: 1 week

Merge commit '1e59a00476c9801952e7319719fcdb095a0cd007' into main

2 months agomkimg(1): process non-seekable output gracefully
Eugene Grosbein [Tue, 12 Mar 2024 15:55:42 +0000 (22:55 +0700)]
mkimg(1): process non-seekable output gracefully

mkimg may make severe load only to fail in the end
if output is non-seekable pipe, socket or FIFO
unless output format is raw disk image.

Check it out and fail early. Make it clear in the manual.

MFC after: 1 week

2 months agoRELNOTES: Add awk update from 2 weeks ago.
Warner Losh [Tue, 12 Mar 2024 15:24:39 +0000 (09:24 -0600)]
RELNOTES: Add awk update from 2 weeks ago.

Sponsored by: Netflix

2 months agomd5.1: Fix the GNU mode example when using a digest file
Gordon Bergling [Tue, 12 Mar 2024 14:44:48 +0000 (15:44 +0100)]
md5.1: Fix the GNU mode example when using a digest file

The last example in the manpage md5(1) wants to demonstrate
GNU mode (md5sum), but uses BSD mode (md5) instead.

In GNU mode, the -c option does not compare against a hash string
passed as parameter. Instead, it expects a digest file,
as created under the name digest for /boot/loader.conf in
the example above.

PR: 276560
Reviewed by: mhorne, des
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D44098

2 months agosqlite3: Vendor import of sqlite3 3.45.1
Cy Schubert [Tue, 12 Mar 2024 13:54:12 +0000 (07:54 -0600)]
sqlite3: Vendor import of sqlite3 3.45.1

Release notes at https://www.sqlite.org/releaselog/3_45_1.html.

Obtained from:  https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz

2 months ago Update to bring the rack stack with all its fixes in.
Randall Stewart [Tue, 12 Mar 2024 11:55:02 +0000 (07:55 -0400)]
 Update to bring the rack stack with all its fixes in.

This brings the rack stack up to the current level used at NF. Many fixes
and improvements have been added. I also add in a fix to BBR to deal with
the changes that have been in hpts for a while i.e. only one call no matter
if mbuf queue or tcp_output.

It basically does little except BBlogs and is a placemark for future work on
doing path capacity measurements.

With a bit of a struggle with git I finally got rack_pcm.c into place (apologies
for not noticing this error). The LINT kernel is running on my box now .. sigh.

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

2 months agomrsas: don't reference the removed physical disk of RAID1 during IO submission
Sumit Saxena [Tue, 12 Mar 2024 06:51:09 +0000 (06:51 +0000)]
mrsas: don't reference the removed physical disk of RAID1 during IO submission

When a physical disk(PD) [belonging to a RAID1 Virtual disk(VD)] is
removed, driver may still use the reference to the removed PD while submitting
IO to the controller. Controller firmware faults upon receipt of such IO.
This patch fixes this issue by not using any reference to the removed PD.

Reviewed by: imp
Approved by: imp
Sponsored by: Broadcom Inc
Differential Revision: https://reviews.freebsd.org/D44282

2 months agolibc: Move tzset.3 to stdtime
Warner Losh [Tue, 12 Mar 2024 04:19:15 +0000 (22:19 -0600)]
libc: Move tzset.3 to stdtime

This really belongs in stddime, since it documents interfaces
implemented in stdtime.

Suggested by: brooks
Sponsored by: Netflix

2 months agotimezone: Move to the XSI/POSIX definition for timezone.
Warner Losh [Tue, 12 Mar 2024 04:19:05 +0000 (22:19 -0600)]
timezone: Move to the XSI/POSIX definition for timezone.

The old timezone(3) function has long since been obsolete and has a
fatally flawed interface. Retain this function for compatibility
purposes, but shift to providing the offset from UTC in the timezone
variable, whether or not the timezone observes summer time in the
'daylight' variable. Document the tzname variable that's already been
set. Also make _tztab() static. It's not used in libc (or anywhere in
the tree) and it's not exported as a public dynamic symbol.

Sponsored by: Netflix
Reviewed by: brooks, kib
Differential Revision: https://reviews.freebsd.org/D44281

2 months agovmm: fix standalone module build
Gleb Smirnoff [Tue, 12 Mar 2024 00:59:03 +0000 (17:59 -0700)]
vmm: fix standalone module build

2 months agokboot: kbootfdt: fix error handling
Warner Losh [Mon, 11 Mar 2024 20:15:44 +0000 (14:15 -0600)]
kboot: kbootfdt: fix error handling

If we are able to open /sys/firmware/fdt, but aren't able to read it,
fall back to /proc/device-tree. Remove comment that's not really true,
it turns out.

Sponsored by: Netflix

2 months agokboot: Use is_linux_error to check mmap return error
Warner Losh [Mon, 11 Mar 2024 20:15:39 +0000 (14:15 -0600)]
kboot: Use is_linux_error to check mmap return error

Rather than checking against the (incorrect) -511, use the
is_linux_error() function to check to see if host_mmap failed.

Sponsored by: Netflix

2 months agokboot: Print UEFI memory map
Warner Losh [Mon, 11 Mar 2024 20:15:34 +0000 (14:15 -0600)]
kboot: Print UEFI memory map

If we can read the UEFI memory map, go ahead and print the memory map.
While the kernel prints this with bootverbose, having it at this stage
is useful for debugging other problems.

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

2 months agokboot: hostfs -- check for llseek failure correctly
Warner Losh [Mon, 11 Mar 2024 20:15:24 +0000 (14:15 -0600)]
kboot: hostfs -- check for llseek failure correctly

The host_* syscalls are all raw Linux system calls, not the POSIX
wrappers that glibc / musl create. So we have to ranage change the
return value of host_llseek correctly to use the negative value hack
that all Linux system calls use.

This fixes a false positive error detection when we do something like
lseek(fd, 0xf1234567, ...); This returns 0xf1234567, which is a negative
value which used to trigger the error path.  Instead, we check using the
is_linux_error() and store the return value in a long. Translate that
errno to a host errno and set the global errno to that and return
-1. lseek can't otherwise return a negative number, since it's the
offset after seeking into the file, which by definition is positive.

This kept the 'read the UEFI memory map out of physical memory' from
working on aarch64 (whose boot loader falls back to reading it since
there are restrictive kernel options that can also prevent it), since
the physical address the memory map was at on my platform was like
0xfa008018.

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

2 months agokboot: Avoid UB in signed shift
Warner Losh [Mon, 11 Mar 2024 20:15:10 +0000 (14:15 -0600)]
kboot: Avoid UB in signed shift

offset is signed. Copy it to the unsigned res before shifting. This
avoids any possible undefined behavior for right shifting signed
numbers. No functional change intended (and the code generated is the
nearly same for aarch64).

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

2 months agokboot: Create function for error checking.
Warner Losh [Mon, 11 Mar 2024 20:15:03 +0000 (14:15 -0600)]
kboot: Create function for error checking.

Linux has the convention of returning -ERRNO to flag errors from its
system calls. Sometimes other negative values are returned that are
success...  However, only values -1 to -4096 (inclusive) are really
errors. The rest are either truncated values that only look negative (so
use long instead of int), or are things like addresses or legal unsigned
file offsets or similar that are successful returns. Filter out the
latter.

Sponsored by: Netflix

2 months agoRevert "Update to bring the rack stack with all its fixes in."
Brooks Davis [Mon, 11 Mar 2024 20:15:20 +0000 (20:15 +0000)]
Revert "Update to bring the rack stack with all its fixes in."

This commit was incomplete and breaks LINT kernels.  The tree has been
broken for 8+ hours.

This reverts commit f6d489f402c320f1a6eaa473491a0b8c3878113e.

2 months agonetlink: fix route protocol constant values to match Linux
Marek Zarychta [Mon, 11 Mar 2024 15:50:46 +0000 (08:50 -0700)]
netlink: fix route protocol constant values to match Linux

Although these particular constants aren't supported, the incorrect
values break bird 2.15 operation.

PR: 277618
Reported by: Ondrej Zajicek <santiago@crfreenet.org>

2 months agotests/unix_seqpacket: mk_pair_of_sockets() requires a valid argument
Gleb Smirnoff [Mon, 11 Mar 2024 14:50:29 +0000 (07:50 -0700)]
tests/unix_seqpacket: mk_pair_of_sockets() requires a valid argument

All callers do it right.  Don't be overprotective against a stupid
caller and thus don't look like a code that leaks a resource.

Reported by: Coverity Scan
CID: 1539210

2 months agoAdd 'contrib/libdiff/' from commit '9eb461aa4b61ab47855b2cee9e5b626a76888b5e'
Dag-Erling Smørgrav [Mon, 11 Mar 2024 13:44:36 +0000 (14:44 +0100)]
Add 'contrib/libdiff/' from commit '9eb461aa4b61ab47855b2cee9e5b626a76888b5e'

git-subtree-dir: contrib/libdiff
git-subtree-mainline: f6d489f402c320f1a6eaa473491a0b8c3878113e
git-subtree-split: 9eb461aa4b61ab47855b2cee9e5b626a76888b5e

Reviewed by: imp
Sponsored by: Klara, Inc.

2 months agoUpdate to bring the rack stack with all its fixes in.
Randall Stewart [Mon, 11 Mar 2024 11:36:54 +0000 (07:36 -0400)]
Update to bring the rack stack with all its fixes in.

This brings the rack stack up to the current level used at NF. Many fixes
and improvements have been added. I also add in a fix to BBR to deal with
the changes that have been in hpts for a while i.e. only one call no matter
if mbuf queue or tcp_output.

Note there is a new file that I can't figure out how to get in rack_pcm.c

It basically does little except BBlogs and is a placemark for future work on
doing path capacity measurements.

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

2 months agoAdd space before 20240211 entry in ObsoleteFiles.inc
Dimitry Andric [Sun, 10 Mar 2024 11:36:28 +0000 (12:36 +0100)]
Add space before 20240211 entry in ObsoleteFiles.inc

2 months agounionfs: accommodate underlying FS calls that may re-lock
Jason A. Harmening [Tue, 2 Jan 2024 21:22:24 +0000 (15:22 -0600)]
unionfs: accommodate underlying FS calls that may re-lock

Since non-doomed unionfs vnodes always share their primary lock with
either the lower or upper vnode, any forwarded call to the base FS
which transiently drops that upper or lower vnode lock may result in
the unionfs vnode becoming completely unlocked during that transient
window.  The unionfs vnode may then become doomed by a concurrent
forced unmount, which can lead to either or both of the following:

--Complete loss of the unionfs lock: in the process of being
  doomed, the unionfs vnode switches back to the default vnode lock,
  so even if the base FS VOP reacquires the upper/lower vnode lock,
  that no longer translates into the unionfs vnode being relocked.
  This will then violate that caller's locking assumptions as well
  as various assertions that are enabled with DEBUG_VFS_LOCKS.

--Complete less of reference on the upper/lower vnode: the caller
  normally holds a reference on the unionfs vnode, while the unionfs
  vnode in turn holds references on the upper/lower vnodes.  But in
  the course of being doomed, the unionfs vnode will drop the latter
  set of references, which can effectively lead to the base FS VOP
  executing with no references at all on its vnode, violating the
  assumption that vnodes can't be recycled during these calls and
  (if lucky) violating various assertions in the base FS.

Fix this by adding two new functions, unionfs_forward_vop_start_pair()
and unionfs_forward_vop_finish_pair(), which are intended to bookend
any forwarded VOP which may transiently unlock the relevant vnode(s).
These functions are currently only applied to VOPs that modify file
state (and require vnode reference and lock state to be identical at
call entry and exit), as the common reason for transiently dropping
locks is to update filesystem metadata.

Reviewed by: olce
Tested by: pho
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D44076

2 months agouipc_bindat(): Explicitly specify exclusive locking for the new vnode
Jason A. Harmening [Sat, 3 Feb 2024 17:07:16 +0000 (11:07 -0600)]
uipc_bindat(): Explicitly specify exclusive locking for the new vnode

When calling VOP_CREATE(), uipc_bindat() reuses the componentname
object from the preceding lookup operation, which is likely to specify
LK_SHARED.  Furthermore, the VOP_CREATE() interface technically only
requires the newly-created vnode to be returned with a shared lock.
However, the socket layer requires the new vnode to be locked exclusive
and asserts to that effect.

In most cases, this is not a practical concern because most if not
all base-layer filesystems (certainly FFS, ZFS, and msdosfs at least)
always return the vnode locked exclusive regardless of the lock flags.
However, it is an issue for unionfs which uses cn_lkflags to determine
how the new unionfs wrapper vnode should be locked.  While it would
be easy enough to work around this issue within unionfs itself, it
seems better for the socket layer to be explicit about its locking
requirements when issuing VOP_CREATE().

Reviewed by: kib, olce
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D44047

2 months agovn_lock_pair(): allow lkflags1/lkflags2 to be 0 if vp1/vp2 is NULL
Jason A. Harmening [Fri, 23 Feb 2024 17:31:08 +0000 (11:31 -0600)]
vn_lock_pair(): allow lkflags1/lkflags2 to be 0 if vp1/vp2 is NULL

It's a bit strange to require the caller to pass contrived lock flags
if the corresponding vnode is NULL, simply to appease the assertion
that exactly one of LK_SHARED or LK_EXCLUSIVE must be set.  On the
other hand, we still want to catch cases in which completely bogus
or corrupt flags are passed even if the corresponding vnode is NULL.
Therefore, specifically allow empty flags for lkflags1/lkflags2 iff
the respective vp1/vp2 param is NULL.

Reviewed by: kib, olce
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D44046

2 months agomount_nullfs(8): fix typo
Konstantin Belousov [Sat, 9 Mar 2024 21:18:11 +0000 (23:18 +0200)]
mount_nullfs(8): fix typo

Reported by: mckusick

2 months agoktrace: Fix the build when options KTRACE is not configured
Mark Johnston [Sat, 9 Mar 2024 05:11:01 +0000 (00:11 -0500)]
ktrace: Fix the build when options KTRACE is not configured

MFC after: 1 week
Reported by: John Nielsen <lists@jnielsen.net>

2 months agoktrace: Add __ktrace_used
Mark Johnston [Sat, 9 Mar 2024 05:08:43 +0000 (00:08 -0500)]
ktrace: Add __ktrace_used

This suppresses warnings about write-only variables when the KTRACE
option is disabled, akin __diagused and __witness_used.

MFC after: 1 week

2 months agocrunchgen: slap a dependency on the generated makefile for .lo
Kyle Evans [Sat, 9 Mar 2024 02:01:17 +0000 (20:01 -0600)]
crunchgen: slap a dependency on the generated makefile for .lo

crunchgen generates a foo.lo for each binary it will end up crunching
into the final product.  While they have a dependency on the libs that
are used to link them, nothing will force relinking if the set of libs
needed to link them is changed.  Because of this, incremental builds may
not be possible if one builds a version of, e.g., rescue/ with a broken
set of libs specified for a project -- a subsequent fix won't be rolled
in cleanly, it will require purging the rescue/ objdir.

This is a bit crude, but the foo.mk we generate doesn't actually get
regenerated all that often in practice, so a spurious relink for the
vast majority of crunched objects won't actually happen all that often.

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

2 months agolib{c,sys}: fix incremental builds
Brooks Davis [Fri, 8 Mar 2024 19:14:24 +0000 (19:14 +0000)]
lib{c,sys}: fix incremental builds

I removed lib/libsys/{aarch64,arm,riscv}/syscall.S in favor of an
idential generated version.  We need to clean out the .ddepend files to
ensure the generated version is actually generated.

The guard here is technically too strict, but should be fine in practice
and I've verified both the breakage and fix on an armv7 build.

Reported by: imp
Fixes: e6ffc7669a56 Remove pointless MD syscall(2)
Fixes: 0ee0ae237324 Remove pointless MD syscall(2)
Fixes: 7b3836c28188 Remove pointless MD syscall(2)

2 months agonullfs_mount(): fix whitespace
Konstantin Belousov [Fri, 8 Mar 2024 18:51:04 +0000 (20:51 +0200)]
nullfs_mount(): fix whitespace

2 months agomount_nullfs(8): document -o cache and vfs.nullfs.cache_vnodes
Konstantin Belousov [Fri, 8 Mar 2024 18:26:48 +0000 (20:26 +0200)]
mount_nullfs(8): document -o cache and vfs.nullfs.cache_vnodes

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

2 months agonullfs: add -o cache
Konstantin Belousov [Fri, 8 Mar 2024 18:26:02 +0000 (20:26 +0200)]
nullfs: add -o cache

to allow overwrite global default if needed.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

2 months agonullfs_mount(): remove unneeded cast
Konstantin Belousov [Fri, 8 Mar 2024 18:37:43 +0000 (20:37 +0200)]
nullfs_mount(): remove unneeded cast

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

2 months agosimple_mfd: don't attach children twice
Mitchell Horne [Fri, 8 Mar 2024 14:09:17 +0000 (10:09 -0400)]
simple_mfd: don't attach children twice

Trying to probe+attach the child device at the point it is added comes
before the syscon handle is set up (if relevant). It will therefore be
unavailable to the attach method which is expecting it, and the first
attempt to attach the device will fail.

Just rely on the call to bus_generic_attach() at the end of the function
to perform probe+attach of dev's children.

Reviewed by: manu
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44268

2 months agoclkdom_dump(): improve output text
Mitchell Horne [Fri, 8 Mar 2024 14:09:08 +0000 (10:09 -0400)]
clkdom_dump(): improve output text

If the call to clknode_get_freq() returns an error (unlikely), report
this, rather than printing the error code as the clock frequency.

If the clock has no parent (e.g. a fixed reference clock), print "none"
rather than "(NULL)(-1)". This is a more human-legible presentation of the
same information.

Reviewed by: manu
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44267

2 months agoclk_fixed: quiet by default
Mitchell Horne [Fri, 8 Mar 2024 14:08:49 +0000 (10:08 -0400)]
clk_fixed: quiet by default

We may attach several of these devices, but there is no meaningful
information added to dmesg. For example:

  ofwbus0: <Open Firmware Device Tree>
  clk_fixed0: <Fixed clock> on ofwbus0
  clk_fixed1: <Fixed clock> on ofwbus0
  clk_fixed2: <Fixed clock> on ofwbus0
  clk_fixed3: <Fixed clock> on ofwbus0
  clk_fixed4: <Fixed clock> on ofwbus0
  clk_fixed5: <Fixed clock> on ofwbus0
  clk_fixed6: <Fixed clock> on ofwbus0
  clk_fixed7: <Fixed clock> on ofwbus0
  clk_fixed8: <Fixed clock> on ofwbus0
  clk_fixed9: <Fixed clock> on ofwbus0
  clk_fixed10: <Fixed clock> on ofwbus0
  clk_fixed11: <Fixed clock> on ofwbus0

To reduce this noise, quiet the devices for by default. For verbose
boot, the message will be emitted.

Reviewed by: manu
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44266

2 months agoclk_fixed: call clkdom_dump() for verbose boot
Mitchell Horne [Fri, 8 Mar 2024 14:08:22 +0000 (10:08 -0400)]
clk_fixed: call clkdom_dump() for verbose boot

This is standard practice for clock drivers that register clocks
dynamically. Nothing else uses the CLK_DEBUG macro.

The result is that the name and frequency of the fixed clock is printed
for a verbose boot, which may aid in debugging.

Reviewed by: manu
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44265

2 months agoHyper-V: vPCI: fix cpu id mis-mapping in vmbus_pcib_map_msi()
Wei Hu [Fri, 8 Mar 2024 10:00:25 +0000 (10:00 +0000)]
Hyper-V: vPCI: fix cpu id mis-mapping in vmbus_pcib_map_msi()

The msi address contains apic id. The code in vmbus_pcib_map_msi()
treats it as cpu id, which could cause mis-configuration of msix
IRQs, leading to missing interrupts for SRIOV devices. This happens
when apic id is not the same as cpu id on certain large VM sizes
with multiple numa domains in Azure. Fix this issue by correctly
mapping apic ids to cpu ids.

On vPCI version before 1.4, it only supports up to 64 vcpus
for msi/msix interrupt. This change also adds a check and returns
error if the vcpu_id is greater than 63.

Reported by: NetApp
Tested by: whu
MFC after: 1 week

2 months agoTCP LRO: add dtrace probe points
Michael Tuexen [Fri, 8 Mar 2024 09:21:09 +0000 (10:21 +0100)]
TCP LRO: add dtrace probe points

Add the IP, UDP, and TCP receive static probes to the code path,
which avoids if_input.

Reviewed by: rrs, markj
MFC after: 1 week`
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D43727

2 months agoTCP LRO: disable mbuf queuing when packet filter hooks are in place
Michael Tuexen [Fri, 8 Mar 2024 09:03:43 +0000 (10:03 +0100)]
TCP LRO: disable mbuf queuing when packet filter hooks are in place

When doing mbuf queueing, the packet filter hooks in ether_demux(),
ip_input(), and ip6_input() are by-passed. This means that the packet
filters don't process incoming packets, which might result in
connection failures. For example bypassing the TCP sequence number
validation will result in dropping valid packets.
Please note that this patch is only disabling mbuf queueing, not LRO.

Reported by: Herbert J. Skuhra
Reviewed by: glebius, rrs, rscheff
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D43769

2 months agoObsoleteFiles.inc: add the awk tests I just remvoed
Warner Losh [Fri, 8 Mar 2024 06:03:41 +0000 (23:03 -0700)]
ObsoleteFiles.inc: add the awk tests I just remvoed

These files were bogusly added when I imported awk 2nd edition.

Sponsored by: Netflix

2 months agoawk: Fix the tests
Warner Losh [Fri, 8 Mar 2024 05:40:43 +0000 (22:40 -0700)]
awk: Fix the tests

I'd forgotten that we have to adjust the stderr tests from
upstream. Remove the OK files. Also remove system-status.*.  These
restore the fixes I made in 517e52b6c21c which were lost when I imported
the last version of awk.

Also, force LANG to be C.UTF-8 when testing to ensure that stray lang
settings don't fail tests.

Sponsored by: Netflix

2 months agolibc/i386: don't attempt to export alloca
Brooks Davis [Thu, 7 Mar 2024 20:14:55 +0000 (20:14 +0000)]
libc/i386: don't attempt to export alloca

The assembly implementation was removed in 2006 (commit 3c03c7095e7e).

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44242

2 months agolibc/quad: narrow list of symbols exposed on i386
Brooks Davis [Thu, 7 Mar 2024 20:09:00 +0000 (20:09 +0000)]
libc/quad: narrow list of symbols exposed on i386

These symbols aren't present on i386 so don't try to expose them.

Given the structure of quad/Makefile.inc, it might make more sense to
have per-arch symbol maps here, but this is sufficent to build with
WITHOUT_UNDEFINED_VERSION on i386.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D44243

2 months agolibc/iconv: don't export nonexistant symbols
Brooks Davis [Thu, 7 Mar 2024 20:08:38 +0000 (20:08 +0000)]
libc/iconv: don't export nonexistant symbols

It's unclear to me that any of these symbols ever existed.  The ones
I've spot checked are only mentioned in the initial Citrus iconv import
(commit ad30f8e79bd1) and this code hasn't changed much over time.

Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D44183

2 months agoamend! if_bnxt: Integrate AOC Cable Support into Current 40G PHY Speed
Sumit Saxena [Thu, 7 Mar 2024 19:33:40 +0000 (19:33 +0000)]
amend! if_bnxt: Integrate AOC Cable Support into Current 40G PHY Speed

if_bnxt: Integrate AOC Cable Support into Current 40G PHY Speed

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D42956

2 months agoif_bnxt: Set 1G/10G baseT force speed as auto speeds
Chandrakanth Patil [Wed, 6 Mar 2024 13:23:04 +0000 (18:53 +0530)]
if_bnxt: Set 1G/10G baseT force speed as auto speeds

The firmware lacks support for manually setting 1G and 10G baseT speeds.
However, the driver can enable auto speed masks to achieve automatic configuration
at these speeds.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D42960

2 months agoif_bnxt: 50G, 100G and 200G PAM4 support
Chandrakanth Patil [Wed, 6 Mar 2024 13:21:52 +0000 (18:51 +0530)]
if_bnxt: 50G, 100G and 200G PAM4 support

Add support for 50G, 100G and 200G PAM4 support

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D42959

2 months agoif_bnxt: Pluggable Module Display Support
Sumit Saxena [Wed, 6 Mar 2024 13:21:21 +0000 (18:51 +0530)]
if_bnxt: Pluggable Module Display Support

This update enables the display of pluggable module information
to users via the ifconfig utility.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D42958

2 months agoif_bnxt: Implementation of Extended Port Hardware Stats Support for THOR Controller
Chandrakanth Patil [Wed, 6 Mar 2024 13:20:28 +0000 (18:50 +0530)]
if_bnxt: Implementation of Extended Port Hardware Stats Support for THOR Controller

The newly added port extended hardware statistics are now accessible to
users through the sysctl interface. Also, Few obsolete stats are removed
and few stats are renamed.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D42957

2 months agoif_bnxt: Integrate AOC Cable Support into Current 40G PHY Speed
Chandrakanth Patil [Wed, 6 Mar 2024 13:18:41 +0000 (18:48 +0530)]
if_bnxt: Integrate AOC Cable Support into Current 40G PHY Speed

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D429506

2 months agoif_bnxt: Update Firmware Header to Latest Version 1.10.2.136
Chandrakanth Patil [Wed, 6 Mar 2024 13:17:50 +0000 (18:47 +0530)]
if_bnxt: Update Firmware Header to Latest Version 1.10.2.136

Update Firmware Header to Latest Version 1.10.2.136.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D42955

2 months agoif_bnxt: Update Maximum Configurable MTU from 9000 to 9600
Chandrakanth Patil [Wed, 6 Mar 2024 13:16:38 +0000 (18:46 +0530)]
if_bnxt: Update Maximum Configurable MTU from 9000 to 9600

Increasing the maximum configurable MTU from 9000 to 9600 to
align with the firmware's capability of handling an MTU up to 9600.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D42954

2 months agoif_bnxt: Enabled support for 1G SX, CX, and LX forced speed settings
Chandrakanth Patil [Wed, 6 Mar 2024 13:15:32 +0000 (18:45 +0530)]
if_bnxt: Enabled support for 1G SX, CX, and LX forced speed settings

Enabled User Configuration of 1G Speed on Wh+ SFP28 Port with AOC
cable.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D42953

2 months agoif_bnxt: Incorrect Labeling of Supported Medium in `ifconfig -m <inf>` Command
Chandrakanth Patil [Wed, 6 Mar 2024 13:14:27 +0000 (18:44 +0530)]
if_bnxt: Incorrect Labeling of Supported Medium in `ifconfig -m <inf>` Command

The 1G speed on DAC medium is incorrectly labeled as 1000baseT, it
should be 1000baseCX. Updated the label accordingly.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D42952

2 months agonvme_sim: Add comment about the is_failed test
Warner Losh [Wed, 6 Mar 2024 21:30:01 +0000 (14:30 -0700)]
nvme_sim: Add comment about the is_failed test

We only see a request with a failed controller while we're in the
process of failing the controller. Add a comment to that effect.

Sponsored by: Netflix

2 months agoif_bnxt: Fix media speed update issue in "ifconfig -m" during PHY hot plug
Chandrakanth Patil [Wed, 6 Mar 2024 13:13:07 +0000 (18:43 +0530)]
if_bnxt: Fix media speed update issue in "ifconfig -m" during PHY hot plug

Currently, if a media type (e.g., DAC) is hot-plugged out and another type
(e.g., optical cable) is hot-plugged in, the new speed is not reflected in
ifconfig. This occurs when the driver fails to update speeds with unchanged
tx and rx flow control.

To fix, a phy_type check ensures update of phy speeds upon detecting the new
phy.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D42951

2 months agonullfs: Add the vfs.nullfs.cache_nodes sysctl to control nocache default
Seigo Tanimura [Mon, 4 Mar 2024 13:50:25 +0000 (22:50 +0900)]
nullfs: Add the vfs.nullfs.cache_nodes sysctl to control nocache default

Differential revision: https://reviews.freebsd.org/D44217
MFC after: 1 week

2 months agoVendor import of diff from OpenBSD's Game of Trees
Dag-Erling Smørgrav [Thu, 7 Mar 2024 11:32:03 +0000 (12:32 +0100)]
Vendor import of diff from OpenBSD's Game of Trees

Repository: ssh://anonymous@got.gameoftrees.org/diff.git
Commit hash: b5a9c15f4d68c06ec3bf839529b3ed2def0a6af6
Commit date: 2023-09-15

2 months agozfs: merge openzfs/zfs@8f2f6cd2a
Martin Matuska [Thu, 7 Mar 2024 09:49:48 +0000 (10:49 +0100)]
zfs: merge openzfs/zfs@8f2f6cd2a

Notable upstream pull request merges:
 #15887 -multiple Fast Dedup: Cleanup and documentation ahead of
                  integrating Fast Dedup
 #15907 5600dff0e Fixed parameter passing error when calling zfs_acl_chmod
 #15908 8f2f6cd2a ddt: reduce DDT_NAMELEN

Obtained from: OpenZFS
OpenZFS commit: 8f2f6cd2ac688916adb2caf979daf95365ccb48f

2 months agotarfs: Fix checksum on 32-bit platforms.
Dag-Erling Smørgrav [Thu, 7 Mar 2024 08:15:54 +0000 (09:15 +0100)]
tarfs: Fix checksum on 32-bit platforms.

MFC after: 3 days
Fixes: b56872332e47786afc09515a4daaf1388da4d73c
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D44261

2 months agobhyve/gdb: Avoid rebuilding target.xml for install targets
Mark Johnston [Thu, 7 Mar 2024 05:39:07 +0000 (00:39 -0500)]
bhyve/gdb: Avoid rebuilding target.xml for install targets

Otherwise it's impossible to install from a read-only objdir.

Fixes: f81cdf24ba54 ("bhyve: Add support for XML register definitions")
Reported by: olivier

2 months agodevd: Add directory information
Warner Losh [Thu, 7 Mar 2024 01:38:07 +0000 (18:38 -0700)]
devd: Add directory information

Devd searches /etc/devd and /usr/local/etc/devd by default (given the
default devd.conf file). Document that here.

Sponsored by: Netflix