]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 months agosys: Remove $FreeBSD$: one-line sh pattern
Warner Losh [Tue, 22 Aug 2023 01:31:56 +0000 (19:31 -0600)]
sys: Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

Similar commit in current:
(cherry picked from commit 031beb4e239b)

10 months agoRemove $FreeBSD$: one-line .S pattern
Warner Losh [Tue, 22 Aug 2023 01:31:54 +0000 (19:31 -0600)]
Remove $FreeBSD$: one-line .S pattern

Remove /^\s\.(asciz|ident)\s+\"\$FreeBSD\$\".*\n/

Similar commit in main:
(cherry picked from commit b1cfcffa89e6)

10 months agosys: Remove $FreeBSD$: one-line .S pattern
Warner Losh [Tue, 22 Aug 2023 01:31:51 +0000 (19:31 -0600)]
sys: Remove $FreeBSD$: one-line .S pattern

Remove /^\s\.(asciz|ident)\s+\"\$FreeBSD\$\".*\n/

Similar commit in current:
(cherry picked from commit d4bf8003ee42)

10 months agoRemove $FreeBSD$: alt one-line .c pattern
Warner Losh [Tue, 22 Aug 2023 01:31:50 +0000 (19:31 -0600)]
Remove $FreeBSD$: alt one-line .c pattern

Remove /^\s*__RCSID\("\$FreeBSD\$"\);\n/

Similar commit in main:
(cherry picked from commit c8573564095b)

10 months agoRemove $FreeBSD$: alt two-line .c pattern
Warner Losh [Tue, 22 Aug 2023 01:31:46 +0000 (19:31 -0600)]
Remove $FreeBSD$: alt two-line .c pattern

Remove /^\s*__RCSID\("\$FreeBSD\$"\);\n\n/

Similar commit in main:
(cherry picked from commit da5432eda807)

10 months agoRemove $FreeBSD$: one-line .c pattern
Warner Losh [Tue, 22 Aug 2023 01:31:41 +0000 (19:31 -0600)]
Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in main:
(cherry picked from commit 1d386b48a555)

10 months agosys: Remove $FreeBSD$: one-line .c pattern
Warner Losh [Tue, 22 Aug 2023 01:31:27 +0000 (19:31 -0600)]
sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in current:
(cherry picked from commit 685dc743dc3b)

10 months agoRemove $FreeBSD$: two-line .c pattern
Warner Losh [Tue, 22 Aug 2023 01:31:23 +0000 (19:31 -0600)]
Remove $FreeBSD$: two-line .c pattern

Remove /^#include\s+<sys/cdefs.h>.*$\n\s+__FBSDID\("\$FreeBSD\$"\);\n/

Similar commit in main:
(cherry picked from commit e5d258c9e599)

10 months agosys: Remove $FreeBSD$: two-line .c pattern
Warner Losh [Tue, 22 Aug 2023 01:31:20 +0000 (19:31 -0600)]
sys: Remove $FreeBSD$: two-line .c pattern

Remove /^#include\s+<sys/cdefs.h>.*$\n\s+__FBSDID\("\$FreeBSD\$"\);\n/

Similar commit in current:
(cherry picked from commit dfc016587a1e)

10 months agoRemove $FreeBSD$: one-line .c comment pattern
Warner Losh [Tue, 22 Aug 2023 01:31:18 +0000 (19:31 -0600)]
Remove $FreeBSD$: one-line .c comment pattern

Remove /^/[*/]\s*\$FreeBSD\$.*\n/

Similar commit in main:
(cherry picked from commit 2a63c3be1582)

10 months agosys: Remove $FreeBSD$: one-line .c comment pattern
Warner Losh [Tue, 22 Aug 2023 01:31:15 +0000 (19:31 -0600)]
sys: Remove $FreeBSD$: one-line .c comment pattern

Remove /^/[*/]\s*\$FreeBSD\$.*\n/

Similar commit in current:
(cherry picked from commit 71625ec9ad2a)

10 months agoRemove $FreeBSD$: one-line .h pattern
Warner Losh [Tue, 22 Aug 2023 01:31:13 +0000 (19:31 -0600)]
Remove $FreeBSD$: one-line .h pattern

Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit 42b388439bd3)

10 months agosys: Remove $FreeBSD$: one-line .h pattern
Warner Losh [Tue, 22 Aug 2023 01:31:09 +0000 (19:31 -0600)]
sys: Remove $FreeBSD$: one-line .h pattern

Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/

Similar commit in current:
(cherry picked from commit 2ff63af9b88c)

10 months agoRemove $FreeBSD$: two-line .h pattern
Warner Losh [Tue, 22 Aug 2023 01:31:07 +0000 (19:31 -0600)]
Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit b3e7694832e8)

10 months agosys: Remove $FreeBSD$: two-line .h pattern
Warner Losh [Tue, 22 Aug 2023 01:31:02 +0000 (19:31 -0600)]
sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in current:
(cherry picked from commit 95ee2897e98f)

10 months agoRemove $FreeBSD$: one-line m4 tag
Warner Losh [Tue, 22 Aug 2023 01:30:59 +0000 (19:30 -0600)]
Remove $FreeBSD$: one-line m4 tag

Remove /^dnl\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit d54a7d337331)

10 months agosys: Remove $FreeBSD$: sound driver version
Warner Losh [Tue, 22 Aug 2023 01:30:48 +0000 (19:30 -0600)]
sys: Remove $FreeBSD$: sound driver version

Remove /SND_DECLARE_FILE\("\$FreeBSD\$"\);/

Similar commit in current:
(cherry picked from commit )

10 months agopowerpc/ata: Remove non-standard __FBSDID()
Warner Losh [Wed, 16 Aug 2023 07:42:59 +0000 (01:42 -0600)]
powerpc/ata: Remove non-standard __FBSDID()

This one has an extra '* ' at the front, so isn't picked up by the
scripts

Sponsored by: Netflix

(cherry picked from commit 77a999ef2f0c3003822ef2085752a4373f3af148)

10 months agoglob.h: Remove $FreeBSD$
Warner Losh [Wed, 16 Aug 2023 07:42:14 +0000 (01:42 -0600)]
glob.h: Remove $FreeBSD$

