FreeBSD/src 8352e24sys/netlink ktest_netlink_message_writer.c ktest_netlink_message_writer.h

tests/ktest_netlink_message_writer: remove INVARIANTS requirement

INVARIANTS is meant to be used to enable extra sanity checking for
internal structures, not enable/disable tests in the freebsd kyua
test suite.

STABLE branches include a GENERIC kernconf without INVARIANTS, so
ktest_netlink_message_writer is broken on such branches:

https://ci.freebsd.org/job/FreeBSD-stable-15-amd64-test/253/testReport/sys.netlink.test_netlink_message_writer/py/__test_cases_list__/

Reviewed by:    lwhsu, imp
Approved by:    lwhsu (mentor)
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1889
MFC after:      3 days
Signed-off-by:  Siva Mahadevan <siva at FreeBSD.org>
Sponsored by:   The FreeBSD Foundation
DeltaFile
+0-5sys/netlink/ktest_netlink_message_writer.c
+1-1sys/netlink/ktest_netlink_message_writer.h
+1-62 files

FreeBSD/src 2b1db07sys/amd64/include ifunc.h, sys/i386/include ifunc.h

x86: add machine/ifunc.h

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+5-0sys/amd64/include/ifunc.h
+5-0sys/i386/include/ifunc.h
+10-02 files

FreeBSD/src dfc4186sys/x86/x86 local_apic.c

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
DeltaFile
+34-6sys/x86/x86/local_apic.c
+34-61 files

FreeBSD/src 4b96204sbin/mdmfs mdmfs.c

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
DeltaFile
+2-10sbin/mdmfs/mdmfs.c
+2-101 files

FreeBSD/src 14dce73usr.sbin/syslogd/tests syslogd_test_common.sh syslogd_test.sh

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
DeltaFile
+7-2usr.sbin/syslogd/tests/syslogd_test_common.sh
+5-3usr.sbin/syslogd/tests/syslogd_test.sh
+12-52 files

FreeBSD/src 92d2514usr.sbin/syslogd/tests syslogd_test_common.sh syslogd_test.sh

syslogd/tests: Improve loopback interface initialization

- In syslogd_start(), assign the lo0 address in the specified jail.
- Use the correct netmask.

Reviewed by:    jlduran
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D54799
DeltaFile
+5-3usr.sbin/syslogd/tests/syslogd_test_common.sh
+0-4usr.sbin/syslogd/tests/syslogd_test.sh
+5-72 files

FreeBSD/src 560c229usr.sbin/syslogd/tests syslogd_test.sh syslogd_forwarded_format_test.sh

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]
DeltaFile
+112-129usr.sbin/syslogd/tests/syslogd_test.sh
+16-26usr.sbin/syslogd/tests/syslogd_forwarded_format_test.sh
+33-0usr.sbin/syslogd/tests/syslogd_test_common.sh
+12-18usr.sbin/syslogd/tests/syslogd_relayed_format_test.sh
+11-17usr.sbin/syslogd/tests/syslogd_basic_format_test.sh
+0-1usr.sbin/syslogd/tests/syslogd_format_test_common.sh
+184-1916 files

FreeBSD/src ffdbc1busr.sbin/syslogd/tests syslogd_test.sh syslogd_test_common.sh

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
DeltaFile
+31-29usr.sbin/syslogd/tests/syslogd_test.sh
+7-0usr.sbin/syslogd/tests/syslogd_test_common.sh
+38-292 files

FreeBSD/src dec3ea4lib/libiconv_modules/mapper_std citrus_mapper_std.c

libiconv: Fix typo in comment
DeltaFile
+1-1lib/libiconv_modules/mapper_std/citrus_mapper_std.c
+1-11 files

FreeBSD/src 129aec7lib/libfetch fetch.3 common.c

libfetch: allow disabling TLS v1.3 when the connection

MFC after:      3 days
DeltaFile
+8-4lib/libfetch/fetch.3
+2-0lib/libfetch/common.c
+10-42 files

FreeBSD/src 8f8a7f6lib/libfetch common.c

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
DeltaFile
+8-0lib/libfetch/common.c
+8-01 files

FreeBSD/src ad99329sys/x86/cpufreq hwpstate_amd.c

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
DeltaFile
+7-1sys/x86/cpufreq/hwpstate_amd.c
+7-11 files

