Commit Graph

286304 Commits

Author SHA1 Message Date
Doug Rabson
74da9c39c3 pkgbase: Split out manpages by default
This helps with building small container images using pkgbase.

Reviewed by:	manu bapt
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D41861
2023-09-14 16:50:40 +01:00
Olivier Certner
125bbadf60 x86: Add defines for workaround bits in AMD's MSR "Decode Configuration"
They are a bit more informative than raw hexadecimal values.

While here, sort existing defines of bits for AMD MSRs to match the address
order.

Reviewed by:	kib, emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41816
2023-09-14 16:24:48 +01:00
Mateusz Guzik
74be676d87 vfs: drop one vnode list lock trip during vnlru free recycle
vnlru_free_impl would take the lock prior to returning even though most
frequent caller does not need it.

Unsurprisingly vnode_list mtx is the primary bottleneck when recycling
and avoiding the useless lock trip helps.

Setting maxvnodes to 400000 and running 20 parallel finds each with a
dedicated directory tree of 1 million vnodes in total:
before:	4.50s user 1225.71s system 1979% cpu 1:02.14 total
after:	4.20s user 806.23s system 1973% cpu 41.059 total

That's 34% reduction in total real time.

With this the block *remains* the primary bottleneck when running on
ZFS.
2023-09-14 15:03:03 +00:00
Wei Hu
b167e449c8 mana: add lro and tso stat counters
Add a few stat counters for tso and lro.

MFC after:	3 days
Sponsored by:	Microsoft
2023-09-14 12:10:49 +00:00
R. Christian McDonald
79278872ad arp(8): fix by-interface and by-host filtering when using netlink
arp(8) has traditionally supported filtering by interface via -i and
by hostname. However, this functionality was omitted from the initial
netlink-ification of arp. This patch re-introduces this filtering
functionality.

This patch also improves by-interface filtering by storing and using the
ifindex of the requested interface for filtering instead of comparing
interface name strings

Reviewed by:	melifaro
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-09-14 10:14:10 +02:00
Wolfram Schneider
dd0d16cc4d correct FreeBSD release
PR: 273690
2023-09-14 10:10:35 +00:00
Doug Rabson
4e899378bf pkgbase: put library links and symlinks in the -dev package
Some libraries (e.g. ncurses) install links to the main library for
backwards compatibilty. This change ensures that those links are in the
dev package since the files being linked to are in that package.

PR:		249143
MFC after:	1 week
Reviewed by:	emaste, manu
Differential Revision: https://reviews.freebsd.org/D41841
2023-09-14 10:19:42 +01:00
Wolfram Schneider
e806976349 update homepage for FreeBSD Manual Pages 2023-09-14 08:41:12 +00:00
Andrey V. Elsukov
0bf5377b6b Avoid IPv6 source address selection on accepting TCP connections
When an application listens IPv6 TCP socket, due to ipfw
forwarding tag it may handle connections for addresses that do not
belongs to the jail or even current host (transparent proxy).
Syncache code can successfully handle TCP handshake for such connections.
When syncache finally accepts connection it uses in6_pcbconnect() to
properly initlize new connection info.

For IPv4 this scenario just works, but for IPv6 it fails when
local address doesn't belongs to the jail. This check occurs when
in6_pcbladdr() applies IPv6 SAS algorithm.
We need IPv6 SAS when we are connection initiator, but in the above
case connection is already established and both source and destination
addresses are known.

Use unused argument to notify in6_pcbconnect() when we don't need
source address selection. This will fix `ipfw fwd` to jailed IPv6
address.

When we are connection initiator, we stil use IPv6 SAS algorithm and
apply all related restrictions.

MFC after:              1 month
Sponsored by:           Yandex LLC
Differential Revision:  https://reviews.freebsd.org/D41685
2023-09-14 11:39:06 +03:00
Wolfram Schneider
6d221ee355 correct FreeBSD release
PR: 273690
2023-09-14 08:03:05 +00:00
Souradeep Chakrabarti
e7a9817b8d Hyper-V: vmbus: implementat bus_get_dma_tag in vmbus
In ARM64 Hyper-V UFS filesystem is getting corruption and those
corruptions are consistently happening just after hitting a page
boundary. It is unable to correctly read disk blocks into buffers
that are not aligned to 512-byte boundaries.