This likely documented where this file was copied, but the $FreeBSD$
tag was lost as soon as it was committed. Just remove it. Also remove
the one that looked like it was intended to track versions. That will
simplify the MFC.

Sponsored by: Netflix

(cherry picked from commit c25155762166bd03329667e525b2e2c1253a4d6a)

10 months agompool: Remove $FreeBSD$ comment
Warner Losh [Wed, 16 Aug 2023 07:37:16 +0000 (01:37 -0600)]
mpool: Remove $FreeBSD$ comment

Remove non-standard $FreeBSD$ comment. It's not useful

Sponsored by: Netflix

(cherry picked from commit be6151e43cffa86cea04212ccb212222e608614e)

10 months agocursor.bdf: Remove $FreeBSD$ tag
Warner Losh [Wed, 16 Aug 2023 07:36:00 +0000 (01:36 -0600)]
cursor.bdf: Remove $FreeBSD$ tag

Remove $FreeBSD$ tag COMMENT

Sponsored by: Netflix

(cherry picked from commit 19fae0f66023a97a9b464b3beeeabb2081f575b3)

10 months agops3: Don't add $FreeBSD$ to generated file
Warner Losh [Wed, 16 Aug 2023 07:30:04 +0000 (01:30 -0600)]
ps3: Don't add $FreeBSD$ to generated file

Sponsored by: Netflix

(cherry picked from commit fba400ef51d5e5701f752000e62e3a9dd59ab751)

10 months agogenerate-hfs.sh: don't embed $FreeBSD$ in generated code
Warner Losh [Wed, 16 Aug 2023 07:24:03 +0000 (01:24 -0600)]
generate-hfs.sh: don't embed $FreeBSD$ in generated code

Sponsored by: Netflix

(cherry picked from commit bed13771a3596e9501adec2f133db1b511c05b7e)

10 months agovnode_if: Don't add $FreeBSD$ to the output
Warner Losh [Wed, 16 Aug 2023 06:22:54 +0000 (00:22 -0600)]
vnode_if: Don't add $FreeBSD$ to the output

Sponsored by: Netflix

(cherry picked from commit 750a49b606f173fdc2a53461882260fcf6a407f1)

10 months agofw_stub: Don't add $FreeBSD$ to generated file
Warner Losh [Wed, 16 Aug 2023 06:21:20 +0000 (00:21 -0600)]
fw_stub: Don't add $FreeBSD$ to generated file

Sponsored by: Netflix

(cherry picked from commit fa12e8fe5145722728bac4e394edb11b2a86c675)

10 months agopccard: Don't include version information.
Warner Losh [Tue, 22 Aug 2023 13:16:30 +0000 (07:16 -0600)]
pccard: Don't include version information.

$FreeBSD$ is about to be removed, so don't include the next line.

Sponsored by: Netflix

10 months agomiidevs2h: Ignore the first line
Warner Losh [Wed, 16 Aug 2023 05:33:18 +0000 (23:33 -0600)]
miidevs2h: Ignore the first line

The first line hasn't contained version information in years. Ignore it
entirely.

Sponsored by: Netflix

(cherry picked from commit 021c4fa6b04ced4bed9a4937086c62ebbe571f63)

10 months agousbdevs2h: Ignore First Line and stop generating $FreeBSD$
Warner Losh [Wed, 16 Aug 2023 05:32:04 +0000 (23:32 -0600)]
usbdevs2h: Ignore First Line and stop generating $FreeBSD$

Just ignore the first line of the usbdevs file. And stop recording what
the usbdevs* files were generated from. It's said '$FreeBSD$' for years
now...

Sponsored by: Netflix

(cherry picked from commit 94b73d30ef2b0d85d4834a1e4dc29e0457a8faef)

10 months agosystat: Remove obsolete copyright string
Warner Losh [Wed, 16 Aug 2023 03:22:50 +0000 (21:22 -0600)]
systat: Remove obsolete copyright string

This is unused, so remove it. We don't put a copyright string in most of
the other binaries. This one doesn't need one either.

Sponsored by: Netflix

(cherry picked from commit bf46512a54cdf9a5b2e4f520be860add21efbfd5)

10 months agolinux(4): Fix linker warning about undefined vdso symbols
Dmitry Chagin [Sat, 19 Aug 2023 21:48:36 +0000 (00:48 +0300)]
linux(4): Fix linker warning about undefined vdso symbols

Pointed out by: bz
MFC after: 3 days

(cherry picked from commit a129642ced9e6ceacf98c7663bc1178eb32a78be)

10 months agolinux(4): Fix MSG_CTRUNC handling in recvmsg()
Dmitry Chagin [Mon, 14 Aug 2023 12:46:12 +0000 (15:46 +0300)]
linux(4): Fix MSG_CTRUNC handling in recvmsg()

The MSG_CTRUNC flag of the msg_flags member of the message header is
set uppon successful completition if the control data was truncated.
Upon return from a successful call msg_controllen should contain the
length of the control message sequence.

Fixes: 0eda2cea
MFC after: 1 week

(cherry picked from commit 2467ccddc0e0f5c719eddaece69a7aa0589b6449)

10 months agolinux(4): Add a comment explaining udata freeing on error
Dmitry Chagin [Mon, 14 Aug 2023 12:46:12 +0000 (15:46 +0300)]
linux(4): Add a comment explaining udata freeing on error

MFC after: 1 week

(cherry picked from commit 9d0c9b6d6a6a90f626088308dfb895221bf6d36f)

10 months agolinux(4): Refactor recvmsg
Dmitry Chagin [Mon, 14 Aug 2023 12:46:12 +0000 (15:46 +0300)]
linux(4): Refactor recvmsg

As the amount of handled anxiliary messages grows move they handlers
into a separate functions.

MFC after: 1 week

(cherry picked from commit de20eb26d014f7d9ba81fd1f84636609c8efa8e1)

10 months agolinux(4): Skip unsupported anxiliary message
Dmitry Chagin [Mon, 14 Aug 2023 12:46:12 +0000 (15:46 +0300)]
linux(4): Skip unsupported anxiliary message

Instead of returning error, skip unsupported anxiliary messages and
fail if no one handled.

MFC after: 1 week

(cherry picked from commit bbaa5523c01a11e1e322928639522b9ccfd19978)