FreeBSD/src eacc501usr.bin/truncate truncate.c, usr.bin/truncate/tests truncate_test.sh

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
DeltaFile
+48-0usr.bin/truncate/tests/truncate_test.sh
+2-1usr.bin/truncate/truncate.c
+50-12 files

FreeBSD/src 6c61f58sys/contrib/dev/athk/ath10k testmode.c core.c

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
DeltaFile
+234-41sys/contrib/dev/athk/ath10k/testmode.c
+11-17sys/contrib/dev/athk/ath10k/core.c
+18-1sys/contrib/dev/athk/ath10k/wmi.h
+15-0sys/contrib/dev/athk/ath10k/testmode_i.h
+5-1sys/contrib/dev/athk/ath10k/core.h
+1-1sys/contrib/dev/athk/ath10k/qmi.c
+284-612 files not shown
+286-628 files

FreeBSD/src 80ba893sys/contrib/dev/rtw88 bf.c bf.h, sys/modules/rtw88 Makefile

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
DeltaFile
+7-1sys/contrib/dev/rtw88/bf.c
+7-0sys/contrib/dev/rtw88/bf.h
+3-1sys/contrib/dev/rtw88/sdio.c
+2-0sys/contrib/dev/rtw88/rtw8822bu.c
+2-0sys/contrib/dev/rtw88/rtw8822cu.c
+1-1sys/modules/rtw88/Makefile
+22-36 files

FreeBSD/src d4d13a5sys/netinet sctp_bsd_addr.c

sctp: support bridge interfaces

Reported by:    Timo Völker
Tested by:      Timo Völker

(cherry picked from commit 8d82dafa568baf7be46e5e443dd7310986a28aa9)
DeltaFile
+1-0sys/netinet/sctp_bsd_addr.c
+1-01 files

FreeBSD/src 2e19631sys/dev/dwc if_dwc.c

dwc: cleanup

No functional change intended.

Reviewed by:            Timo Völker
Differential Revision:  https://reviews.freebsd.org/D54788

(cherry picked from commit 3d771e0db66da77da5a7f323df1c0638e6b586ea)
DeltaFile
+6-10sys/dev/dwc/if_dwc.c
+6-101 files

FreeBSD/src 6f8adc8sys/modules/sctp Makefile

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)
DeltaFile
+0-1sys/modules/sctp/Makefile
+0-11 files

FreeBSD/src cb94b17usr.bin/netstat sctp.c

netstat: fix typo

(cherry picked from commit 0ef8f7133d0f1ee28af1689f013f18e002eeae9f)
DeltaFile
+1-1usr.bin/netstat/sctp.c
+1-11 files

FreeBSD/src 75ea0edsys/dev/dwc if_dwc.c dwc1000_dma.c

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)
DeltaFile
+3-3sys/dev/dwc/if_dwc.c
+2-2sys/dev/dwc/dwc1000_dma.c
+1-1sys/dev/dwc/dwc1000_core.c
+6-63 files

FreeBSD/src 97f7fb0sys/dev/dwc if_dwc.c dwc1000_dma.c

dwc: add transmit checksum offload for IPv6

This patch adds support for transmit checksum offload for TCP/IPv6
and UDP/IPv6.

Reviewed by:            Timo Völker
Differential Revision:  https://reviews.freebsd.org/D54754

(cherry picked from commit aca67c37a5215448828a2974a2ff44e75e9159bc)
DeltaFile
+8-2sys/dev/dwc/if_dwc.c
+1-1sys/dev/dwc/dwc1000_dma.c
+9-32 files

FreeBSD/src 8c54cf5sys/dev/dwc if_dwc.c

dwc: prepare for IPv6 transmit checksum offloading

No functional change intended.

(cherry picked from commit 97b177f51fb939943ef920415e541d00789d12f4)
DeltaFile
+3-3sys/dev/dwc/if_dwc.c
+3-31 files

FreeBSD/src a148f7eshare/man/man4 bge.4, sys/dev/bge if_bge.c

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)
DeltaFile
+13-1sys/dev/bge/if_bge.c
+9-1share/man/man4/bge.4
+22-22 files

FreeBSD/src fac164csys/netinet6 ip6_output.c

ipv6: account for jumbo payload option

If a jumbo payload option is added, the length of the mbuf chain is
increased by 8 but the actual hop-by-hop extension header with the
jumbo playload option is only inserted in the packet if there are
other options. Therefore, adjust optlen to reflect the actual size
of IPv6 extension headers including the hop-by-hop extension header
containing the jumbo payload option.

