1
0
mirror of https://git.FreeBSD.org/src.git synced 2026-06-02 11:24:32 +00:00

11329 Commits

Author SHA1 Message Date
Andrew Gallatin 963f1a5455 ifconfig: add CMIS support for 400GbE optics
Add support for CMIS based optics, typically used by 400GbE
and faster ethernet optics.   The CMIS standard requires paged
support for i2c ioctls.

This has been tested on an Nvidia ConnectX-7 and Broadcom
Thor2 400GbE NIC, and I have verified that optics vendor information,
light levels, and temperatures match the information provided by
various vendor tools.

Differential Revision: https://reviews.freebsd.org/D56265
Reviewed by: kbowling, sumit.saxena_broadcom.com
Sponsored by: Netflix
2026-04-14 14:47:56 -04:00
Pouria Mousavizadeh Tehrani bc793ad787 ifconfig: Fix printf on geneve for 32-bit architectures
Replace uint64_t type with uintmax_t in printf to fix warnings
on 32-bit architectures.

Reported by:	Jenkins
Fixes:		688e289ee9 ("ifconfig: Add support for geneve")
Differential Revision: https://reviews.freebsd.org/D55184
2026-04-13 20:28:31 +03:30
Pouria Mousavizadeh Tehrani b0ef03f0c4 ifconfig.8: Add geneve(4) parameters
Add geneve parameters to ifconfig manual.

Reviewed by:	ziaee
Differential Revision: https://reviews.freebsd.org/D55181
2026-04-13 17:45:06 +03:30
Pouria Mousavizadeh Tehrani 688e289ee9 ifconfig: Add support for geneve (netlink)
This implementation is netlink only

Differential Revision: https://reviews.freebsd.org/D55184
2026-04-13 17:45:01 +03:30
Dag-Erling Smørgrav 9d95d80669 tunefs: Fix pointer arithmetic
While here, remove a bogus const which has been there for years.

MFC after:	1 week
Reported by:	ivy@
Fixes:		1b83e8a3f8 ("Constify string pointers.")
Fixes:		8244dd3262 ("tunefs: Better fix for arm64 alignment issues")
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D56343
2026-04-11 21:23:08 +02:00
Pouria Mousavizadeh Tehrani 87bea33a67 nd6: Remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG and EXPERIMENTAL options
The draft-ietf-6man-ipv6only-flag has been obsoleted by RFC 8925.
Remove the EXPERIMENTAL compile option from the kernel and remove
DRAFT_IETF_6MAN_IPV6ONLY_FLAG from userland.
This compile option was not enabled by default.
Also regenerate src.conf.5.

Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D56228
2026-04-10 23:42:09 +03:30
Dag-Erling Smørgrav 8244dd3262 tunefs: Better fix for arm64 alignment issues
Rather than trust that the compiler will lay out the stack frame the
way we expect it to, use a union to force the correct alignment.

MFC after:	1 week
Fixes:		616f47f176 ("tunefs: Fix alignment warning on arm64")
Reviewed by:	kevans, mckusick
Differential Revision:	https://reviews.freebsd.org/D56245
2026-04-07 15:54:28 +02:00
Dag-Erling Smørgrav 616f47f176 tunefs: Fix alignment warning on arm64
MFC after:	1 week
Fixes:		c5e79c7e93 ("tunefs: Don't lower WARNS")
Reviewed by:	bakul
Differential Revision:	https://reviews.freebsd.org/D56229
2026-04-02 23:23:47 +02:00
Dag-Erling Smørgrav 6630c3a736 tunefs: Add tests
MFC after:	1 week
Reviewed by:	ngie
Differential Revision:	https://reviews.freebsd.org/D56034
2026-04-02 13:22:14 +02:00
Dag-Erling Smørgrav c5e79c7e93 tunefs: Don't lower WARNS
Use casts to silence the alignment warnings instead of potentially
suppressing other legitimate warnings.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56033
2026-04-02 13:22:14 +02:00
Pouria Mousavizadeh Tehrani 759d8a13a3 route(8): Show weight of nexthop in multipath routes
Reviewed by: zlei, markj
Differential Revision: https://reviews.freebsd.org/D56202
2026-04-01 19:26:19 +03:30
Alexander Ziaee 04d58d529a manuals: System message vs kernel message
Wordsmith mentions throughout the manual of syslog and dmesg, to clearly
differentiate them in an externally consisteny way, increasing operator
onboarding speed and elegance.

