Interfaces all have an mlink to if_$foo. Add these for the missing ones
and remove an incorrect one from rtwn_pci. Wireless network drivers are
all accessible via `apropos -s4 "wireless network driver", except two
which are "wireless network device". I actually prefer the latter, but
make them all consistent upon the more common parlance. Tag SPDX on one
of the files I touched, while here.
MFC after: 3 days
Reviewed by: bz, carlavilla, mhorne
Approved by: carlavilla, mhorne (mentors)
Differential Revision: https://reviews.freebsd.org/D49063
Setting WITHOUT_X where X is a __REQUIRED_OPTION produces a warning.
This occurred during makeman's `make showconfig` invocatation, but the
warning serves no purpose there, and clutters makeman's output. Skip
the warning for the showconfig target used by makeman.
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49123
Refactor pcm_chnalloc() and merge with parts of vchan_setnew() (now
removed) and dsp_open()’s channel creation into a new dsp_chn_alloc()
function. The function is responsible for either using a free HW channel
(if vchans are disabled), or allocating a new vchan.
Clean up allocated vchans associated with a given dsp_cdevpriv on
dsp_close() instead of leaving them unused.
hw.snd.vchans_enable (previously hw.snd.maxautovchans) and
dev.pcm.X.{play|rec}.vchans now work as tunables to only enable/disable
vchans, as opposed to setting their number and/or (de-)allocating
vchans. Since these sysctls do not trigger any (de-)allocations anymore,
their effect is instantaneous, whereas before we could have frozen the
machine (when trying to allocate new vchans) when setting
dev.pcm.X.{play|rec}.vchans to a very large value.
Create a new "primary" channel sublist so that we do not waste time
looping through all channels in dsp_chn_alloc(), since we are only
looking for a parent channel to either use, or add a new vchan to. This
guarantees a steady traversal speed, as the parent channels are most
likely going to be just a handful (2). What was currently in place was a
loop through the whole channel list, which meant that the traversal
would take longer the more channels were added to that list.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D47917
While here, take this opportunity to update the copyright and clean
some mdoc errors.
MFC after: 3 days
Reviewed by: carlavilla, mhorne, imp
Approved by: imp (srcmgr)
Approved by: carlavilla, mhorne (mentors)
Differential Revision: https://reviews.freebsd.org/D49051
In an AMA on Community Discord, it was revealed that simply setting a
bridge to up is not equivelant to setting it as "inet6 auto_linklocal".
Remove the incorrect line, and while here:
+ reset sysctl list width to indent, saving 2/13 lines on MANWIDTH 59/80
+ tag spdx + break two long lines over 80 characters
MFC after: 3 days
Reported by: Antranig Vartanian <antranigv@freebsd.am>
Reported by: Jan Bramkamp <crest+freebsd@rlwinm.de>
Reported by: Niclas <buero28@icloud.com>
Approved by: mhorne (mentor)
Differential Revision: https://reviews.freebsd.org/D48981
safe.4:
Improve document description (Nd) for apropos. Remove Nm from sysctls
in synopsis. This was causing this page to get pulled into results for
`apropos sysctl`. Instead, use kernel declaration macros like vt(4).
Convert the HARDWARE tagged list to a column list for better rendering
in HW Relnotes. Tested in man(1) at MANWIDTH 59 and 80.
safexcel.4:
Nd: s/security packet/cryptographic offload/ for apropos.
HARDWARE: Create this section for inclusion in the HW relnotes.
SPDX: both tagged
MFC after: 3 days
MFC to: 13.5
Reported by: markj (cryptographic offload, Inside Secure)
Reviewed by: jhb, markj, mhorne
Accepted by: markj (src), mhorne (mentor)
Differential Revision: https://reviews.freebsd.org/D47706
after some discussion with henning, document the various log options as
one section; some text was altered to make it read better;
ok henning
Obtained from: OpenBSD, jmc <jmc@openbsd.org>, cea6f9db1f
Sponsored by: Rubicon Communications, LLC ("Netgate")
Also, clean up some usage of predefined strings (which are discouraged by
mandoc_char(7) for portability reasons) and improve spacing in
hostapd.conf(5).
ok schwarze@
Obtained from: OpenBSD, bentley <bentley@openbsd.org>, e369c2e695
Sponsored by: Rubicon Communications, LLC ("Netgate")
This finally allows to use source-hash for dynamic loadbalancing, eg.
"rdr-to <hosts> source-hash", instead of just round-robin and least-states.
An older pre-siphash version of this diff was tested by many people.
OK tedu@ benno@
Obtained from: OpenBSD, reyk <reyk@openbsd.org>, 252a05523f
Sponsored by: Rubicon Communications, LLC ("Netgate")
Recently-reported bugs in this driver should be fixed, but also the
hardware it supports is obsolete so mark it for deprecation.
PR: 284876
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49045
No change to the underlying type, so no ABI change.
We define __time_t as uint64_t if __LP64__, otherwise uint32_t,
and only define __LP64__ if long is 64 bits.
In other words: __time_t == long.
ok henning@ deraadt@
Obtained from: OpenBSD, guenther <guenther@openbsd.org>, 6c1b69a0ff
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D48963
In some places, these macros are used without a lock, under the
assumption that they are naturally atomic. After commit
34740937f7 ("queue: New debug macros for STAILQ"), this assumption is
false.
Provide *_EMPTY_ATOMIC for such cases. This lets us include extra debug
checks for the non-atomic case, and gives us a way to explicitly
annotate unlocked checks, which generally deserve extra scrutiny and
might otherwise raise reports from KCSAN.
Reviewed by: kib, olce (previous version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D48899
make sense to deraadt@, ok/wording tweak from mikeb.
Obtained from: OpenBSD, sthen <sthen@openbsd.org>, 610eb54470
Sponsored by: Rubicon Communications, LLC ("Netgate")
The make_dev_args_init structure example said mda_cred, however the
correct form is mda_cr according to the reporter and my git grep.
A new document description has been contributed by jhb. While here,
fix grammar and trivial typos (spacing, colons before examples,
trailing delimiter) and spdx.
MFC after: 3 days
Reported by: jhb (much polish and document description)
Reported by: Evgenii Ivanov on Community Discord
Reviewed by: carlavilla, mhorne, jhb, kib
Approved by: carlavilla, mhorne (mentors)
Differential Revision: https://reviews.freebsd.org/D48516
jobs.mk makes use of newlog.sh if found.
Set NEWLOG_SH in local.sys.env.mk to save jobs.mk searching for it.
PR: 284390
Reviewed by: stevek
Differential Revision: https://reviews.freebsd.org/D48737
Tracking newer versions of C (and C++) permits assuming newer language
features in the base system. Some C11 extensions are already used in
the base system but implemented on top of GNU C extensions such as
_Alignas and _Static_assert. In some cases the fallback versions in
cdefs.h are more limited than the native C11 extensions.
Even though C11 is the next major version of C, C17 is chosen instead
since C17 does not add new features to C but merely fixes defects in
C11. It is also well supported by a wide range of clang (7.0.0+) and
GCC (8.1+) versions.
Along with changing the default, this change also removes explicit
requests for c11 via the CSTD variable in various Makefiles.
Libraries and binaries for ZFS continue to use c99.
PR: 284039 (exp-run)
Reviewed by: imp, arichardson, emaste
Differential Revision: https://reviews.freebsd.org/D43237
pf.conf expects <=, not ≤ (and the same applies to ≥ and >=).
Make sure the man page reflects this.
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
For INTERNALLIBS and regular libs we add -L to specify the library path,
which may be needed if a library is in a non-default path but also means
we can link against those libraries when built independently. Do the
same for privatelibs as well.
Reviewed by: bapt
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48891
My commit bit was reinstated 2025/01/28 and I am now mentored by yuri.
First time, commit bit was granted to me in 2010 and I was mentored
by garga and erwin.
Signed-off-by: Eygene Ryabinkin <rea@FreeBSD.org>
Approved by: yuri (mentor)
- Only install it when MK_USB is set to "yes", like we do for other USB
NIC drivers.
- Create a hardlink named if_mtw.4, like we do for other NIC drivers.
PR: 284638
Fixes: c14b016242 ("mt7601U: Importing if_mtw from OpenBSD")
Introduce the net.inet.udp.bind_all_fibs tunable, set to 1 by default
for compatibility with current behaviour. When set to 0, all received
datagrams will be dropped unless an inpcb bound to the same FIB exists.
No functional change intended, as the new behaviour is not enabled by
default.
Reviewed by: glebius
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D48664
Introduce the net.inet.tcp.bind_all_fibs tunable, set to 1 by default
for compatibility with current behaviour. When set to 0, all TCP
listening sockets are private to their FIB. Inbound connection requests
will only succeed if a matching inpcb is bound to the same FIB as the
request.
No functional change intended, as the new behaviour is not enabled by
default.
Reviewed by: glebius
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D48663
bus_delayed_attach_children already existed as a standalone page,
causing pkgbase errors due to duplicate METALOG entries. Delete the
MLINK for now to fix the build.
Fixes: 192d326bcf ("bus_attach_children.9: New manpage for functions operating on children")
Sponsored by: The FreeBSD Foundation
While here, cross-reference BUS_PRINT_CHILD (and fix a stale reference
to DEVICE_PRINT_CHILD which doesn't exist) and expand the text
describing the role of the helper functions.
Differential Revision: https://reviews.freebsd.org/D48373
Refer to device_detach(9) for the description of detaching a device.
Note that descendants of the child device are also deleted (though in
theory a proper detach routine should have already deleted these).
Finally, note that BUS_CHILD_DELETED(9) is invoked on each deleted
device.
Differential Revision: https://reviews.freebsd.org/D48365
Split out separate descriptions of device_probe and device_attach and
include extra details (such as the effect of a disabled hint during
device_attach). Reframe device_probe_and_attach as a recommended
wrapper function around device_probe and device_attach.
While here, add a description of device_detach.
Differential Revision: https://reviews.freebsd.org/D48364
- Remove documentation of profiled library support from bsd.README
- Remove rules to create individual .po files. The rules to generate
an archive from these files was already removed, so these .po rules
aren't used.
Reviewed by: emaste
Fixes: 3750ccefb8 ("Retire MK_PROFILE infrastructure")
Differential Revision: https://reviews.freebsd.org/D48819
This document is intended to be a reference for supported FreeBSD
versions, so update text to refer to 13.0 and later.
Sponsored by: The FreeBSD Foundation
Add a missing escape character that splits a long line to avoid breaking
the builds.
Reported by: cy
Approved by: emaste (mentor)
Fixes: 88d448ec81 ("mk: Move vm stack test debug symbols")
MFC after: 1 week
Avoid the creation of a /usr/tests/sys/vm/stack/.debug directory by
placing sys/vm/stack test debug symbols under /usr/lib/debug.
Reviewed by: emaste
Approved by: emaste (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48796
Added ht20 mode, based on if_run from FreeBSD, and if_mtw.c
from OpenBSD.
PR: 247545
Approved by: adrian, wireless
Differential Revision: https://reviews.freebsd.org/D45179
This MD function is invoked before dumping register set notes when
writing out a core dump to ensure that the PCB for a given thread is
up to date. This provides a centralized place to update the PCB with
values of the current thread for each arch rather than doing this work
in each register set's get method.
Discussed with: jrtc27
Reviewed by: kib, markj
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D44910