pci_user: Rename _old to _freebsd6
The pre-freebsd7 stuff is labeled _old right now. Relabel it as
_freebsd6 instead. No functional change intended. I selected freebsd6
because that's the last version to have the ioctls, although I know
there were changes in the interface for 4, 5 and 6. This broadly batches
what we do with system calls that accumulate changes until we break and
use a new one, we use the last major the system call was in.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D45867
LinuxKPI: move __kmalloc from slab.h to slab.c
In order to allow the allocator to change in the future move it into
the implementation file from being an inline function in the header.
While here factor out the size calculation and add a comment as-to why
this is done. We will need the size (_s) in the future to make a
decision on how to allocate.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D45815
nullfs: Use an a_gen field to cast to vop_generic_args
Instead of casting a vop_F_args object to vop_generic_args, use a
vop_F_args.a_gen field when calling null_bypass(). This way we don't
hardcode the vop_generic_args data type in the callers of null_bypass().
Before this change, there were 3 null_bypass() calls using
a vop_F_args.a_gen field and 5 null_bypass() calls using a cast to
vop_generic_args. This change makes all null_bypass() calls consistent
and easier to maintain.
Pointed out by: jrtc27
Reviewed by: kib, oshogbo
Accepted by: oshogbo (mentor)
Differential Revision: https://reviews.freebsd.org/D37359
net80211: scan/internal: change boolean argument from int to bool
ieee80211_probe_curchan() passes a "force" argument which is bool.
Make it such. Adjust the (*sc_scan_probe_curchan)() KPI to bool
as well. This is all a big NOP as the only implementor of this
function, ieee80211_swscan_probe_curchan(), does not use the argument
at all.
I came across this when pondering a different scan implementation.
Rather than dropping the change remove the argument from the function,
and push the cleanup out given it is purely net80211 internal code
(the argument may have reason for existance in the future).
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45816
libc/getnameinfo: stop adding NI_NUMERICHOST where inappropriate
Checking the first nibble of the IPv6 address to be 0 and then
excluding two well known cases (v4-mapped, loopback) leaves us with
more cases where the first nibble could be 0, e.g., the RFC 6052,
2.1 Well-Known Prefix 64:ff9b::/96.
It is not practical to track them all and it is not clear what lead
to this special casing originally, so remove them.
While here also remove the IN6_IS_ADDR_LINKLOCAL() + NI_NUMERICHOST
case as link-local address resolution does exist.
We do leave the IN6_IS_ADDR_MULTICAST() case for now as I could
not find any references to any official reverse lookups for these.
Adding comments for more case (and some historic behaviour) in order
to make it easier to follow the logic.
PR: 279618
[4 lines not shown]
LinuxKPI/lindebugfs: stop panicing in lindebugfs, fix simple_read_from_buffer
Trying to use lindebugfs for debugging wirless drivers two issues
became apparent:
(a) a panic in lindebugfs calling a hard coded release function if the
caller had not provided one. This seems to be based on assumptions
that no longer hold up. Remove the hard coded release function to
prevent panics.
(b) In LinuxKPI simple_read_from_buffer() would call copy_to_user() but
buffers weren't setup for this (lindebugfs copies data from its
own buffer) and then pseudofs will do another copyout to the user
on this; remove the copy_to_user() and simply copy the data over
to the provided buffer; this works for as long as the only consumers
remain debugfs callers (which currently seems to be the case).
[the only out-of-tree consumers I am aware off are two drm-kmod
drivers/gpu/drm/amd/pm/* debugfs functions I cannot test].
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
[2 lines not shown]
kern_malloc: fold free and zfree together into one __always_inline func
free() and zfree() are essentially the same copy and pasted code with
the extra explicit_bzero() (and formerly kasan) calls. Add a bool to add
the extra functionality and make both functions a wrapper around the common
code and let the compiler do the optimization based on the bool input
when inlining.
No functional changes intended.
Suggested by: kib (in D45812)
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D46101
Deprecate contigfree(9) in favour of free(9)
As of 9e6544dd6e02c46b805d11ab925c4f3b18ad7a4b contigfree(9) is no longer
needed and should not be used anymore. We leave a wrapper for 3rd party
code in at least 15.x but remove (almost) all other cases from the tree.
This leaves one use of contigfree(9) untouched; that was the original
trigger for 9e6544dd6e02 and is handled in D45813 (to be committed
seperately later).
Sponsored by: The FreeBSD Foundation
Reviewed by: markj, kib
Tested by: pho (10h stress test run)
Differential Revision: https://reviews.freebsd.org/D46099
amd64 pmap: Optimize PKU lookups when creating superpage mappings
Modify pmap_pkru_same() to update the prototype PTE at the same time as
checking the address range. This eliminates the need for calling
pmap_pkru_get() in addition to pmap_pkru_same(). pmap_pkru_same() was
already doing most of the work of pmap_pkru_get().
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D46135
Avoid division in round_up.
Division may require a function call, leading to
dynamic function lookup, leading to deadlock in rtld.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1343
netinet6 tests: Add a regression test for default router handling
This serves as a regression test for commit a48df53e4249.
Reviewed by: bz, allanjude
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Sponsored by: Bell Tower Integration
Differential Revision: https://reviews.freebsd.org/D46136
nvmfd: Permit setting the MAXH2CDATA value via -H
This value is advertised to the remote host for TCP associations and
determines the maximum data payload size the remote host is permitted
to transmit in a single PDU.
Sponsored by: Chelsio Communications
nvmfd: Correct usage description
During development the command line options for PDU digests for
nvmecontrol(8) and nvmfd(8) were renamed to align with Linux's nvme(1)
command, but the usage description in nvmfd(8) had a mix of the old
and new options.
Sponsored by: Chelsio Communications
libnvmf: Require MAXH2CDATA to be a multiple of 4
The spec says MAXH2CDATA to is "a multiple of dwords and should be no
less than 4,096".
Sponsored by: Chelsio Communications
nvmfd: Stop setting MAXR2T in association parameters
This is only used for the host side of an association. The controller
obtains this value from the host during connection negotiation.
Sponsored by: Chelsio Communications
nvmf_tcp: Rename max_c2hdata sysctl to max_transmit_data
This sysctl sets a cap on the maximum payload of transmitted data PDUs
including both C2H_DATA and H2C_DATA PDUs, not just C2H_DATA PDUs.
Sponsored by: Chelsio Communications
LinuxKPI: 802.11: support manual lladdr changes
Allow a user to change the "ether" address by ifconfig while a VAP is
not UP. Compared to net80211 (given we have no callback) we register
an eventhandler per-vif (a global one would force us to use hacks to
derive if a vap is indeed also a lkpi_80211 vif).
Sponsored by: The FreeBSD Foundation
PR: 277356
Tested by: lwhsu
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D46121
Merge commit 28a2b85602a5 from llvm-project (by Kazu Hirata):
[DeadStoreElimination] Use SmallSetVector (NFC) (#79410)
The use of SmallSetVector saves 0.58% of heap allocations during the
compilation of a large preprocessed file, namely X86ISelLowering.cpp,
for the X86 target. During the experiment, the final size of ToCheck
was 8 or less 88% of the time.
Merge commit 9e95c4947d31 from llvm-project (by Nikita Popov):
[DSE] Fix non-determinism due to address reuse (#84943)
The malloc->calloc fold creates a new MemoryAccess, which may end of at
the same address as a previously deleted access inside SkipStores.
To the most part, this is not a problem, because SkipStores is normally
only used together with MemDefs. Neither the old malloc access nor the
new calloc access will be part of MemDefs, so there is no problem here.
[21 lines not shown]
cc_cubic: remove the redundant variable num_cong_events from struct cubic.
Summary:
This variable was added by commit eb5bfdd06565, but unnecessarily needed.
No functional change.
Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D46042