The daemon that handles general system messages, syslog, describes them
as "system messages", and "messages" is the standard filename. Rewrite
syslog related manual titles to align search results with this, and hier
entries to align the index. Use care to maintain keywords and not add
extra lines. Newsyslog trades "maintain" with "rotate" for visibility.

MFC after:	3 days
Reviewed by:	markj
Closes:		https://github.com/freebsd/freebsd-src/pull/2067
2026-03-26 09:19:01 -04:00
Kristof Provost 66d66dd0f6 pfctl: always warn if a duplicate rule was detected
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-03-24 05:27:20 +01:00
Kristof Provost 434e1c3d84 pfctl tests: test rdr-to and nat-to in one rule
OpenBSD fixed this separately (in their 6a338f3f70). We appear to not
have had this bug, but test for it anyway.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-03-22 07:20:48 +01:00
Kristof Provost 343ace42f8 pfctl: parser must not ignore error from pfctl_optimize_ruleset()
Ignoring the error may cause pfctl(8) to load inconsistent ruleset
preventing pf(4) to enforce desired policy.

Issue reported and fix suggested by berts _from_ fastmail _dot_ com

'Looks good.' @deraadt

MFC after:	1 week
Obtained from:	OpenBSD, sashan <sashan@openbsd.org>, 9fd28a8cca
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-03-22 04:47:37 +01:00
Dag-Erling Smørgrav b1f72dd2a9 tunefs: Don't combine GEOM journaling with SU
GEOM journaling shouldn't be used at the same time as soft updates, so
don't enable one if the other is already in use.

MFC after:	1 week
PR:		293896
Reviewed by:	mckusick
Differential Revision:	https://reviews.freebsd.org/D56002
2026-03-21 08:21:45 +01:00
Dag-Erling Smørgrav e30fcdaae2 newfs: Don't combine GEOM journaling with SU
GEOM journaling shouldn't be used at the same time as soft updates, so
don't enable soft updates if GEOM journaling has been requested, and
error out if both are explicitly requested.

MFC after:	1 week
PR:		293896
Reviewed by:	mckusick
Differential Revision:	https://reviews.freebsd.org/D55999
2026-03-21 08:21:45 +01:00
Poul-Henning Kamp a0170dbd4e "Pending" is more correct than "Missing"
Pointed out by: Alex "the PS/2 guy"
2026-03-20 10:32:30 +00:00
Gleb Smirnoff 72472e52e3 carp: retire ioctl(2) API
All supported stable branches use netlink(4) API to configure carp(4).
The deleted code also has kernel stack leak vulnerability, that requires
extra effort to fix.

Reviewed by:		pouria, kp
Differential Revision:	https://reviews.freebsd.org/D55804
2026-03-12 09:37:26 -07:00
YangWen cb69951f7e fsck_msdosfs: reduce the scope of dentry deletion
When dentry flag is ATTR_VOLUME because of 1 bit flip(from 0x10 to 0x18),
removede function will delete all dentry from invalid dentry postion,
so some normal dentries will be deleted in the same cluster.Unfortunately,
these normal directories and files will not be visible to the user
after wo do fsck_msdos

Signed-off-by: YangWen <anmuxixixi@gmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1694
2026-03-07 00:51:16 -07:00
Seth Hoffert 36acf1bd32 pfctl: consistency
% pfctl -F ethernet
Ethernet rules cleared

% pfctl -s ethernet
pfctl: Unknown show modifier 'ethernet'

pfctl accepts 'ethernet' (or any prefix of it) in the -F flag but
accepts only 'ether' (or any prefix of it) in the -s flag, which seems
inconsistent.  This change brings the two to parity while remaining
backwards compatible.

