FreeBSD/src efe6a09sys/fs/msdosfs msdosfs_vnops.c, sys/fs/tmpfs tmpfs_vnops.c

fs: Add static asserts for the size of fid structures

File system specific *fid structures are copied into the generic
struct fid defined in sys/mount.h.
As such, they cannot be larger than struct fid.

This patch adds _Static_assert()s to check for this.

ZFS and fuse already have _Static_assert()s.

(cherry picked from commit 91b5592a1e1af97480d615cf508be05b5674d2f3)
DeltaFile
+2-0sys/fs/msdosfs/msdosfs_vnops.c
+2-0sys/fs/tmpfs/tmpfs_vnops.c
+2-0sys/fs/udf/udf_vnops.c
+2-0sys/ufs/ffs/ffs_vnops.c
+8-04 files

FreeBSD/src 9efd215sys/dev/rtwn if_rtwnvar.h if_rtwn.c, sys/dev/rtwn/rtl8188e r88e_beacon.c

rtwn: create a new HAL routine for enabling STA mode beacon processing

For some NICs (notably the rtl8192cu that I'm working on) the
firmware rate adaptation requires beacon processing to be enabled.

Instead of making assumptions in the if_rtwn beacon routines (and
honestly all of that should be in the HAL too), create a HAL method
for enabling/disabling beacon processing specifically in STA mode.

Since this isn't necessarily required for all NICs (notably the RTL8188E
NICs, where some will do firmware rate control and some will require
driver rate control), only enable it for the RTL8192CU and RT8192EU.

The RTL8188E and RTL8812/RTL8821 just have no-op routines for now.

Locally tested:

* RTL8192CU, STA mode


    [2 lines not shown]
DeltaFile
+20-0sys/dev/rtwn/rtl8192c/r92c_beacon.c
+12-0sys/dev/rtwn/rtl8188e/r88e_beacon.c
+9-0sys/dev/rtwn/rtl8812a/r12a_beacon.c
+4-0sys/dev/rtwn/if_rtwnvar.h
+3-0sys/dev/rtwn/if_rtwn.c
+1-0sys/dev/rtwn/rtl8192e/usb/r92eu_attach.c
+49-09 files not shown
+58-015 files

FreeBSD/src 1fc7922sbin/devd devd.conf.5

devd.conf(5): explain difference between internal and shell variables

devd.conf by default considers many variables as internal, possibly
expanding them to an empty string.  Shell variables thus need to be
wrapped into braces.

Reviewed by:    imp, Andre Albsmeier
MFC after:      1 week
Differential Revision:  <https://reviews.freebsd.org/D48154>
DeltaFile
+56-1sbin/devd/devd.conf.5
+56-11 files

FreeBSD/src 725003dshare/man/man5 pf.conf.5

pf.conf.5: Fix endpoint-independent description

The description of the endpoint-independent option accidentally ended up
in the middle of map-e-portset's text.

Fixes: 390dc369efaa ("pf: Add support for endpoint independent NAT bindings for UDP")

Reviewed by:    kp
Sponsored by:   Tailscale
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48158
DeltaFile
+10-10share/man/man5/pf.conf.5
+10-101 files

FreeBSD/src 709989bsys/fs/nullfs null_vfsops.c

nullfs: stop lying about mount flags in statfs(2)

Flags should not propagate from the lower fs.  Behavior for the upper fs
is determined by flags from its mount point structure.  When lower fs
acts according to its mount configuration, it is reported up as VOP
errors.

PR:     283425
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D48150
DeltaFile
+0-5sys/fs/nullfs/null_vfsops.c
+0-51 files

FreeBSD/src d7c69a3sys/dev/sdhci sdhci_acpi.c

sdhci: add missing bus_add_child DEVMETHOD.

Add the missing bus_add_child DEVMETHOD.  This is needed for the RPi5
running with a MMCCAM kernel and the worproject/rpi5-uefi to avoid a
kernel panic on boot when SDIO tries to attach to a 'Intel Bay Trail'
controller.

Reviewed by:    imp
MFC after:      3 days
Differential Revision: https://reviews.freebsd.org/D48152
DeltaFile
+1-0sys/dev/sdhci/sdhci_acpi.c
+1-01 files