10 months agolinux(4): Improve readability of recvmsg control buffer copyout code
Dmitry Chagin [Mon, 14 Aug 2023 12:46:12 +0000 (15:46 +0300)]
linux(4): Improve readability of recvmsg control buffer copyout code

MFC after: 1 week

(cherry picked from commit a21238d843ebe02e696cdc30b008382dfca5612e)

10 months agolinux(4): Drop bogus empty line in linux_socket.c
Dmitry Chagin [Mon, 14 Aug 2023 12:46:12 +0000 (15:46 +0300)]
linux(4): Drop bogus empty line in linux_socket.c

MFC after: 1 week

(cherry picked from commit 43c3beb7414e1cf031fe8e32e7ec1876a5b20610)

10 months agolinux(4): Fix control message size calculation again
Dmitry Chagin [Mon, 14 Aug 2023 12:46:11 +0000 (15:46 +0300)]
linux(4): Fix control message size calculation again

It looks Linux recvmsg allows msg_controllen size less then CMSG_SPACE
buffer, at least for case with one cmsghdr. Glibc misc/tst-scm_rights
test succed on Ubuntu 23.04

Fixes:   67116c69 "linux(4): Fix control message size calculation"
MFC after: 1 week

(cherry picked from commit 7d561928e65af6fe90ff9e316b2d50668c53b464)

10 months agopci: return 0 for pci_remap_intr_method MSI-X non-error case
Ed Maste [Mon, 14 Aug 2023 20:35:34 +0000 (16:35 -0400)]
pci: return 0 for pci_remap_intr_method MSI-X non-error case

When remapping a MSI-X vector, we would always return ENOENT, even if
successful.  This didn't really matter, as the sole caller of
BUS_REMAP_INTR also didn't check for errors.

Return 0 if there's no error, so that we can start handling (or at least
warning about) actual failures.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41449

(cherry picked from commit 43e545e8e016d22346a4fe278ea2570328b20cc1)

10 months agoSet UFS/FFS file type to snapshot before changing its block pointers.
Kirk McKusick [Sat, 12 Aug 2023 18:20:08 +0000 (11:20 -0700)]
Set UFS/FFS file type to snapshot before changing its block pointers.

Reported-by: Peter Holm
Tested-by: Peter Holm
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 220427da0e9b2c1d8e964120becc17eb7524e46f)

10 months agoOptimize operations on UFS/FFS filesystems with bad cylinder group(s).
Kirk McKusick [Fri, 11 Aug 2023 06:02:47 +0000 (23:02 -0700)]
Optimize operations on UFS/FFS filesystems with bad cylinder group(s).

Reported-by: Peter Holm
Tested-by: Peter Holm
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit c3046779b241768394a336de115e88cc7c10d922)

10 months agoCleanups to UFS/FFS ffs_checkblk().
Kirk McKusick [Fri, 11 Aug 2023 05:38:56 +0000 (22:38 -0700)]
Cleanups to UFS/FFS ffs_checkblk().

No functional change intended.

Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 677023529d6a46da52ed780eb299c6754a75f6ef)

10 months agoClean up and document UFS/FFS error returns.
Kirk McKusick [Fri, 11 Aug 2023 00:50:23 +0000 (17:50 -0700)]
Clean up and document UFS/FFS error returns.

Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 886fd36e1ac2082f1b0decb89d70e1e7a0dc3043)

10 months agoRemove a partial UFS/FFS snapshot if it fails to build successfully.
Kirk McKusick [Wed, 9 Aug 2023 23:43:41 +0000 (16:43 -0700)]
Remove a partial UFS/FFS snapshot if it fails to build successfully.

Reported-by: Peter Holm
Tested-by: Peter Holm
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit c52b5d16ccf29ad0e999a1f5f813ed6472aa3771)

10 months agoRate limit kernel UFS/FFS cylinder group check-hash error messages.
Kirk McKusick [Wed, 9 Aug 2023 00:10:07 +0000 (17:10 -0700)]
Rate limit kernel UFS/FFS cylinder group check-hash error messages.

Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 6dff61a1d1878ea5e9f6e5c36521b3f39cd34b33)

10 months agoHandle UFS/FFS file deletion from cylinder groups with check-hash failure.
Kirk McKusick [Mon, 7 Aug 2023 23:27:39 +0000 (16:27 -0700)]
Handle UFS/FFS file deletion from cylinder groups with check-hash failure.

Reported-by: Peter Holm
Tested-by: Peter Holm
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit d4a8f5bf133956e71c05edff6fa20b156e5f1bbf)

10 months agoSupport background fsck_ffs(8) on filesystems using journaled soft updates
Kirk McKusick [Tue, 1 Aug 2023 20:16:11 +0000 (13:16 -0700)]
Support background fsck_ffs(8) on filesystems using journaled soft updates

Tested-by: Peter Holm
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 344b5bf82528575ada304f0df356d2f045772328)

10 months agoUpdate newfs(8) and tunefs(8) manual pages.
Kirk McKusick [Sun, 6 Aug 2023 06:40:26 +0000 (23:40 -0700)]
Update newfs(8) and tunefs(8) manual pages.

Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 4ce2a2db41f9a18cdcec088b330899a8d830c2be)

10 months agotftpd: fix wrong conflict resolution
Eugene Grosbein [Sat, 19 Aug 2023 06:43:08 +0000 (13:43 +0700)]
tftpd: fix wrong conflict resolution

This is direct commit to stable/13 after wrong previous one.

Fixes: b71dde1aeba2972522a6742bbae77c2c6497eb01

10 months agotftpd: introduce new option -S
Eugene Grosbein [Thu, 20 Jul 2023 20:11:33 +0000 (03:11 +0700)]
tftpd: introduce new option -S

Historically, tftpd disallowed write requests to existing files
that are not publicly writable. Such requirement is questionable at least.
Let us make it possible to run tftpd in chrooted environment
keeping files non-world writable.

New option -S enables write requests to existing files
for chrooted run according to generic file permissions.
It is ignored unless tftpd runs chrooted.

Requested by: marck
Differential: https://reviews.freebsd.org/D41090 (based on)

(cherry picked from commit 273a307d0b80743fb08e23237b3f74dc94a8fa2a)
(cherry picked from commit 03c2616dc530e5b23f06f9aa421012154590e578)