Reviewed by:	kp
MFC after:	2 weeks
Signed-off-by: Seth Hoffert <seth.hoffert@gmail.com>
2026-03-04 17:20:34 +01:00
Christos Margiolis 428517a771 sound: Notify devd when no devices are connected
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D55531
2026-03-03 12:32:38 +01:00
Boris Lytochkin 32cd3ee590 ipfw: add support for masked ip-address lookups
Current radix-based implementation of lookup tables in ipfw does
not support non-contiguous prefixes while this type of lookup is
needed to write CPU-effective firewall configurations.

For some of the cases we can reach the goal using a masked table
lookup by adding masked (e.g. zero non-significant bits) records
into a table and then zero non-significant bits in lookup key
prior to making a table lookup.

Obtained from:  Yandex LLC
MFC after:      3 weeks
Relnotes:       yes
Sponsored by:   Yandex LLC
Differential Revision:  https://reviews.freebsd.org/D53694
2026-03-01 22:04:58 +03:00
Pouria Mousavizadeh Tehrani b5366f8e13 route(8): show expire time of each nexthop in monitor
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D55514
2026-02-26 13:19:09 +03:30
Pouria Mousavizadeh Tehrani 8230cf1aa1 route(8): Fix -expire argument when using netlink
Also fixes nexthop expire value on route get using netlink.

Reviewed by: glebius
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D55444
2026-02-26 13:19:01 +03:30
Dmitry Lukhtionov f4f9054dc4 camcontrol: Print 'transport revision'
As described in Serial ATA Revision 3.5a

Reviewed by:	mav
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2044
2026-02-24 09:48:58 -05:00
Alexander Ziaee 6d15e0efa0 ttys: Correct comment about required statuses
The status field also accepts onifconsole and onifexists,
so it looks crusty saying that it only accepts on and off.

Reviewed by:	imp
Closes:		https://github.com/freebsd/freebsd-src/pull/2042
2026-02-22 14:51:07 -05:00
Alexander Ziaee 0a492eb9c6 ttys: Align comment whitespace and wrapping
This doesn't lengthen or shorten any configuration,
only comments, so merging the configuration will be safe.

Reviewed by:	imp
Closes:		https://github.com/freebsd/freebsd-src/pull/2042
2026-02-22 14:50:43 -05:00
John Baldwin 1602f0013b nvmf: Limit the default I/O queue size to 128 entries
Previously the size defaulted to the maximum supported size reported
by the remote host.  The value of 128 matches the default on Linux and
avoids excessive resource usage for I/O queues.

Sponsored by:	Chelsio Communications
2026-02-20 15:39:02 -05:00
Ed Maste 07d29f9c17 Correct Identifer typo in SPDX tags 2026-02-18 14:20:12 -05:00
Quentin Thébault 59b7f3ed69 devd.conf.5: Fix cross-references to devfs(4)
Fixes:		1687d77197 (man filesystems: move driver pages)
MFC after:	3 days
Reviewed by:	ziaee
Sponsored by:	Defenso
Signed-off-by: 	Quentin Thébault <quentin.thebault@defenso.fr>
Closes:		https://github.com/freebsd/freebsd-src/pull/2015
2026-02-18 12:51:39 -05:00
Tuukka Pasanen d685228989 ifconfig: Add SPDX-License-Identifier tags
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55272
2026-02-18 12:47:12 -05:00
Tuukka Pasanen 835813c88a devmatch: Add SPDX-License-Identifier tag
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55271
2026-02-18 12:46:49 -05:00
Andrew Turner bfb7c81f93 nvmecontrol: Remove an incorrect use of PAGE_SIZE
The mdts value is in terms of the nvme page size, not the host page
size. On many architectures these are both 4k, however on arm64 it is
possible to build a system with the host page size of 16k.

Use NVME_MPS_SHIFT to get the correct nvme page shift.