FreeBSD/src 7030980sys/kern bus_if.m

bus: improve null_add_child() panic message

When null_add_child() panics add the bus device name/unit and the new
unit as this will immediately reveal the parent missing the
  DEVMETHOD(bus_add_child, ...)
entry.

Reviewed by:    imp
Differential Revision: https://reviews.freebsd.org/D48151
DeltaFile
+2-1sys/kern/bus_if.m
+2-11 files

FreeBSD/src 5d09d10sys/contrib/dev/iwlwifi iwl-drv.c

iwlwifi: add missing blank, unwrap line

The original commit was missing a space between two words due to
uncareful string line wrapping; let the string run beyond the 80 char
limit in order to also make it grep-able [1].

Reported by:    jrtc27, Chris Torek (chris.torek gmail.com)
Suggested by:   emaste, imp [1]
Sponsored by:   The FreeBSD Foundation
Fixes:          87e140a5c6f89 avoid (hard) hang on loading module
MFC after:      3 days
X-MFC with:     87e140a5c6f89eea7ea6320d1ae34566492abfc0
Reviewed by:    emaste
Differential Revision: https://reviews.freebsd.org/D48155
DeltaFile
+2-2sys/contrib/dev/iwlwifi/iwl-drv.c
+2-21 files

FreeBSD/src c4ca1d2share/misc bsd-family-tree

bsd-family-tree: add NetBSD 10.1

MFC after:      3 days
DeltaFile
+15-12share/misc/bsd-family-tree
+15-121 files

FreeBSD/src f0f596bsys/fs/fuse fuse_vnops.c fuse_file.c, tests/sys/fs/fusefs open.cc opendir.cc

fusefs: ignore FUSE_NO_OPEN(DIR)_SUPPORT flags

The FUSE_NO_OPEN_SUPPORT and FUSE_NO_OPENDIR_SUPPORT flags
are only meant to indicate kernel features, and should be ignored
if they appear in the FUSE_INIT reply flags.

Also fix the corresponding test cases.

MFC after:      2 weeks
Reviewed by:    Alan Somers <asomers at FreeBSD.org>
Signed-off-by:  CismonX <admin at cismon.net>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1509
DeltaFile
+2-36tests/sys/fs/fusefs/open.cc
+2-25tests/sys/fs/fusefs/opendir.cc
+8-9sys/fs/fuse/fuse_vnops.c
+3-6sys/fs/fuse/fuse_file.c
+0-4sys/fs/fuse/fuse_internal.c
+0-2sys/fs/fuse/fuse_ipc.h
+15-826 files

FreeBSD/src 618c97blib/libprocstat/zfs Makefile

libprocstat: ZFS support: Makefile: Tidy up a bit

Regroup assignments tweaking preprocessor defines/undefs, and separately
those about include directories.

Re-order include directories a bit more logically, and remove redundant
ones.

Separate logical groups by blank lines.

Build artifacts have been verified to stay the same when produced with
an external LLVM 18 toolchain.

MFC after:      1 month
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D48070
DeltaFile
+15-11lib/libprocstat/zfs/Makefile
+15-111 files

FreeBSD/src b6f4027lib/libsys setcred.2 Makefile.sys

setcred(2): Add manual page

Reviewed by:    Alexander Ziaee <concussious at runbox.com>
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D48063
DeltaFile
+290-0lib/libsys/setcred.2
+1-0lib/libsys/Makefile.sys
+291-02 files

FreeBSD/src d052fcbsys/rpc svc_generic.c svc.h

rpc: svc_tli_create() is always called with NULL socket

Axe dead code that allows to provide a created socket.
DeltaFile
+34-56sys/rpc/svc_generic.c
+2-3sys/rpc/svc.h
+36-592 files

FreeBSD/src 300c843sys/dev/rtwn/rtl8192c r92c_fw.c

rtwn: bring the r92c rate control setup selection in line with tx descriptors

The rate control message was doing 11g+11n without 11b rates, but
the TX descriptor setup supports also falling back on 11b rates
when doing multi-rate retry / per-descriptor rate control.

So, line them up.  They're not exactly the same as the TX path
supports pure-N and pure-G modes which the rate control configuration
does not, but there'll need to be a lot more work on supporting
those operating modes anyway (around things like self-generated
frame rate control/masks, beacon config, RTS/CTS selection, etc.)