10 months agotc_fill_vdso_timehands32(): fix
Konstantin Belousov [Sat, 12 Aug 2023 19:51:37 +0000 (22:51 +0300)]
tc_fill_vdso_timehands32(): fix

PR: 273085

(cherry picked from commit 93626d54370292b09cd0ca604b144737109e9071)

10 months agolibc vdso time functions: correctly convert errors into errnos
Konstantin Belousov [Sat, 12 Aug 2023 15:45:43 +0000 (18:45 +0300)]
libc vdso time functions: correctly convert errors into errnos

(cherry picked from commit 41acfee690da6289d570338e6365c1d7ef61dad5)

10 months agogve: Simplify tx loop over buffer ring
Shailend Chand [Sat, 12 Aug 2023 07:59:26 +0000 (00:59 -0700)]
gve: Simplify tx loop over buffer ring

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D41281

(cherry picked from commit 543cf924bcdcf064fed417ec3d66000ef66194d2)

10 months agogve: Fix Tx tcpdump panic
Shailend Chand [Thu, 27 Jul 2023 05:22:31 +0000 (22:22 -0700)]
gve: Fix Tx tcpdump panic

Ringing the doorbell before making the BPF call can result in the
mbuf being freed before the BPF call.

Reviewed-by: markj
Differential Revision: https://reviews.freebsd.org/D41189

(cherry picked from commit 74861578d95573e13a2099143f9d4e7edbb82806)

10 months agogve: Unobfuscate code by using nitems directly for loop.
Xin LI [Wed, 7 Jun 2023 04:14:30 +0000 (21:14 -0700)]
gve: Unobfuscate code by using nitems directly for loop.

While there, also make MODULE_PNP_INFO to reflect that the device
description is provided.

Reported-by: jrtc27
Reviewed-by: jrtc27, imp
Differential Revision: https://reviews.freebsd.org/D40430

(cherry picked from commit 1177a6c8dcfd6625c541d6ffc3c6915b8b6354f7)

10 months agogve: Add PNP info to PCI attachment of gve(4) driver.
Xin LI [Tue, 6 Jun 2023 00:58:43 +0000 (17:58 -0700)]
gve: Add PNP info to PCI attachment of gve(4) driver.

Reviewed-by: imp
Differential Revision: https://reviews.freebsd.org/D40429

(cherry picked from commit 1bbdfb0b438689a839e29094fcb582a104cbabd9)

10 months agogve: Fix build on i386 and enable LINT builds.
Xin LI [Sun, 4 Jun 2023 23:35:00 +0000 (16:35 -0700)]
gve: Fix build on i386 and enable LINT builds.

Reviewed-by: imp
Differential Revision: https://reviews.freebsd.org/D40419

(cherry picked from commit 4d779448adb32ef6424abb781dab87065964d42f)

10 months agoAdd gve, the driver for Google Virtual NIC (gVNIC)
Shailend Chand [Fri, 2 Jun 2023 18:58:24 +0000 (11:58 -0700)]
Add gve, the driver for Google Virtual NIC (gVNIC)

gVNIC is a virtual network interface designed specifically for
Google Compute Engine (GCE). It is required to support per-VM Tier_1
networking performance, and for using certain VM shapes on GCE.

The NIC supports TSO, Rx and Tx checksum offloads, and RSS.
It does not currently do hardware LRO, and thus the software-LRO
in the host is used instead. It also supports jumbo frames.

For each queue, the driver negotiates a set of pages with the NIC to
serve as a fixed bounce buffer, this precludes the use of iflib.

Reviewed-by: markj
Differential Revision: https://reviews.freebsd.org/D39873

(cherry picked from commit 54dfc97b0bd99f1c3bcbb37357cf28cd81a7cf00)

10 months agoCirrus update to new freebsd instance version
QWERTIOX [Wed, 19 Apr 2023 13:01:15 +0000 (15:01 +0200)]
Cirrus update to new freebsd instance version

MFC after: 2 weeks
Pull Request: https://github.com/freebsd/freebsd-src/pull/718

(cherry picked from commit 5e2ba9cb6b0bc097f6ed176894cfee3b5bd405f4)

10 months agoldns: Upgrade to 1.8.3.
Dag-Erling Smørgrav [Wed, 24 May 2023 15:50:18 +0000 (15:50 +0000)]
ldns: Upgrade to 1.8.3.

Merge commit 'cf3e3d5bd0a1fae39c74c7db5a4e8b10732d0766'

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D40226

(cherry picked from commit 5afab0e5e56fe90a378fb57249600e7924e1cab2)

ldns: Remove a set but unused variable.

Reviewed by: des
Differential Revision: https://reviews.freebsd.org/D40695

(cherry picked from commit 2e1665ff345498c3f99ffd07b6e90669172d2df2)

10 months agopkgbase: move libcom_err from kerberos to kerberos-lib
Doug Rabson [Wed, 9 Aug 2023 07:42:16 +0000 (08:42 +0100)]
pkgbase: move libcom_err from kerberos to kerberos-lib

This makes it possible to install kerberos-lib (which is used by common
utilities such as curl) without pulling in the rest of kerberos.

MFC after: 1 week

(cherry picked from commit 54cfeb848468b8086fd046bdb94a0ed30f6dec15)

10 months agomd driver compat32: fix structure padding for arm, powerpc
Mike Karels [Tue, 8 Aug 2023 14:09:03 +0000 (09:09 -0500)]
md driver compat32: fix structure padding for arm, powerpc

Because the 32-bit md_ioctl structure contains 64-bit members, arm
and powerpc add padding to a multiple of 8.  i386 doesn't do this.
The md_ioctl32 definition was correct for amd64/i386 without padding,
but wrong for arm64 and powerpc64.  Make __packed__ conditional on
__amd64__, and test for the expected size on non-amd64.  Note that
mdconfig is used in the ATF test suite.  Note, I verified the
structure size for powerpc, but was unable to test.

Reviewed by: jrtc27
Differential Revision: https://reviews.freebsd.org/D41339
Discussed with: jhibbits

(cherry picked from commit 58a46cfd751ac726ddca8544bf73a290b0154a57)

10 months agobhyve: add bootindex option for several devices
Corvin Köhne [Mon, 16 Aug 2021 07:50:15 +0000 (09:50 +0200)]
bhyve: add bootindex option for several devices

