CONTRIBUTING.md: Tweaks for clarity
Add a few tweaks to clarify the author and signed-off-by lines. Add
clarifying note about the style checker. Refine the AI statements
for clarity, but these will need to be revised once the AI policy
has been completed.
Sponsored by: Netflix
mt76: update Mediatek's mt76 driver
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
24d479d26b25bce5faea3ddd9fa8f3a6c3129ea7 ( tag: v6.19-rc6 ).
Notable change: license got switched from ISC to BSD-3-Clause-Clear.
util.h is now imported from upstream given it is no longer GPL-only.
See the upstream repository 909675fd4344f73aad5f75f123bd271ada2ab9fb
and a96fed2825d8dfb068bf640419c619b5f2df4218.
For us the new version should also help with page pools and DMA32.
Sponsored by: The FreeBSD Foundation
buf_ring: Rename some variables
The elements we store in buffer rings are buffers, so refer to them as
`buf` throughout instead of a mixture of `buf`, `ret`, and `new`,
especially since the latter breaks C++ code that directly or indirectly
includes this header.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: siderop1_netapp.com, markj
Differential Revision: https://reviews.freebsd.org/D54827
xdr_string: don't leak strings with xdr_free
Historically (and in a small amount of older software such as OpenAFS),
developers would attempt to free XDR strings with
xdr_free((xdrproc_t)xdr_string, &string)
This resulted in xdr_free calling xdr_string with only two intentional
arguments and whatever was left in the third argument register. If the
register held a sufficently small number, xdr_string would return FALSE
and not free the string (no one checks the return values).
Software should instead free strings with:
xdr_free((xdrproc_t)xdr_wrapstring, &string)
Because buggy software exists in the wild, act as though xdr_wrapstring
was used in the XDR_FREE case and plug these leaks.
[5 lines not shown]
rpc/xdr.h: make xdrproc_t always take two arguments
The type of xdrproc_t is clearly defined in the comments as a function
with two arguments, an XDR * and a void * (sometimes spelled caddr_t).
It was initialy defined as:
typedef bool_t (*xdrproc_t)();
At some point people started giving it a non-empty argument list.
Unfortunatly, there has been widespread disagreement about how arguments
are passed. There seems to have been a widespread view that it should
be allowed to pass three argument function pointer to xdrproc_t. Most
notable is xdr_string which takes a maximum length parameter. This lead
to all sorts of prototypes (all of which have been present in the
FreeBSD source tree):
FreeBSD userspace (nominally from tirpc, but seemingly local):
typedef bool_t (*xdrproc_t)(XDR *, ...);
FreeBSD kernel, glibc:
[36 lines not shown]
dpnaa2: announce transmit checksum support
Let the network stack know that the NIC supports checksum offloading
for the IPv4 header checksum and the TCP and UDP transport checksum.
This avoids the computation in software and therefore provides the
expected performance gain.
PR: 292006
Reviewed by: dsl, Timo Völker
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54809
14.4: Update stable/14 to -PRERELEASE
This marks the start of the FreeBSD 14.4 release cycle; the stable/14
tree is now in "code slush".
Developers are encouraged to prioritize fixing bugs (and/or merging bug
fixes from HEAD) over new features at this time. Commit approval from
re@ is not required but if new features introduce problems they may be
removed from the release.
Approved by: re (implicit)
Sponsored by: OpenSats Initiative
x86 lapic: Dump LVTs from the ddb show lapic command
Add description for each LVT element, use it in show lapic dump.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
mdmfs: Fix soft updates logic
Now that newfs(8) has a command-line argument to disable soft updates,
use that instead of running tunefs(8) after the fact to turn them off.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: mckusick, imp
Differential Revision: https://reviews.freebsd.org/D54783
syslogd/tests: Fix flakiness in forwarding tests
syslogd_start() waits for the local log socket to appear before
returning, to ensure that the daemon is ready to handle log messages.
Some tests start two daemons, so by default the socket already exists
when the second daemon is started, so syslogd_start() returns early.
The test subsequently sends a message to this second daemon, which
sometimes isn't ready.
Define a separate log socket for the second daemon. Add a check to
syslogd_start() to help catch this type of bug.
Reviewed by: jlduran
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D54800
syslogd/tests: Address races
I occasionally see failures in the syslogd test suite. The problem is
that the tests are racy: they send a message using logger(1), then
immediately check whether the message was logged to a log file. If the
syslogd instance under test doesn't get a chance to run before the
second step, the test fails.
This change reworks things to avoid the race while minimizing the amount
of time sleeping.
1) Each test uses a single logfile, so have them use a new common
variable, SYSLOGD_LOGFILE, instead of something test-specific.
2) In syslogd_start(), if the configuration references SYSLOGD_LOGFILE,
wait for it to be created by syslogd before returning.
3) Add a helper syslogd_check_log(), to check for a given log entry in
the last line of SYSLOGD_LOGFILE, instead of using atf_check
directly.
4) In syslogd_check_log(), poll the logfile until the desired log entry
appears, or the test times out.
[8 lines not shown]
syslogd/tests: Use a helper function to log from within a jail
This is just for consistency with all other logger(1) invocations, which
happen from the syslogd_log() function.
No functional change intended.
Reviewed by: jlduran
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D54778
libfetch: apply timeout to SSL_read()
Currently, fetchTimeout works for non-SSL connections only, so does fetch -T.
Fix it applying specified timeout to SSL_read().
MFC after: 3 days
hwpstate: Add CPPC enable tunable
The Framework 13 runs very hot the maximum frequency is possible. By
disabling CPPC (reverting to Cool`n'Quiet 2.0) we can use powerd to
limit the CPU frequency to 2200, thereby reducing the CPU temperature.
Some systems may run slower with CPPC enabled. See PR/292615 for that
bug.
Those experiencing either of these issues may add the following to
their loader.conf or device.hints to disable CPPC:
machdep.hwpstate_amd_cppc_enable="0"
PR: 292615
Reviewed by: lwhsu, olce
Differential revision: https://reviews.freebsd.org/D54803
truncate: fix a minor nit + add a hole-punching test
The struct spacectl_range we use is only really used in these three
lines of code, so re-scope it down to just the dealloc branch. This is
marginally easier to reason about what might be necessary to replace in
porting our truncate(1) to other platforms.
While we're here, add a test for the -d flag to be sure it really does
punch a hole in the file. The test also tries to confirm that it does
not disturb other segments of the file in the process, just to inspire
some confidence that it's not corrupting the file somehow.
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D51207
ath10k: update Atheros/QCA's ath10k driver
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
24d479d26b25bce5faea3ddd9fa8f3a6c3129ea7 ( tag: v6.19-rc6 ).
Sponsored by: The FreeBSD Foundation
rtw88: update Realtek's rtw88 driver
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
24d479d26b25bce5faea3ddd9fa8f3a6c3129ea7 ( tag: v6.19-rc6 ).
Sponsored by: The FreeBSD Foundation
sctp: improve compilation as module
When compiling SCTP as a module, don't compile sctp_crc32.c into
the module. This avoids code and variable duplication since
sctp_crc32.c is compiled into the kernel. In particular, the variable
system_base_info is not duplicated. This fixes the handling of the
statistic counters sctps_sendhwcrc and sctps_sendswcrc when using
sctp_delayed_cksum.
(cherry picked from commit 68a449f09e2a38def9df822d42f91ecd2f27b0e2)
dwc: add receive checksum offload for IPv6
This patch adds support for receive checksum offload for TCP/IPv6
and UDP/IPv6. Since receive checksum offload can't be configured
separately for IPv4 and IPv6, IFCAP_RXCSUM and IFCAP_RXCSUM_IPV6
can't be changed independently.
Reviewed by: Timo Völker
Differential Revision: https://reviews.freebsd.org/D54756
(cherry picked from commit 5d8777f3a7aee04eabbc9f3cf12138f9b56e3ebc)
bge: disable TXCSUM if UDP transmit checksum offloading is disabled
The bge interface is special with respect to transmit checksumi
offloading. In the default settings, an bge interface announces TXCSUM
capabilities, but only supports TCP/IPv4 and not UDP/IPv4 due to
limitations of some of the NICs. This results in problems when the bge
interface becomes a member of a bridge. Since currently only the
TXCSUM capabilities are synced when a member is added to a bridge and
not the protocol specific capabilities, this can result in a situation
where UDP packets are sent out using a bge interface without having a
correct checksum.
To mitigate this problem, initially don't announce TXCSUM capabilities,
when UDP transmit checksum is disabled. It is still possible to enable
TXCSUM capabilities via ifconfig.
PR: 291420
Reviewed by: Timo Voelker
Differential Revision: https://reviews.freebsd.org/D54486
(cherry picked from commit bbd30927b1af44226c8de0512912a7fedfce2824)