Locally tested:

* RTL8192CU, STA mode

Differential Revision:  https://reviews.freebsd.org/D48081
Reviewed by:    bz
DeltaFile
+1-1sys/dev/rtwn/rtl8192c/r92c_fw.c
+1-11 files

FreeBSD/src eb63145sys/dev/rtwn/rtl8192c r92c_tx.c, sys/dev/rtwn/rtl8192c/usb r92cu_init.c

rtwn: disable a workaround introduced earlier for RTL8192CU TX performance

I'm unable to reproduce the original problem with my RTL8192CU USB
devices with the current codebase and I can't find any reference
to what this power register is doing - I see it defined in drivers,
but it's not described or used anywhere.

This reverts 7f740971658d71c1ee95ee68032b4696c1684845 -
rtwn_usb(4): fix Tx instability with RTL8192CU chipsets

In any case being able to do higher rate RTS/CTS is beneficial.

Local testing:

* rtl8192cu, STA mode, TX/RX testing

PR:             233949

Differential Revision:  https://reviews.freebsd.org/D48026
Reviewed by:    imp
DeltaFile
+0-6sys/dev/rtwn/rtl8192c/r92c_tx.c
+0-2sys/dev/rtwn/rtl8192c/usb/r92cu_init.c
+0-82 files

FreeBSD/src aaaca5fsys/dev/rtwn if_rtwn.c if_rtwn_rx.c, sys/dev/rtwn/rtl8192c r92c_reg.h

rtwn: add a default OFDM / CCK rate for self-generated frames

I noticed during testing that the MAC was generating MCS7 ACKs and
MCS7 block-ACK frames in response to MCS frames from its peer.
This is very suboptimal - it means that unless you're very close
to your peer (in this case a 2GHz AP), you'll end up failing a lot
of ACKs.

Linux faced the opposite problem in rtl8xxxu - the rate set being
programmed in here included a lot MORE rates, including MCS 0->7
and OFDM 6M->54M.  This meant that they were INTENTIONALLY telling
the hardware to transmit at higher rates, and their fix was to
mask out the higher rates so self-generated frames don't try the
high rates at all.

Now, I am not sure why I'm not seeing any OFDM or HT basic rates.
We don't mark any OFDM / HT rates as basic in net80211 (in
ieee80211_phy.c) so I'm going to need to go and do a review of the
standard to see what's up.  Additionally, the HT rate set that we

    [26 lines not shown]
DeltaFile
+34-4sys/dev/rtwn/if_rtwn.c
+26-0sys/dev/rtwn/rtl8192c/r92c_reg.h
+13-5sys/dev/rtwn/if_rtwn_rx.c
+73-93 files

FreeBSD/src 4e2bd8csys/dev/rtwn/rtl8192c r92c_fw.c

rtwn: set the shortgi flag in the RTL8192C rate control setup message

Enable the short-GI flag configuring the rate mask.

Obtained from:

* Realtek vendor driver, rtl8192cu

Differential Revision:   https://reviews.freebsd.org/D48013
Reviewed by:    bz, imp
DeltaFile
+12-2sys/dev/rtwn/rtl8192c/r92c_fw.c
+12-21 files

FreeBSD/src 8e78028sys/netpfil/ipfw ip_fw2.c

ip_fw: address lock order reversal

Maintain lock ordering in ip_fw2.c by tracking any nested locking
using a flag, and then executing the locking in the correct order.

Reported by: Jimmy Zhang
Obtained from: Jimmy Zhang
Sponsored by: NetApp, Inc.
Reviewed By: glebius, ae
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D48069
DeltaFile
+43-28sys/netpfil/ipfw/ip_fw2.c
+43-281 files

FreeBSD/src 3103404cddl/lib/libdtrace tcp.d, sbin/ipf/iplang iplang_y.y

tcp: cleanup of nits after use of accessor tcp_get_flags

Remove unneeded th_x2 initalization, use named constants
instead of magic numbers (fixing one oversight) and add
some line breaks. Expand one man page slightly.

No functional change intended.