It happens because storvsc needs physically contiguous memory which
may not be the case when bus_dma needs to create a bounce buffer.
This can happen when the destination is not cache-line aligned.

Hyper-V VMs have VMbus synthetic devices and PCI pass-thru devices
that are added dynamically via the VMbus protocol and are not
represented in the ACPI DSDT. Only the top level VMbus node exists
in the DSDT. As such, on ARM64 these devices don't pick up coherence
information and default to not hardware coherent.

PR:		267654, 272666
Reviewed by:	andrew, whu
Tested by:	lwhsu
MFC after:	3 days
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D41728
2023-09-14 07:11:25 +00:00
Eric Joyner
9c30461dd2
ice(4): Update to 1.38.16-k
New features
- Add sysctl "link_active_on_if_down" (defaults to 1 to match previous
behavior): set this to 0 to have the driver bring the physical link down when
the interface is brought administratively down
- Add sysctl "temp" to read chip temperature on E810 devices; this requires a
4.30 or newer NVM (see package sysutils/intel-nvmupdate-100g)

Bug fixes and general changes
- (linked to irdma) properly propagate PF reset request from irdma driver
- (linked to irdma) properly notify irdma of an impending PF reset
- (linked to irdma) move Protocol Engine error handling to irdma
- Print log message when using a DDP that doesn't support the "TX balancing"
mode
- Block LLDP agent configuration when DSCP QoS mode is enabled
- Fix kernel panic when updating NVM when adapter is in the "TX balancing" mode
- Remove ice_sbq_cmd.h since it's unused
- Fix LLDP RX filter to still allow LLDP frames to be received by SW after a PF
reset in SW LLDP mode
- Add ice_if_needs_restart handler in order to fix a bad VLAN and link down
interaction
- Issue PF reset during unload
- nvmupdate process fixes
- Use pci_msix_table_bar() to get MSI-X bar index at runtime instead of hardcoding it

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	anzhu@netapp.com
MFC after:	3 days
Sponsored by:	Intel Corporation, NetApp
Differential Revision:	https://reviews.freebsd.org/D41655
2023-09-13 15:26:54 -07:00
Bartosz Sobczak
ffafa6a4d1
irdma(4): remove artificial completion generator
Removing artificial completion generator as there had been no indication
of the code being required for E810 cards.  Further more it was found
that the code may have unpleasant side effects on user experience when
using ucmatose tool.

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	erj@
MFC after:	1 day
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D41593
2023-09-13 15:16:21 -07:00
Bartosz Sobczak
bc3a013ccd
irdma(4): use related vnet for searching netdev
It was found through testing that when ULP uses individual vnet, the
search for the correct vlan_id may failing because of no proper
interface with given address.

The solution is to use vnet associated to the connection whenever
possible.

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	erj@
MFC after:	1 day
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D41592
2023-09-13 15:16:15 -07:00
Ed Maste
01d8215102 ftpd: correct deprecation notice markup
Also bump .Dd for the original change.

Reported by:	karels
Fixes:		98b98ec1bc ("ftpd: add deprecation notice")
Sponsored by:	The FreeBSD Foundation
2023-09-13 22:13:42 +01:00
Doug Moore
8763b9862f powerpc pmap: initialize kernel pmap radix trie
Commit 2d2bcba7ba changed radix trie
implementation and made it necessary that radix tries be initialized
with vm_radix_init. @dbaio reports that in some configurations, there
is a powerpc boot panic and that this commit introduced the
problem. In powerpc/aim/mmu_radix.c, the radix trie in kernel_pmap is
initialized by zeroing all its fields.

Add a call to vm_radix_init to properly initialize
kernel_pmap->pm_radix.