Reported by:            syzbot+73fe316271df473230eb at syzkaller.appspotmail.com
Reviewed by:            markj, Timo Voelker
Differential Revision:  https://reviews.freebsd.org/D54394

(cherry picked from commit 1f5b1de1fdf2924066c1851ed6c73f36fe20b438)
DeltaFile
+1-0sys/netinet6/ip6_output.c
+1-01 files

FreeBSD/src decd5easys/dev/dwc dwc1000_dma.c

dwc: improve IPv4 transmit checksum offloading

This patch provides two improvements for TCP/IPv4 and UDP/IPv4
transmit checksum offloading:
(1) Use *CIC_SEG instead of *CIC_FULL, since FreeBSD always provides
    a pseudo header checksum.
(2) Don't make transmit IPv4 header checksum offloading a prerequisite
    for TCP/IPv4 or UDP/IPv4 transmit checksum offloading.
This is the root cause of PR 291696, since right now the epair
interface does not support transmit IPv4 header checksum offloading,
but TCP/IPv4 and UDP/IPv4 transmit checksum offloading.

PR:                     291696
Reviewed by:            Timo Voelker
Tested by:              Marek Benc
Differential Revision:  https://reviews.freebsd.org/D54395

(cherry picked from commit f8ddf74175c8013268e65b18750e247306fa088a)
DeltaFile
+7-14sys/dev/dwc/dwc1000_dma.c
+7-141 files

FreeBSD/src ba49ad5sys/netinet ip_output.c

tcp: fix checksum calculation bug

The new function in_delayed_cksum_o() was introduced to compute
the checksum in the case the mbuf chain does not start with the
IP header. The offset of the IP header is specified by the
parameter iph_offset.
If iph_offset was positive, the function computed an incorrect
checksum.

Reviewed by:            sobomax, tuexen
Fixes:                  5feb38e37847 ("netinet: provide "at offset" variant of the in_delayed_cksum() API")
Differential Revision:  https://reviews.freebsd.org/D54269

(cherry picked from commit c8b3b605ae854ead6c8804e0400d80cb8fa73fdf)
DeltaFile
+2-2sys/netinet/ip_output.c
+2-21 files

FreeBSD/src 4666ba9sys/dev/virtio/network if_vtnet.c

vtnet: improve consistency

Use sbuf_new_for_sysctl() instead of sbuf_new_auto() when exposing
the flags via sysctl.

(cherry picked from commit 8da838ac31692e381adfc63d83ea49f2adabbf23)
DeltaFile
+6-8sys/dev/virtio/network/if_vtnet.c
+6-81 files

FreeBSD/src c9e4a98share/man/man4 vtnet.4, sys/dev/virtio/network if_vtnet.c virtio_net.h

vtnet: expose features via sysctl tree

Right now the 64-bit flags field needs to be casted to a 32-bit field,
because clang warns if more than 32-bits are used.
Once clang is fixed, this restriction will be removed and more bits
will be added.

Reviewed by:            markj, Timo Völker
Differential Revision:  https://reviews.freebsd.org/D54288

(cherry picked from commit 634d9c0d111b630c3d63a1cf25d15c32a37afab8)
DeltaFile
+18-0sys/dev/virtio/network/if_vtnet.c
+8-0sys/dev/virtio/network/virtio_net.h
+3-1share/man/man4/vtnet.4
+29-13 files

FreeBSD/src ccfd678share/man/man9 printf.9, sys/kern subr_prf.c

printf.9: Support more than 32 bits in %b

This will be usable after clang has been extended to accept length
modifiers for %b when compiling kernel code.
But we need FreeBSD to support it first...

Reviewed by:            markj, Timo Völker
Differential Revision:  https://reviews.freebsd.org/D54286

(cherry picked from commit d2cb9cab8457b2a84898f0ac86f7b45e907f872c)
DeltaFile
+31-9sys/kern/subr_prf.c
+18-7share/man/man9/printf.9
+49-162 files

FreeBSD/src 18b92d6share/man/man9 printf.9

printf.9: fix style

Follow the style described by style.9.

Reported by:    markj

(cherry picked from commit 391e8709315d4a0e8f5ba91912e370571ab6841b)
DeltaFile
+1-2share/man/man9/printf.9
+1-21 files