Reviewed By: tuexen, cc
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D48065
DeltaFile
+6-4sbin/ipf/libipf/ipft_tx.c
+2-2sbin/ipf/libipf/printpacket.c
+2-2cddl/lib/libdtrace/tcp.d
+1-3usr.sbin/ppp/ip.c
+2-1sbin/ipf/iplang/iplang_y.y
+1-2sbin/ipf/ipsend/iptests.c
+14-143 files not shown
+17-179 files

FreeBSD/src 38663adsys/dev/ixl ixl_pf_main.c

Revert "ixl: fix multicast filters handling"

This reverts commit 89e73359424a338a7900a4854ad7439f5848ebb8.

PR:             281125
Reviewed by:    Krzysztof Galazka <krzysztof.galazka at intel.com>
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1545
DeltaFile
+10-87sys/dev/ixl/ixl_pf_main.c
+10-871 files

FreeBSD/src c91dd7asys/netinet tcp_usrreq.c

tcp: remove unused variable from tcp_usr_disconnect()
DeltaFile
+2-3sys/netinet/tcp_usrreq.c
+2-31 files

FreeBSD/src b762b19sys/dev/mlx5 fs.h, sys/dev/mlx5/mlx5_accel mlx5_ipsec_fs.c

mlx5: Eliminate the use of mlx5_rule_fwd_action

Driver defined all flow context actions in MLX5_FLOW_CONTEXT_ACTION_*,
no need to duplicate them with mlx5_rule_fwd_action.

Sponsored by:   NVidia networking
MFC after:      1 week
DeltaFile
+5-5sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
+0-6sys/dev/mlx5/fs.h
+3-3sys/dev/mlx5/mlx5_core/mlx5_eswitch.c
+2-2sys/dev/mlx5/mlx5_accel/mlx5_ipsec_fs.c
+2-2sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c
+1-1sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
+13-196 files

FreeBSD/src 371a4eesys/dev/rtwn/rtl8192c r92c_fw_cmd.h

rtwn: add SGI flag for the rate control message

This is straight from all the drivers, linux and vendor.

Differential Revision:  https://reviews.freebsd.org/D48004
Reviewed by:    bz, imp
DeltaFile
+1-0sys/dev/rtwn/rtl8192c/r92c_fw_cmd.h
+1-01 files

FreeBSD/src 745a858sys/dev/rtwn if_rtwn_rx.c if_rtwn_rx.h, sys/dev/rtwn/rtl8192c r92c_fw.c

rtwn: update rtwn_get_rates() to separate out the CCK/OFDM and HT rates

The 32 bit bitmap is enough for CCK/OFDM rates and MCS0..15, but
won't work for > MCS15, nor VHT rates.

So, break out the legacy rates and HT rates.

* break the rates and htrates out
* document which calls are looking up basic rates and which care
  about the rates themselves