Reported by:	dbaio
Reviewed by:	alc, jhibbits
Fixes:	2d2bcba7ba drop NULL check from radix trie search
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D41846
2023-09-13 13:17:57 -05:00
Dag-Erling Smørgrav
9f16abf8d3 newvers.sh: Avoid picking up stray envars.
89f361f742 added a mechanism to allow arbitrary overrides from the
command line.  Unfortunately, it also had the (likely unintended)
effect of allowing RELEASE and VERSION to be passed in from the
environment, and Makefile.inc1 happens to define VERSION for the
benefit of pkgbase.  To restore the status quo, unset RELEASE and
VERSION at the top of the script.

Fixes:		89f361f742
MFC after:	3 days
Reviewed by:	gallatin, sjg, emaste
Differential Revision:	https://reviews.freebsd.org/D41845
2023-09-13 18:10:46 +00:00
Damien Broka
70fbcd451b axge: Skip dummy packet headers
Newer versions of the AX88179 interweave dummies alongside valid
packet headers in bulk IN transfer data. This was probably done for
backward compatibility with existing drivers.

However current driver records these dummy headers as dropped frames,
leading to stats misreporting one Ierr per Ipkt.

This skips those dummy headers silently, thereby not generating Ierrs
for them.

Reviewed by:	emaste
Pull Request:	https://github.com/freebsd/freebsd-src/pull/842
2023-09-13 10:08:11 -04:00
Michael Tuexen
bb56b36d71 sctp: further improve shutting down the read side of a socket
Deal with the case that the association is already gone.

Reported by:	syzbot+e256d42e9b390564530a@syzkaller.appspotmail.com
MFC after:	3 days
2023-09-13 13:02:51 +02:00
Dag-Erling Smørgrav
d2c839eee0 Belatedly document OPIE removal in RELNOTES and UPDATING.
MFC after:	3 days
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41822
2023-09-13 11:43:45 +00:00
Kristof Provost
7d45cdbad4 pf tests: pfsync:defer requires scapy
Add the kyua hint so we skip the test if it's not installed.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-09-13 11:12:27 +02:00
Wei Hu
ab7dc1ceb6 mana: add ioctl to support toggling offloading features
With this support, users can enable or disable offloading features
such as txcsum, rxcsum, tso and software lro through ifconfig.

To enable or disable tx features, do it on mana interface first,
then hn/netvsc to sync it up with mana. For example:

ifconfig mana0 -txcsum
ifconfig hn0 -tscsum

To enable or disable rx features, just applying on mana interface
would be sufficient.

Disabling txcsum imples disabling tso. Enabling tso when txcsum
is disabled will result in an error message in dmesg requesting
to enable txcsum first.

Above applies to ipv6 offloading features as well.

Tested by:	whu
MFC after:	3 days
Sponsored by:	Microsoft
2023-09-13 10:59:40 +00:00
Cy Schubert
7f5e3b9fa3 ipfilter: Avoid allocating a new ipf token when not needed
Only allocate a new ipftoken_t if one cannot be found. This eliminates
allocating unnecessary token structures that will never be used when
performing simple lookups for existing token structures.

MFC after:	2 weeks
2023-09-12 19:10:40 -07:00
Michael Tuexen
81c5f0fac9 sctp: improve shutting down the read side of a socket
When shutdown(..., SHUT_RD) or shutdown(..., SHUT_RDWR) is called,
really clean up the read queue and issue an ungraceful shutdown if
user messages are affected.

Reported by:	syzbot+d4e1d30d578891245f59@syzkaller.appspotmail.com
MFC after:	3 days
2023-09-13 01:36:14 +02:00
Kyle Evans
c086d1cbc3 ncurses: avoid hardcoded assumptions about the layout of .OBJDIR
Abstract out the details of the FreeBSD build into a $TINFO_OBJDIR that
external builds can override if they orchestrate the build a bit
differently and have a different objdir layout as a result.  This makes
the ncurses build a little bit more flexible without requiring weird
backflips.

Reviewed by:	bapt, sjg
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D41834
2023-09-12 16:00:45 -05:00
Doug Moore
e5635c3dab powerpc_mmu_radix: include vm_radix.h file
Replacing _vm_radix.h with vm_radix.h in one header file leaves one
source file short of function definitions.  Include vm_radix.h in that
source file.

