Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge FreeBSD 2024-10-18 #2304

Merged
merged 520 commits into from
Jan 28, 2025
Merged

Merge FreeBSD 2024-10-18 #2304

merged 520 commits into from
Jan 28, 2025

Conversation

bsdjhb
Copy link
Collaborator

@bsdjhb bsdjhb commented Jan 28, 2025

PR for CI

ngie-eign and others added 30 commits October 18, 2024 17:44
This change updates the version of expat referenced from 2.6.0 to 2.6.3,
correcting documentation post-ffd294a1f4c23863c3e515d16dce31d5509bcb01.

Bump .Dd for the change.

MFC with:	ffd294a
Differential Revision:	https://reviews.freebsd.org/D46865
…6c78583a4'

This helps bootstrap the mergeinfo so future googletest imports can be
done more easily.

Suggested by:	jrtc27
Fixes:	28f6c2f

git-subtree-dir: origin/googletest
git-subtree-mainline: bcf81d7
git-subtree-split: 8ef4914
…e08873426c78583a4'"

I used the wrong prefix for googletest; try again.

This reverts commit a52d355, reversing
changes made to bcf81d7.
This will help ensure that future vendor updates for this component will
be more seamless.

Suggested by:	jtrc27
Fixes:		28f6c2f
igc is derived from igb and has never had an AIM implementation. The
same algorithm from e1000 is appropriate here.

Upon more detailed study of the Linux driver which has a newer AIM
implementation, it finally became clear to me this is actually a
holdoff timer and not an interrupt limit as it is conventionally
(statically) programmed and displayed as an interrupt rate. The data
sheets also make this somewhat clear.

Thus, AIM accomplishes two beneficial things for a wide variety of
workloads[1]:

1. At low throughput/packet rates, it will significantly lower latency
(by counter-intuitively "increasing" the interrupt rate.. better
thought of as decreasing the holdoff timer because you will modulate
down before coming anywhere near these interrupt rates).
2. At bulk data rates, it is tuned to achieve a lower interrupt rate
(by increasing the holdoff timer) than the current static 8000/s. This
decreases processing overhead and yields more headroom for other work
such as packet filters or userland.

For a single NIC this might be worth a few sys% on common CPUs, but may
be meaningful when multiplied such as if_lagg, if_bridge and forwarding
setups.

The AIM algorithm was re-introduced from the older igb or out of tree
driver, and then modernized with permission to use Intel code from other
drivers.