Reviewed by:	imp
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D55334
2026-02-18 15:15:41 +00:00
Tuukka Pasanen f8517c21d5 nvmecontrol: Add SPDX-License-Identifier tags
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55275
2026-02-18 08:50:27 -05:00
Tuukka Pasanen 904e0dcd29 ipfw: Add SPDX-License-Identifier tag
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55273
2026-02-18 08:47:50 -05:00
Tuukka Pasanen 299d3e944a decryptcore: Add SPDX-License-Identifier tag
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55270
2026-02-18 08:46:07 -05:00
Tuukka Pasanen 8ac9926458 newfs_msdos: Add SPDX-License-Identifier tags
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55274
2026-02-18 08:43:58 -05:00
Tuukka Pasanen 25ed5ee654 camcontrol: Add SPDX-License-Identifier tag
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55269
2026-02-18 08:43:39 -05:00
Poul-Henning Kamp d7d0369ad3 recoverdisk: Ensure medium_read is multiple of small_read. 2026-02-17 18:33:41 +00:00
Kristof Provost 281282e935 pf: convert DIOCRTSTADDRS to netlink
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-02-16 13:42:50 +01:00
Enji Cooper 411a566d56 t_create.sh: use ATF_TESTS_SH_SED & remove local mods
This particular change replaces all local modifications to the test
script like so:
- Use `ATF_TESTS_SH_SED_test` with a sed(1) statement in the Makefile,
  instead of the equivalent local modifications.
- Remove the need for expecting the output of newfs_msdos to be empty.
  There isn't much to gain from deviating from the upstream NetBSD test--it's
  just another local modification that would need to be carried forward. If
  it's worth testing this FreeBSD-specific behavior, it should be in a
  FreeBSD-specific test.

This makes moving new modifications to the script easier moving forward.

MFC after:	1 week
2026-02-15 10:36:29 -08:00
Konstantin Belousov c67d8acca3 sbin/setkey/setkey.8: cleanup groff mdoc warnings
PR:	293072
Sponsored by:	NVidia networking
MFC after:	3 days
2026-02-12 09:47:22 +02:00
Mark Johnston 93075bdb81 net: Remove the IFF_RENAMING flag
This used to be needed when interface renames were broadcast using the
ifnet_departure_event eventhandler, but since commit 349fcf079c
("net: add ifnet_rename_event EVENTHANDLER(9) for interface renaming"),
it has no purpose.  Remove it.

Reviewed by:	pouria, zlei
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D55171
2026-02-10 13:45:06 +00:00
Johan Söllvander 821243b387 sbin/geom: Convert err/warn() to xo_err/warn() and style(9) fixes
Finishing up the libxo conversion of geom by switching err(3) to their
libxo equivalents.

While here, fix some style(9) issues. There are still a few left, but at
least they're fewer now.

Reviewed by:	asomers
Approved by:	asomers (mentor)
MFC after:	2 weeks
Sponsored by:	ConnectWise
Differential Revision:	https://reviews.freebsd.org/D54938
2026-02-10 13:19:50 +01:00
Guido Falsi e912723afb ifconfig.8: Start new sentence on new line
This change was forgotten by me in the previous commit to this file.

Reported by:	kib
Approved by:	implicit (change omitted from previous commit)
Fixes:		31ec8b6407
2026-02-09 21:09:20 +01:00
Guido Falsi 4548149a81 netinet6: Fix my style issues
Reported by:		pouria
Reviewed by:		pouria, ziaee, glebius
Approved by:		glebius
Fixes:			31ec8b6407
Differential Revision:	https://reviews.freebsd.org/D55136
2026-02-07 13:46:05 +01:00
Alexander Ziaee dc2ec1ccc1 geom.8: Improve classes list into a table
Add missing entries MD, VFS, and DISK. Refactor list into a three
column table, so the data is all visible at once, buying us ten lines
at MANWIDTH 80, and still rendering nicely at MANWIDTH 59.

PR:		292530
MFC after:	3 days
Reported by:	Slawomir Wojciech Wojtczak <vermaden@interia.pl>
2026-02-05 10:38:07 -05:00
Pat Maddox 2e020c84cb bectl: Add -E flag to create an empty boot environment
Signed-off-by: Pat Maddox <pat@patmaddox.com>
Reviewed by:	kevans
MFC after:	1 week
Closes:		https://github.com/freebsd/freebsd-src/pull/1975
2026-02-04 21:54:45 -06:00
Pouria Mousavizadeh Tehrani c2ba906fa6 ifconfig: fix gre(4) status
Set `ifr->ifr_name` to display gre options
for the interface.

Reviewed by: glebius, zlei
Approved by: glebius (mentor)
MFC after: 1 day
Differential Revision: https://reviews.freebsd.org/D55099
2026-02-04 20:50:21 +03:30