Fixes a problem rooted in change 429c871ddd.
2023-09-12 14:35:48 -05:00
Piotr Pawel Stefaniak
c996638497 tslog.4: fix typo 2023-09-12 21:10:08 +02:00
Piotr Pawel Stefaniak
8e5c53af83 sh: also auto-complete functions
Differential Revision:	https://reviews.freebsd.org/D40619
2023-09-12 18:40:05 +02:00
Piotr Pawel Stefaniak
bec7b9a219 sh: introduce a function to iterate over all hashed commands
While aliases and built-ins are opportunistically stored in cmdtable, each
function will be added to it immediately on definition.

Factor out the hashing function, write the iterator function and make it use
the hashing function.

Add the cmdname pointer to struct cmdentry so that the command name can be
exposed that way.

Differential Revision:	https://reviews.freebsd.org/D40619
2023-09-12 18:39:54 +02:00
Piotr Pawel Stefaniak
0fd450e289 sh: tab-complete aliases
Differential Revision:	https://reviews.freebsd.org/D40619
2023-09-12 18:39:42 +02:00
Piotr Pawel Stefaniak
2fc4a84ed8 sh: introduce a function to iterate over all aliases
Currently the data structure holding alias information is opaque for
consumers outside alias.c and there is no way to iterate over all
aliases, which will become needed by a future commit.

The new function "iteralias" takes a null pointer to return the first
alias or an existing alias to return the next one, unless there is
no alias to return, in which case it returns a null pointer.

I slightly changed the static function hashalias so that it returns the
index into the array holding link heads, and not the link head directly.
In this form it's easier to use by iteralias and the slight adjustment
in the three existing callers doesn't look too bad.

Differential Revision:	https://reviews.freebsd.org/D40619
2023-09-12 18:39:20 +02:00
Piotr Pawel Stefaniak
63b6e661d2 sh: reindent a for loop in parser.c
Reduce indentation level before a commit that will add new code here.

Reviewed by:	jilles
Differential Revision:	https://reviews.freebsd.org/D37926
2023-09-12 18:36:32 +02:00
Alan Somers
0b294a386d Fix zfsd with the device_removal pool feature.
Previously zfsd would crash in the presence of a pool with a
top-level-vdev that had previously been removed.  The crash happened
because the configuration nvlist of such a TLV contains an empty
ZPOOL_CONFIG_CHILDREN array, which led to a pop_front from an empty
list, which has undefined behavior.

The crash only happened in stable/14 and later, probably do to
differences in libcxx, but the change should be MFCed anyway.

PR:		273663
Reported by:	Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
MFC after:	1 week
Sponsored by:	Axcient
Reviewed by:	mav
Differential Revision: https://reviews.freebsd.org/D41818
2023-09-12 08:46:12 -06:00
Damien Broka
ff9c4abd9f
sysctl(9): Fix typo translatation -> translation
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/839
2023-09-12 22:42:03 +08:00
Damien Broka
06bac0da13
usbdi(9): Fix typo to simply -> to simplify
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/839
2023-09-12 22:41:42 +08:00
Doug Moore
b24ed9c52d powerpc_pmap: include proper vm_radix file
Like the pmap.h files for amd64, arm64, i386 and riscv, the one for powerpc
should #include vm/_vm_radix.h, not vm/vm_radix.h, to get a definition for
struct vm_radix.

Fixes a problem introduced with 429c871ddd.
2023-09-12 08:10:15 -05:00
Doug Rabson
78847e1e59 pkgbase: Move headers and libs out of runtime and utilities
Headers from src/include were in the runtime-dev package but
subdirectories of src/include ended up in utilities-dev by default.
Neither package is a good choice - the headers in src/include are not
useful without the libraries contained in clibs-dev.

This moves the standard C headers to clibs-dev (C++ headers are already
in this package). While working on this, I found that various clang
libraries and headers were also bundled into utilities-dev by default
so these are also moved to clang-dev.

I also added a FreeBSD-build-essential meta package to make it simple to
install all the toolchain parts.

PR:		254173
Reviewed byb:	manu
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D41815
2023-09-12 13:22:21 +01:00
Dmitry Chagin
d0266fbab9 linux(4): Cleanup dummy syscall list on arm64
These syscalls do not exist on arm64 Linux.