The bootindex option creates an entry in the "bootorder" fwcfg file.
This file can be picked up by the guest firmware to determine the
bootorder. Nevertheless, it's not guaranteed that the guest firmware
uses the bootorder. At the moment, our OVMF ignores the bootorder. This
will change in the future.

If guest firmware supports the "bootorder" fwcfg file and no device uses
the bootindex option, the boot order is determined by the firmware
itself. If one or more devices specify a bootindex, the first bootable
device with the lowest bootindex will be booted. It's not garanteed that
devices without a bootindex will be recognized as bootable from the
firmware in that case.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D39285

(cherry picked from commit 480bef9481f0c44b19ac4b2adb09f6c3191acd41)

10 months agobhyve: add helper to create a bootorder
Corvin Köhne [Mon, 16 Aug 2021 07:47:53 +0000 (09:47 +0200)]
bhyve: add helper to create a bootorder

Qemu's fwcfg allows to define a bootorder. Therefore, the hypervisor has
to create a fwcfg item named bootorder, which has a newline seperated
list of boot entries. Qemu's OVMF will pick up the bootorder and applies
it.

Add the moment, bhyve's OVMF doesn't support a custom bootorder by
qemu's fwcfg. However, in the future bhyve will gain support for qemu's
OVMF. Additonally, we can port relevant parts from qemu's to bhyve's
OVMF implementation.

Reviewed by: jhb, markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D39284

(cherry picked from commit 6632a0a4e3ab68b0e31b612e8aeca14de3fc8159)

10 months agobhyve: pass address of OpRegion to the guest
Corvin Köhne [Wed, 10 May 2023 11:44:28 +0000 (13:44 +0200)]
bhyve: pass address of OpRegion to the guest

Don't allow access to the physical ASLS register. It contains a host
address which is meaningless for the guest. Additionally, it allows the
guest to safely rewrite this register.

This is the last commit required for GVT-d. Nevertheless, it might not
work due to missing firmware support.

MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D26209

(cherry picked from commit 71fb2dcb0023d49fc048e1f7b610ad05bd2efc32)

10 months agobhyve: copy OpRegion into guest memory
Corvin Köhne [Wed, 10 May 2023 11:39:56 +0000 (13:39 +0200)]
bhyve: copy OpRegion into guest memory

This makes the OpRegion accessible by the guest. However, the guest
doesn't know the address of the OpRegion. This will be fixed by an
upcoming commit.

The range of the OpRegion is added to the e820 table. This allows the
guest firmware to easily pick up this range and to reserve it properly.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40041

(cherry picked from commit 1115cdcf7af12fd06ca255b981cb579a7bb7a147)

10 months agobhyve: read OpRegion address and size for GVT-d
Corvin Köhne [Wed, 10 May 2023 11:38:02 +0000 (13:38 +0200)]
bhyve: read OpRegion address and size for GVT-d

The OpRegion provides some configuration bits and ACPI methods used by
some Intel drivers. The guest needs access to it. In the first step,
we're reading it's address and size.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40040

(cherry picked from commit 6952b9d25e18fd3a4bf0d1bb7d6b44ff6edf6737)

10 months agobhyve: emulate graphics stolen memory register
Corvin Köhne [Thu, 11 May 2023 09:18:56 +0000 (11:18 +0200)]
bhyve: emulate graphics stolen memory register

This register contains a host physical address. This address is
meaningless for the guest. We have to emulate it and set it to a valid
guest physical address.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40060

(cherry picked from commit d9fa7c113df254b237e5a573d0567eb686e5fcde)

10 months agobhyve: allocate guest memory for graphics stolen memory
Corvin Köhne [Thu, 11 May 2023 09:10:07 +0000 (11:10 +0200)]
bhyve: allocate guest memory for graphics stolen memory

The graphics stolen memory is only GPU accessible. So, we don't have to
copy any data to it as the guest will be unable to access it anyway. We
just have to allocate and reserve some memory. That's done by adding an
E820 entry for the graphics stolen memory. The guest firmware will pick
up the E820 and reserve this range.

Note that we try to reuse the host address as Intel states that newer
Tiger Lake platforms need this [1].

[1]
https://github.com/projectacrn/acrn-hypervisor/blob/e28d6fbfdfd556ff1bc3ff330e41d4ddbaa0f897/devicemodel/hw/pci/passthrough.c#L626-L629

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40059

(cherry picked from commit 1bd361eea28ae74b42d49bfc96b109a7eae9f3d3)

10 months agobhyve: read out graphics stolen memory address and size
Corvin Köhne [Thu, 11 May 2023 08:53:15 +0000 (10:53 +0200)]
bhyve: read out graphics stolen memory address and size

This is the first step to emulate the graphics stolen memory register.

Note that the graphics stolen memory is somehow confusing. On the one
hand the Intel Open Source HD Graphics Programmers' Reference Manual
states that it's only GPU accessible. As the CPU can't access the area,
the guest shouldn't need it. On the other hand, the Intel GOP driver
refuses to work properly, if it's not set to a proper address.

Intel itself maps it into the guest by EPT [1]. At the moment, we're not
aware of any situation where this EPT mapping is required, so we don't
do it yet.

Intel also states that the Windows driver for Tiger Lake reads the
address of the graphics stolen memory [2]. As the GVT-d code doesn't
support Tiger Lake in its first implementation, we can't check how it
behaves. We should keep an eye on it.

[1]
https://github.com/projectacrn/acrn-hypervisor/blob/e28d6fbfdfd556ff1bc3ff330e41d4ddbaa0f897/devicemodel/hw/pci/passthrough.c#L655-L657
[2]
https://github.com/projectacrn/acrn-hypervisor/blob/e28d6fbfdfd556ff1bc3ff330e41d4ddbaa0f897/devicemodel/hw/pci/passthrough.c#L626-L629

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40039

(cherry picked from commit 4a9bf50f408eb9f1acc220dba2b260ec610fd15b)

10 months agobhyve: add empty GVT-d emulation
Corvin Köhne [Wed, 10 May 2023 10:31:50 +0000 (12:31 +0200)]
bhyve: add empty GVT-d emulation

Don't emulate anything yet. Just check if the user would like to pass an
Intel GPU to the guest.

Reviewed by: jhb, markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40038