[1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/gbe-controllers-interrupt-moderation-appl-note.pdf

MFC after:	1 week
Relnotes:	yes
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Sponsored by:	BBOX.io
Differential Revision:	https://reviews.freebsd.org/D47053
This driver allows only exactly one instance to be created. Clone
creating additional interfaces, e.g. `ifconfig enc1 create`, will get
error EEXIST which is somewhat confusing.

Convert to new KPI for less confusing error ENOSPC.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45758
Ethernet drivers should respect IFF_PROMISC rather than IFF_PPROMISC.
The latter is for user-requested promisc mode, it implies the former
but not vice versa. Some in-kernel components such as if_bridge(4) and
bpf(4) will set promisc mode for interfaces on-demand.

While here, update the debugging message to be not confusing.

This was spotted while reviewing markj@ 's work D46524.

Test from Franco shows that the interface seems to be unconditionally
initialized to promisc mode regardless of this fix. That needs further
investigation.

Reviewed by:	markj, Franco Fichtner <[email protected]>
Tested by:	Franco Fichtner <[email protected]>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D46794
Right now flags is set to 0 before this "=" -> "|=" change, but it will
matter when the NOT_YET section above becomes effective.

MFC after:	2 weeks
Sponsored by:	Amazon
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41424
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41408
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41417
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41418
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41427
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41422
Reviewed by:	dees
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41414
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41413
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41428
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41390
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41432
Reviewed by:	des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D41423
Replace spelled-out bits with pre-defined macros for those same bits.
No functional change.

PR: 170076
Reviewed by: imp
Standalone compile that we at least create these opt_*.h files.

Sponsored by:		Netflix
0480dcc tried to fix the MTU for software VLANs given dpni
announces IFCAP_VLAN_MTU.  Unfortunately the initial MRU during
setup is reduced from the maximum supported by the HW to our
maximum ethernet RX frame length so only after further mtu toggles
the solution there would work.
Set the maximum RX frame size (without CRC) to jumbo length +
vlan encap len by default given we also announce IFCAP_JUMBO_MTU.

While here improve the manual (ioctl) MTU setting by checking if
IFCAP_VLAN_MTU is currently enabled and only then add the extra
bytes.

Fixes:		0480dcc
MFC after:	3 days
Reviewed by:	dsl
Differential Revision: https://reviews.freebsd.org/D47066
PR:	233861
Reviewed by:	lwhsu, imp
Differential Revision:	https://reviews.freebsd.org/D18482
This should have been commited with bc9402a, need to account for
link_speed of 2500 as well on igc.

MFC after:	6 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Sponsored by:	BBOX.io
When we reassemble a packet we potentially invalidate the pd->src and pd->dst
pointers as they point into the packet. Reset those after reassembly.

Reported by:	markj, KASAN
Sponsored by:	Rubicon Communications, LLC ("Netgate")
christosmarg and others added 28 commits January 27, 2025 18:05
Both conditions are the same, so the second one is unreachable.

PR:		229550
Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	andreast, markj
Differential Revision:	https://reviews.freebsd.org/D47167
Showcase how to detach ppt from a PCI device and attach a host driver,
and vice-versa.

MFC after:	2 days
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D46811
A new utility which dumps MIDI 1.0 events in real-time.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D46418
PR:	282171
MFC after:	3 days
There is a long-standing issue on RISC-V around --gc-sections when
statically linking, which affects the bootstrap build of LLVM. Since
fixing this properly has remained a TODO for years, commit the
workaround with documentation so that building natively from source
works out of the box.

PR:		258358
MFC after:	1 week
Release notes at
	https://nlnetlabs.nl/news/2024/Oct/17/unbound-1.22.0-released/

MFC after:	1 week

Merge commit '0a6d797cf6eb751d7eb613900cd19803e05d905f' into main
The testcode and testdata directories are not used by FreeBSD.
Remove them.

MFC after:	1 week
When adding support to rtld-elf I neglected the fact that static
binaries can have IFUNCs. Add support for this too.

Fixes:		729d2b1 ("rtld-elf: Support IFUNCs on riscv")
MFC after:	1 week
reloc.c is conditionally included by libc_start1.c so existing builds
don't feature it in the .depend file and won't know they need to rebuild
libc_start1.c.

MFC after:	1 week
Apparently newer versions of binutils complain instead of silently
ignoring the unknown -z option.

Reported by:	bz
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D47176
Driver requests are done with stack allocated request.  The request is
put on the tailq and then we msleep(9) until kernel process processes it.
If we timeout from this sleep, the kernel process may still read the
request from our stack, which may already be reused by some other code.

Make this sleep unbound and rely on the kernel process that does all its
I/O with timouts and will eventually wake us up.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D47179
The libkldelf library was originally a part of kldxref(8). It exposed
ELF parsing helpers specialized in parsing KLDs and the kernel
executable. The library can be used to read metadata such as linker_set,
mod_depend, mod_version and PNP match info, and raw data from the ELF.

To promote the reuse of the facilities the ELF parsing code is separated
from kldxref(8) into a new private library.

For now, libkldelf's source files will be compiled into kldxref(8)
directly if kldxref is built during bootstrapping phase. The reason is
linking kldxref(8) against the libkldelf static library has an unwanted
side effect which renders the linker sets inside the libkldelf
implementation empty if the static library is not build by ld -r all the
.o files into a single .o before producing the static library.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	markj
Suggested by:	jrtc27, markj
Differential Revision:	https://reviews.freebsd.org/D46719
The elf_lookup_symbol function looks up the symbol with a given symbol
name. A pointer to the GElf_Sym of the symbol is returned if the symbol
exists in the opened ELF file.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D46764
Sponsored by:	Juniper Networks, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D46893
This creates a circular dependency for OpenZFS's libspl in sys/uio.h,
and it shouldn't be needed since the system limits.h already defines
IOV_MAX, so delete it, and unconditionally assert that to be the case.
Otherwise the re-include of libspl's sys/uio.h tries to use PAGESIZE
before it has been defined by OpenZFS's own sys/param.h.

Fixes:		7a7741a ("zfs: merge openzfs/zfs@b10992582")
MFC after:	1 week
Add it to tools/build/Makefile with a short note of where it's needed,
rather than hamfistedly copying it into the tools/build hierarchy.

Reported by:	jrtc27
Reviewed by:	jrtc27
Fixes:	aad5078 ("Fix the cross-build after recent commits")
Differential Revision:	https://reviews.freebsd.org/D46854
Some architectures don't need any arguments, whilst others need auxargs,
which they get by passing in env thanks to INIT_RELOCS referencing the
local variable in __libc_start1(_gcrt) by name. This is unnecessarily
confusing, fragile (one has to look at INIT_IRELOCS's definition to see
that it uses env) and duplicates code between architectures.

Instead, implement it more like rtld-elf. Each architecture provides an
ifunc_init that takes the auxargs directly, and those that don't need it
can just ignore it.

Reviewed by:	kib
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47188
This change updates the version of expat referenced from 2.6.0 to 2.6.3,
correcting documentation post-ffd294a1f4c23863c3e515d16dce31d5509bcb01.

Bump .Dd for the change.

MFC with:	ffd294a
Differential Revision:	https://reviews.freebsd.org/D46865
…6c78583a4'

This helps bootstrap the mergeinfo so future googletest imports can be
done more easily.

Suggested by:	jrtc27
Fixes:	28f6c2f

git-subtree-dir: origin/googletest
git-subtree-mainline: bcf81d7
git-subtree-split: 8ef4914
…e08873426c78583a4'"

I used the wrong prefix for googletest; try again.

This reverts commit a52d355, reversing
changes made to bcf81d7.
This will help ensure that future vendor updates for this component will
be more seamless.

Suggested by:	jtrc27
Fixes:		28f6c2f
@bsdjhb bsdjhb merged commit 79faefc into CTSRD-CHERI:dev Jan 28, 2025
29 checks passed
@bsdjhb bsdjhb deleted the merge-freebsd-20241018 branch January 28, 2025 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.