MFC after:		1 week
2023-09-12 13:37:45 +03:00
Doug Moore
10db91ecec vm_radix: add a missing paren
429c871ddd left parens unbalanced in a
powerpc case that my testing missed.  Restore balance.

Reported by:	jenkins
2023-09-12 04:19:51 -05:00
Doug Moore
429c871ddd radix_trie: have vm_radix use pctrie code
Implement everything currently in vm_radix.c with calls to functions
in subr_pctrie.c, asccessed via the interface provided by the
DEFINE_PCTRIE_SMR macro.

Add back some #includes removed in the first attempt, and avoid the
use of a discontinued type in a bit of conditionally compiled code.

Reviewed by:	alc, markj
Tested by:	pho
Differential Revision:	https://reviews.freebsd.org/D41344
2023-09-12 02:42:38 -05:00
Wolfram Schneider
e47a47b215 no trailing dot (".") for FreeBSD releases
PR:		273690
2023-09-12 06:42:47 +00:00
Xin LI
9047451891 Disable byteswap.h for now.
Ideally we should be testing __FreeBSD_version (1400079) and/or
BOOTSTRAPPING from an older version, but restore compatibility to
older FreeBSD versions and macOS while we find out a better way to
fix it.
2023-09-11 23:24:08 -07:00
Robert Clausecker
52d4a4d4e0 lib/libc/amd64/string/strcspn.S: fix behaviour with sets of 17--32
When a string is matched against a set of 17--32 characters, each chunk
of the string is matched first against the first 16 characters of the
set and then against the remaining characters.  We also check at the
same time if the string has a nul byte in the current chunk, terminating
the search if it does.

Due to misconceived logic, the order of checks was "first half of set,
nul byte, second half of set", meaning that a match with the second half
of the set was ignored when the string ended in the same 16 bytes.
Reverse the order of checks to fix this problem.

Sponsored by:	The FreeBSD Foundation
Approved by:	mjg (blanket, via IRC)
MFC after:	1 week
MFC to:		stable/14
2023-09-11 22:58:43 -04:00
Cheng Cui
fafb03ab42
siftr: flush pkt_nodes to the log file in batch
Reviewed by: rscheff, tuexen
Differential Revision: https://reviews.freebsd.org/D41175
2023-09-11 11:23:27 -04:00
Dmitry Chagin
ba90a31d08 linux(4): Cleanup includes under amd64/linux32
No functional changes.

MFC after:		1 week
2023-09-11 21:29:40 +03:00
Dmitry Chagin
68df2376e0 linux(4): Cleanup includes under amd64/linux
No functional changes.

MFC after:		1 week
2023-09-11 21:29:34 +03:00
Dmitry Chagin
027d727d40 linux(4): Cleanup includes under arm64
No functional changes.

MFC after:		1 week
2023-09-11 21:29:28 +03:00
Gleb Smirnoff
d13550f0c9 stand/loader.efi: fix regression with ignoring nvstore
To read/update the boot loader nvstore, we always need to call
zfs_attach_nvstore() regardless of whether we use bootonce key
in nvstore or the bootfs property of the pool.  The call was
unintentionally left in the block of code that is processed
only when bootonce key is present.

In particular this fixes broken 'nextboot -k'.

Reviewed by:		imp
Differential Revision:	https://reviews.freebsd.org/D41795
Fixes:			e3e2681d0e
2023-09-11 11:04:48 -07:00
Baptiste Daroussin
d557a86c87 pkg: use https by default
Switch the repository to use https by default, base is providing a CA
root bundle suitable to validate the certificates used by the project.
This can now be activated without requiring another packages to be installed

Reviewed by:		emaste
Differential Revision:	https://reviews.freebsd.org/D40473
2023-09-11 17:41:32 +02:00
Bjoern A. Zeeb
f0e59b6903 LinuxKPI: skbuff: remove assumption about mac_header
It seems the mac_header can be set to offset 0 for frames received.
Remove the warning splattering messages to the console for each packet.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2023-09-11 14:31:35 +00:00