(cherry picked from commit 90c3a1b6629c80a7e4c3fa86d6b794596fdf06b4)

10 months agobhyve: import OpRegion definitions
Corvin Köhne [Wed, 10 May 2023 10:25:19 +0000 (12:25 +0200)]
bhyve: import OpRegion definitions

Those definitions are required for the GVT-d emulation to parse the
OpRegion.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40037

(cherry picked from commit b67f0d360b87d6e8a71ab5118a8acb350505c20a)

10 months agobhyve: add helper for passthru specific mmio ranges
Corvin Köhne [Wed, 10 May 2023 10:22:33 +0000 (12:22 +0200)]
bhyve: add helper for passthru specific mmio ranges

Intel GPUs have two special memory regions. They are called Graphics
Stolen Memory and OpRegion. bhyve has to emulate both of them. In order
to keep track of those special regions, add generic mmio ranges to the
passthru emulation.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40036

(cherry picked from commit 93cf93179c505cebbcdbeef196d523d36890ed4a)

10 months agobhyve: make passthru sel public available
Corvin Köhne [Wed, 10 May 2023 10:19:49 +0000 (12:19 +0200)]
bhyve: make passthru sel public available

The GVT-d emulation requires access to this selector to read from the
device.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40035

(cherry picked from commit 60793cee27993048864f60e3c19039386e4a4ab0)

10 months agobhyve: allow adding FwCfg items to ACPI tables
Corvin Köhne [Fri, 22 Jul 2022 08:58:01 +0000 (10:58 +0200)]
bhyve: allow adding FwCfg items to ACPI tables

A TPM has an event log. Therefore, qemu adds a FwCfg item and adds it to
an ACPI table. We like to use the same OVMF driver as qemu, so we should
do the same. This commit adds the ability to basl to do it.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40451

(cherry picked from commit 4e46ab0ebe96b56d4fa7ea7df4a81cd533109f07)

10 months agobhyve: add cmdline option for user defined fw_cfg items
Corvin Köhne [Wed, 8 Sep 2021 09:31:21 +0000 (11:31 +0200)]
bhyve: add cmdline option for user defined fw_cfg items

Some guest allow to configure themself by fw_cfg. E.g. Fedora CoreOs can
be provisioned by adding a JSON file as fw_cfg item.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D38338

(cherry picked from commit ca14781c8170f3517ae79e198c0c880dbc3142dd)

bhyve: error out if fwcfg user file isn't read completely

At the moment, fwcfg reads the file once at startup and passes these
data to the guest. Therefore, we should always read the whole file.
Otherwise we should error out.

Additionally, GCC12 complains that the comparison whether
fwcfg_file->size is lower than 0 is always false due to the limited
range of data type.

Reviewed by: markj
Fixes: ca14781c8170f3517ae79e198c0c880dbc3142dd ("bhyve: add cmdline option for user defined fw_cfg items")
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40076

(cherry picked from commit 26d9f973d8691eccc098ded7326137d6f76ad243)

10 months agobhyvectl: Add '--get-debug-cpus' command
Vitaliy Gusev [Tue, 25 Jul 2023 12:03:54 +0000 (14:03 +0200)]
bhyvectl: Add '--get-debug-cpus' command

vmm and libvmmapi already have handlers for that. When adding debug
cpus, they were only used for the debug stub. Over time, they were
reused by other parts like snapshots or idle APs.

Reviewed by: corvink, jhb
MFC after: 1 week
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D40804

(cherry picked from commit 65f8467e3351c38a9d57b538b85cf6c5fab5818e)

10 months agobhyve: rename 'structs' snapshot key with 'kern_structs'
Vitaliy Gusev [Mon, 15 May 2023 14:25:15 +0000 (14:25 +0000)]
bhyve: rename 'structs' snapshot key with 'kern_structs'

Using key 'structs' is ambiguous. This section contains data
related to the kernel. It should use a more informative naming.

Reviewed by: corvink, rew
MFC after: 1 week
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D40104

(cherry picked from commit 50aef9f62c1be9e723169ef57920c3fca07bd2fb)

10 months agobhyve: add .pe_snapshot method for PCI 'hostbridge'
Vitaliy Gusev [Mon, 15 May 2023 16:29:56 +0000 (16:29 +0000)]
bhyve: add .pe_snapshot method for PCI 'hostbridge'

There is no error when dump doesn't have it, but to be more
consistent this PCI devices should be saved as well.

Reviewed by: corvink, rew
MFC after: 1 week
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D40108

(cherry picked from commit 6f7d2cf8bbb5ce6c4dbe0153d54cdc474b5266f4)

10 months agobhyve: add bus, slot and func to device name
Vitaliy Gusev [Mon, 15 May 2023 14:28:45 +0000 (14:28 +0000)]
bhyve: add bus, slot and func to device name

Each device needs a unique identifier to store and restore snapshots
properly. Adding the pci bsf information to the device name creates a
unique identifier as a bsf can't be occupied twice.

Reviewed by: corvink
MFC after: 1 week
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D40107

(cherry picked from commit 14c80457b0f6a5eb6ff9a1db573462410c64a454)

10 months agobhyve: rename 'user_dev' with 'devices'
Vitaliy Gusev [Mon, 15 May 2023 14:28:14 +0000 (14:28 +0000)]
bhyve: rename 'user_dev' with 'devices'

Bhyve don't use 'user' specifier for emulated devices. And
using 'user' adds duality.

Reviewed by: corvink, rew
MFC after: 1 week
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D40106

(cherry picked from commit b10d65a420f068bccf6aaf2942157a5347211dc5)

10 months agobhyve: save/restore pir_desc
Vitaliy Gusev [Tue, 9 May 2023 08:27:29 +0000 (10:27 +0200)]
bhyve: save/restore pir_desc

Failing to preserve pir_desc can result in pending interrupts being lost
on resume leading to a hung VM.

Reviewed by: corvink, jhb
MFC after: 1 week
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D35447

(cherry picked from commit c543e09f1f8ef98f201f7dd3f34ae023d61dfa83)

10 months agokern: osd: avoid dereferencing freed slots
Kyle Evans [Thu, 10 Aug 2023 17:32:33 +0000 (12:32 -0500)]
kern: osd: avoid dereferencing freed slots