* ensure the rate bitmap passed into the rate control firmware call
  (which isn't enabled yet!) is capped at 28 bits so they don't
  set the mode field.

Differential Revision:  https://reviews.freebsd.org/D47993
Reviewed by:    bz, imp
DeltaFile
+22-8sys/dev/rtwn/if_rtwn_rx.c
+11-4sys/dev/rtwn/rtl8192c/r92c_fw.c
+2-1sys/dev/rtwn/if_rtwn_rx.h
+2-1sys/dev/rtwn/if_rtwn.c
+2-1sys/dev/rtwn/rtl8812a/r12a_chan.c
+39-155 files

FreeBSD/src 638fcd5sys/dev/rtwn/usb rtwn_usb_var.h

rtwn: bump up the RX USB buffers

We should just keep the RX pipeline busy.

Differential Revision:  https://reviews.freebsd.org/D47990
Reviewed by:    imp
DeltaFile
+1-1sys/dev/rtwn/usb/rtwn_usb_var.h
+1-11 files

FreeBSD/src 25af78dsys/dev/ath/ath_rate/sample sample.c

ath_rate_sample: correct the "best rate" calculation

This should be a *9 rather than a *10 so higher stream MCS rates
(eg comparing MCS0 and MCS8) that have slightly longer average transmit
times (but better burst transmit times) get considered.

This mirrors what the later code does when considering if a rate
change is needed.

Locally tested:

* AR9280, AP mode
* AR9380, AP mode

Differential Revision:  https://reviews.freebsd.org/D47988
Reviewed by:    imp
DeltaFile
+2-1sys/dev/ath/ath_rate/sample/sample.c
+2-11 files

FreeBSD/src 0ea7f8csys/dev/rtwn/rtl8188e r88e_chan.c, sys/dev/rtwn/rtl8188e/pci r88ee_attach.c

rtwn: try enforcing net80211 regulatory / txpower limits for 11n chips

This is an attempt to reverse engineer what the actual transmit power
calculations are doing and apply net80211 limits on them.  It doesn't
look as simple as just applying the check at the end - there are plenty
of places where offsets are calculated between different PHY modes and
1 / 2 antenna MCS transmit rates.

There are also some places where the offset being added is negative,
so handle the potential underflow so when things hit 0, they don't
just wrap and cause the maximum transmit power into the registers.

This is being done to aide in power/performance debugging - if there
are issues with the transmit power being wrongly calculated and are too
high, the output waveform will be distorted and it will effect performance.
Being able to drop the transmit power by a few dB here and there can
quickly identify if this is happening (because suddenly higher MCS
rates / OFDM rates suddenly work better!)


    [12 lines not shown]
DeltaFile
+40-8sys/dev/rtwn/rtl8192e/r92e_chan.c
+30-4sys/dev/rtwn/rtl8188e/r88e_chan.c
+30-1sys/dev/rtwn/rtl8192c/r92c_chan.c
+1-1sys/dev/rtwn/rtl8192c/pci/r92ce_attach.c
+1-1sys/dev/rtwn/rtl8192e/usb/r92eu_attach.c
+1-1sys/dev/rtwn/rtl8188e/pci/r88ee_attach.c
+103-164 files not shown
+107-1810 files

FreeBSD/src 6858c6bsys/dev/rtwn/rtl8192c r92c_chan.c r92c.h, sys/dev/rtwn/rtl8192e r92e_chan.c

rtwn: refactor out the TX power register power dump, condense output

* Refactor out the TX power register register dump - it's done in
  a couple places and it makes sense to refactor it.

* Condense the output into a few lines per transmit chain.  It's
  very long with the 8 and 16 MCS rates, and it made it difficult
  to eyeball what's going on when tweaking TX power.

Differential Revision:  https://reviews.freebsd.org/D47986
Reviewed by:    bz, imp
DeltaFile
+52-12sys/dev/rtwn/rtl8192c/r92c_chan.c
+2-9sys/dev/rtwn/rtl8192e/r92e_chan.c
+1-0sys/dev/rtwn/rtl8192c/r92c.h
+55-213 files

FreeBSD/src b71805esys/dev/rtwn if_rtwn.c if_rtwn_nop.h, sys/dev/rtwn/rtl8192c/pci r92ce_attach.c

rtwn: add APIs for setting transmit power

The RTL8188/RTL8192/RTL8821/RTL8812 NICs all seem happy to have
their transmit power changed at runtime - and it does seem to do
what's expected - the transmit power level does change.

So, add the API call here, even though it's all currently no-ops.
A follow-up commit will land changes for the chipsets to both
limit transmit power to the configured / regulatory limit AND
allow reconfiguration at runtime.

Differential Revision:  https://reviews.freebsd.org/D47979
Reviewed by:    bz, imp
DeltaFile
+9-0sys/dev/rtwn/if_rtwn.c
+6-0sys/dev/rtwn/if_rtwn_nop.h
+4-0sys/dev/rtwn/if_rtwnvar.h
+1-0sys/dev/rtwn/rtl8192c/pci/r92ce_attach.c
+1-0sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c
+1-0sys/dev/rtwn/rtl8192e/usb/r92eu_attach.c
+22-04 files not shown
+26-010 files

FreeBSD/src cf6b389sys/dev/rtwn/rtl8812a r12a_chan.c r12a_reg.h

rtwn: add tx power training for RTL8812/RTL8821

This apparently kicks off TX power level self-calibration, which
can't hurt.

Locally tested:

* RTL8812AU, STA
* RTL8821AU, STA

Obtained from:  Linux rtw88

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

Reviewed by:    bz, imp
DeltaFile
+32-0sys/dev/rtwn/rtl8812a/r12a_chan.c
+1-0sys/dev/rtwn/rtl8812a/r12a_reg.h
+33-02 files