If a slot is freed that isn't the last one, we'll set its destructor to
NULL to indicate that it's been freed and leave a hole in the slot map.
Check osd_destructors in osd_call() to avoid dereferencing a method that
is potentially from a module that's been unloaded.

This scenario would most commonly surface when two modules are loaded
that osd_register(), then the earlier one deregisters and an osd_call()
is made after the fact.  In the specific report that triggered the
investigation, kldload if_wg -> kldload linux* -> kldunload if_wg ->
destroy a jail -> panic.

Noted in the review, but left for follow-up work, is that the realloc
that may happen in osd_deregister() should likely go away and the
assumption that reallocating to a smaller size cannot fail is actually
not correct.

Reported by: dim

(cherry picked from commit 2bd446d7f1a03fbf6d98ace4548f8793599f48fb)

10 months agovlan: Respect IFCAP_LRO mask
Kevin Bowling [Sat, 12 Aug 2023 16:31:22 +0000 (09:31 -0700)]
vlan: Respect IFCAP_LRO mask

vlan_capabilities(), used by the IFCAP ioctl, was not respecting the
IFCAP_LRO bit if it was masked by the requestor.

This prevented if_bridge(4) from automasking LRO with a message like:
bridge0: can't disable some capabilities on em3.11: 0x400

This also prevented manually disabling LRO from any vlan interface.

PR: 254596
Reported by: Paul Vixie <paul@redbarn.org>

(cherry picked from commit b1a39c31a3569bd045a0f40057c3773fc8166f6d)

10 months agoe1000: Some fixes for hardware capabilities
Kevin Bowling [Thu, 3 Aug 2023 20:49:15 +0000 (13:49 -0700)]
e1000: Some fixes for hardware capabilities

This MFC squash retains disabled TSO ultimately, but contains some
capability fixes.

f1b5488f:
e1000: Enable TSO for lem(4) and em(4)

Most em(4) devices now enjoy TSO and TSO6, matching NetBSD and Linux
defaults.

A prior commit automasks TSO on 10/100 Ethernet due to errata and other
bugs for IPv6 were fixed recently allowing this.

Mike Karels identified a performance anomaly on Intel 82574L devices.
These are multiqueue enabled on FreeBSD since the conversion to
iflib.  I am investigating whether this can be fixed, in the mean time
MSI-X with checksum offloads remain default.

i219 SPT devices have an errata that downclocks the DMA engine, which
results in TSO not being able to acheive line rate.  Therefore, it is
disabled on:
* Intel(R) I219-LM and I219-V SPT
* Intel(R) I219-LM and I219-V SPT-H (2)
* Intel(R) I219-LM and I219-V LBG (3)
* Intel(R) I219-LM and I219-V SPT (4)
* Intel(R) I219-LM and I219-V SPT (5)

Many lem(4) devices enjoy TSO, exceptions being 82542, 82543, 82547.
TSO6 may be possible for some chipsets but I am still working through
my testing matrix and that is hidden behind hw.em.unsupported_tso.

If you encounter issues, you may disable TSO with for example:
ifconfig em0 -tso -tso6.
I ask to be informed of any deviations from normal operation requiring
this.

Thanks to cc@ for access to emulab.net.

On a sample I219 system it saves about 16% CPU on IPv4 and 19% on IPv6.

iperf3 -Vc reported numbers:
total% user% system%

IPv4 TSO
21.3 7 14.4
21.4 6 15.4
21.5 6 15.5

IPv4 no TSO
36.8 5.4 31.4
38.5 5.1 33.5
38.2 5.7 32.6

IPv4 no TSO no TXCSUM
45.1 5.8 39.3
46 6.3 39.7
46.2 5.9 40.4

IPv6 TSO6
21.7 5.4 16.3
21.6 5.1 16.5
21.9 5.6 16.3

IPv6 no TSO6
41.2 5.2 36
41 5.1 36
40.8 5.2 35.7

IPv6 no TSO6 no TXCSUM6
49 5.9 43.1
48.8 4.9 43.9
49 5.6 43.4

Tested by: cc (lem(4)), karels (82574L)
Relnotes: yes
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D41170

13da8423:
e1000: Enable TSO on 82574

Further testing indicates something wrong with particular reciever,
enabling TSO 82574 for wider testing.

Tested by: karels

797e480c:
e1000: disable TSO on lem(4) and em(4)

Disable TSO on lem(4) and em(4) until a ring stall can be debugged.

I am not able to reproduce the issue on lem(4) but disabling there in
abundance of caution in case the issue is not specific to em(4).

Reported by: grog

(cherry picked from commit f1b5488f7bba7f25a57750f87cbcbccbd5b9d16b)
(cherry picked from commit 13da84237a37961938e9e237171ac111ddc1897c)
(cherry picked from commit 797e480cba8834e584062092c098e60956d28180)

10 months agoe1000: Fix off by one ipcse
Kevin Bowling [Tue, 15 Aug 2023 21:37:43 +0000 (14:37 -0700)]
e1000: Fix off by one ipcse

This has been off by one in the FreeBSD drivers as far back as I've
looked.  Emperically HW and SW emulations I have available don't seem to
mind.  Noticed while debugging other issues.

(cherry picked from commit eac761e967b34066aa7183474249df87d79a2f32)

10 months agomsi: report error for attempt to use APIC ID > 255
Ed Maste [Tue, 8 Aug 2023 23:42:09 +0000 (19:42 -0400)]
msi: report error for attempt to use APIC ID > 255

The MSI/MSI-X address includes 8 bits to encode the Destination ID.
Previously IDs over 255 overlapped with the fixed portion of the
address, resulting in an invalid value (and a nonfunctional interrupt).

Instead, print an error message and return EINVAL.  The interrupt will
still not work, but the user will have a clue as to why.

PR: 273022
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41395

(cherry picked from commit cbf845052f1c2862a64e66dbaf38e887a7592474)

10 months agolinuxkpi: advance platform_device
Corvin Köhne [Tue, 31 Jan 2023 08:18:38 +0000 (09:18 +0100)]
linuxkpi: advance platform_device

These are required by some linux driver like:
https://github.com/beckhoff/bbapi

Reviewed by: manu
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D39554

(cherry picked from commit 740d76544ad8a59f1be53584a0aa5bbbe00833ee)

10 months agobhyve: Remove vestigial support for setting max vCPUs.
John Baldwin [Mon, 12 Jun 2023 10:47:35 +0000 (12:47 +0200)]
bhyve: Remove vestigial support for setting max vCPUs.

The kernel part of the hypervisor is not going to support per-VM maxcpu
limits. The topology is only used to control the values returned by
CPUID leaves for which max vCPUs is not relevant.

Reviewed by: corvink, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D37176

(cherry picked from commit bb1770105022e7d65bef0f32988c08ee9676b68e)

10 months agobhyve: fix vCPU single-stepping on VMX
Bojan Novković [Tue, 9 May 2023 07:02:04 +0000 (09:02 +0200)]
bhyve: fix vCPU single-stepping on VMX

This patch fixes virtual machine single stepping on VMX hosts.

Currently, when using bhyve's gdb stub, each attempt at single-stepping
a vCPU lands in a timer interrupt. The current single-stepping mechanism
uses the Monitor Trap Flag feature to cause VMEXIT after a single
instruction is executed. Unfortunately, the SDM states that MTF causes
VMEXITs for the next instruction that gets executed, which is often not
what the person using the debugger expects. [1]

This patch adds a new VM capability that masks interrupts on a vCPU by
blocking interrupt injection and modifies the gdb stub to use the newly
added capability while single-stepping a vCPU.

[1] Intel SDM 26.5.2 Vol. 3C

Reviewed by: corvink, jbh
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39949

(cherry picked from commit fefac543590db4e1461235b7c936f46026d0f318)

10 months agobhyve: don't panic if e820 finds no available memory
Corvin Köhne [Tue, 9 May 2023 12:32:33 +0000 (14:32 +0200)]
bhyve: don't panic if e820 finds no available memory

The GVT-d emulation tries to allocate some specific memory. It could
happen that this address doesn't exist. In that case, GVT-d will fall
back to allocate any address. Nevertheless, this only works if the e820
fails with an error instead of exiting on an assertion.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D40034

(cherry picked from commit 99aeb28b2f7e28c516dd6434db63a9bc1c1f3218)

10 months agoixgbe: Check for fw_recovery
Kevin Bowling [Thu, 10 Aug 2023 00:31:49 +0000 (17:31 -0700)]
ixgbe: Check for fw_recovery

The x550 uses an upgradable flash code.  Check for recovery condition
like other flashable intel cards do in case of fw errors.

Differential Revision: https://reviews.freebsd.org/D31869

(cherry picked from commit 8b4a3fbdd57215cffde530e2fa3098c272a985fe)

10 months agoigc: sync srrctl buffer sizing with e1000
Kevin Bowling [Thu, 10 Aug 2023 14:41:21 +0000 (07:41 -0700)]
igc: sync srrctl buffer sizing with e1000

Approved by: grehan
Differential Revision: https://reviews.freebsd.org/D31493

(cherry picked from commit 0eb8cd1de26849cbaefaf3bc59aa9612fa0dfa52)

10 months agoixgbe: Add support for 82599 LS
Kevin Bowling [Thu, 10 Aug 2023 01:30:15 +0000 (18:30 -0700)]
ixgbe: Add support for 82599 LS

Obtained from: DPDK 549ccd3dc01539e060597b503f2b65b272de3347

(cherry picked from commit 9228ac3a69c4c7401a743e6465e118101a2beeb0)

10 months agoping: use the in6_addr buffer when parsing src address as AF_INET6
R. Christian McDonald [Tue, 8 Aug 2023 18:40:02 +0000 (14:40 -0400)]
ping: use the in6_addr buffer when parsing src address as AF_INET6

Reviewed by: kp
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 9f2cddd261d09b736893454cb8b7aa0651ac5211)

10 months agoroute(8): teach route to attach to jails
Yan Ka, Chiu [Tue, 13 Jun 2023 06:05:17 +0000 (06:05 +0000)]
route(8): teach route to attach to jails

Add -j <jail> flag to route(8) to allow route to perform actions in
a Jail.

Differential Revision: https://reviews.freebsd.org/D40377
MFC after: 2 weeks

(cherry picked from commit ab4d1b73cbf8980dbe05cde7d822010042db8344)

10 months agoifconfig(8): Teach ifconfig to attach and run itself in a jail
Yan Ka Chiu [Tue, 23 May 2023 20:39:22 +0000 (16:39 -0400)]
ifconfig(8): Teach ifconfig to attach and run itself in a jail

Add -j <jail> flag to ifconfig to allow ifconfig to attach and run inside a
jail. This allow parent to configure network interfaces of its children
even if ifconfig is not available in child's tree (e.g. Linux Jails)

Reviewed by: emaste, khng, melifaro
Event: Kitchener-Waterloo Hackathon 202305
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D40213

(cherry picked from commit 7e49aa86a2824e76e9d9becf61db12066bc0d79d)

10 months agotmpfs: add the "pgread" mount option to the allowed options list for mount
Konstantin Belousov [Fri, 11 Aug 2023 18:00:44 +0000 (21:00 +0300)]
tmpfs: add the "pgread" mount option to the allowed options list for mount

(cherry picked from commit 765ad5b28d3fa272208aedc3047a6a3dff561037)

10 months agotmpfs: add a knob to enable pgcache read for mount
Konstantin Belousov [Sun, 6 Aug 2023 01:35:36 +0000 (04:35 +0300)]
tmpfs: add a knob to enable pgcache read for mount

(cherry picked from commit 0f613ab85e5a5274704d179f39fb15163d46e7c4)

10 months agovnode io: request range-locking when pgcache reads are enabled
Konstantin Belousov [Sun, 6 Aug 2023 01:23:35 +0000 (04:23 +0300)]
vnode io: request range-locking when pgcache reads are enabled

PR: 272678

(cherry picked from commit 821dec4d56a876db56a82cf1dc54a84905b74f5b)

10 months agoRevert "vnode read(2)/write(2): acquire rangelock regardless of do_vn_io_fault()"
Konstantin Belousov [Sun, 6 Aug 2023 01:23:42 +0000 (04:23 +0300)]
Revert "vnode read(2)/write(2): acquire rangelock regardless of do_vn_io_fault()"

(cherry picked from commit 651fdc3d198d066b18823db3b74cf38a0144dfac)