]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
28 hours agoifconfig(8): wordsmith -G and -g descriptions main
Pau Amma [Thu, 6 Jun 2024 21:12:53 +0000 (15:12 -0600)]
ifconfig(8): wordsmith -G and -g descriptions

Remove spurious ".Ar groupname".
Add missing full stops.
While there, tweak word order for better grammar.

MFC after: 3 days

Reviewed by: Alexander Ziaee, Mina Galić, allanjude, imp
Differential Revision: https://reviews.freebsd.org/D45092

28 hours agoSimplify signal handling code in libthr by removing use of SYS_sigreturn
Dapeng Gao [Mon, 3 Jun 2024 18:18:13 +0000 (12:18 -0600)]
Simplify signal handling code in libthr by removing use of SYS_sigreturn

The use of SYS_sigreturn is unnecessary here.

If handle_signal is called when a signal is delivered, it can just
return normally back to sigcode which will call sigreturn anyway.

In case handle_signal is called by check_deferred_signal, using
setcontext is better than SYS_sigreturn because that is the correct
system call to pair with the earlier getcontext.

Reviewed by: imp, kib
Differential Revision: https://reviews.freebsd.org/D44893

28 hours agoconfig: Remove redundant code
Warner Losh [Mon, 3 Jun 2024 18:37:02 +0000 (12:37 -0600)]
config: Remove redundant code

since errx is marked dead2, we don't need this.

Noticed by: jrtc27
Sponsored by: Netflix

28 hours agocryptocheck: Don't treat OpenSSL errors as fatal
John Baldwin [Thu, 6 Jun 2024 21:47:04 +0000 (14:47 -0700)]
cryptocheck: Don't treat OpenSSL errors as fatal

Abort the current test but keep running additional tests if OpenSSL
reports an error during a test.  This matches the behavior for other
tests such as an error from OCF.

Reviewed by: markj
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D45279

29 hours agogit-arc: Use a helper function to fetch boolean config variables
John Baldwin [Thu, 6 Jun 2024 21:45:30 +0000 (14:45 -0700)]
git-arc: Use a helper function to fetch boolean config variables

Requested by: markj
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D45104

30 hours agoLinuxKPI: Convert Linux integer types to ISO C99 in linux/kstrtox.h
Vladimir Kondratyev [Thu, 6 Jun 2024 20:42:07 +0000 (23:42 +0300)]
LinuxKPI: Convert Linux integer types to ISO C99 in linux/kstrtox.h

Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week
Reviewed by: bz, emaste
Differential Revision: https://reviews.freebsd.org/D45465

30 hours agoLinuxKPI: Add kstrtoll to linux/kstrtox.h
Vladimir Kondratyev [Thu, 6 Jun 2024 20:42:07 +0000 (23:42 +0300)]
LinuxKPI: Add kstrtoll to linux/kstrtox.h

kstrtoll converts a string to a long long.

Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week
Reviewed by: bz, emaste
Differential Revision: https://reviews.freebsd.org/D45455

30 hours agoLinuxKPI: Move kstrto* functions to linux/kstrtox.h
Vladimir Kondratyev [Thu, 6 Jun 2024 20:42:07 +0000 (23:42 +0300)]
LinuxKPI: Move kstrto* functions to linux/kstrtox.h

from linux/kernel.h to match Linux and
allow direct linux/kstrtox.h inclusion.

Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week
Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D45454

30 hours agoLinuxKPI: Add abs_diff to linux/math.h
Vladimir Kondratyev [Thu, 6 Jun 2024 20:42:07 +0000 (23:42 +0300)]
LinuxKPI: Add abs_diff to linux/math.h

It returns absolute value of the difference between the arguments.

Add LinuxKPI version check as the macro was moved from drm-kmod to
linux/math.h in Linux kernel commit 46f12960aad (6.6 timeframe).

Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week
Reviewed by: bz, emaste
Differential Revision: https://reviews.freebsd.org/D45453

30 hours agoLinuxKPI: Move linux/math.h content out of linux/kernel.h
Vladimir Kondratyev [Thu, 6 Jun 2024 20:42:07 +0000 (23:42 +0300)]
LinuxKPI: Move linux/math.h content out of linux/kernel.h

To match Linux and allow direct linux/math.h inclusion.

Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week
Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D45452

30 hours agoLinuxKPI: Add min_not_zero() to linux/minmax.h
Vladimir Kondratyev [Thu, 6 Jun 2024 20:42:06 +0000 (23:42 +0300)]
LinuxKPI: Add min_not_zero() to linux/minmax.h

It returns the minimum that is not zero, except both equals to zero.

Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week
Reviewed by: bz, emaste, ssaxena
Differential Revision: https://reviews.freebsd.org/D45450
Differential Revision: https://reviews.freebsd.org/D45451

30 hours agoLinuxKPI: Move linux/minmax.h content out of linux/kernel.h
Vladimir Kondratyev [Thu, 6 Jun 2024 20:42:06 +0000 (23:42 +0300)]
LinuxKPI: Move linux/minmax.h content out of linux/kernel.h

To match Linux and allow direct linux/minmax.h inclusion.

Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week
Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D45449

30 hours agoLinuxKPI: Move page_address definition from linux/gfp.h to linux/mm.h
Vladimir Kondratyev [Thu, 6 Jun 2024 20:42:06 +0000 (23:42 +0300)]
LinuxKPI: Move page_address definition from linux/gfp.h to linux/mm.h

To match Linux. Some future changes may depend on proper location.

Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week
Reviewed by: bz, emaste
Differential Revision: https://reviews.freebsd.org/D45448

30 hours agolinuxkpi: Allow ida_destroy and idr_destroy to be called multiple times
Austin Shafer [Thu, 6 Jun 2024 20:42:06 +0000 (23:42 +0300)]
linuxkpi: Allow ida_destroy and idr_destroy to be called multiple times

This fixes some weird behavior triggered by nvidia-drm.ko: some DRM
cleanup functions will be called multiple times, leading to a double
free. drm_mode_config_cleanup will be called twice, causing ida_destroy
to be called twice. Although calling the cleanup twice doesn't seem
very clean, on Linux this seems to be permissable as it handles it
just fine. Not doing these checks causes mutex panics and double frees.

In order to preserve this behavior this change checks if the objects
have already been destroyed and bails if so. This fixes the panic seen
when unloading the nvidia-drm driver.

MFC after: 1 week
Reviewed by: bz, manu
Differential revision: https://reviews.freebsd.org/D44865

30 hours agoLinuxKPI: lockdep_assert: wrong 'cond' used in WARN_ON MACRO
Alvin Chen [Thu, 6 Jun 2024 20:42:06 +0000 (23:42 +0300)]
LinuxKPI: lockdep_assert: wrong 'cond' used in WARN_ON MACRO

'cond' in WARN_ON need be bracketed,
otherwise it is wrong for multiple conditions.

Reviewed by: wulf
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D44604

32 hours agopf: add sctp multihome probe points
Kristof Provost [Thu, 6 Jun 2024 15:35:09 +0000 (17:35 +0200)]
pf: add sctp multihome probe points

Add probe points to allow us to probe when we add or remove multihome addresses.

Example use:
pf:sctp:multihome:add
{
printf("Add tag %x address %x", arg0,
    ((struct pf_sctp_source *)arg1)->addr.v4.s_addr);
}

pf:sctp:multihome:remove
{
printf("Remove tag %x address %x", arg0,
    ((struct pf_sctp_source *)arg2)->addr.v4.s_addr);
}

MFC after: 1 week
Sponsored by: Orange Business Services

32 hours agopf tests: test setting and retrieving timeout values
Kristof Provost [Thu, 6 Jun 2024 15:50:42 +0000 (17:50 +0200)]
pf tests: test setting and retrieving timeout values

32 hours agopf: convert DIOCGETTIMEOUT/DIOCSETTIMEOUT to netlink
Kristof Provost [Wed, 5 Jun 2024 03:58:56 +0000 (05:58 +0200)]
pf: convert DIOCGETTIMEOUT/DIOCSETTIMEOUT to netlink

32 hours agorangeset: add next() iteration
Doug Moore [Thu, 6 Jun 2024 18:42:31 +0000 (13:42 -0500)]
rangeset: add next() iteration

Add a method rangeset_next to find the first range that starts at or
after a given value. Use it to rewrite pmap_pkru_same and
pmap_bti_same to avoid walking a page at a time over pages in no
range.

Reviewed by: andrew, kib
Differential Revision: https://reviews.freebsd.org/D45511

33 hours agovm_page_insert: use pctrie combined insert/lookup
Ryan Libby [Thu, 6 Jun 2024 17:26:50 +0000 (10:26 -0700)]
vm_page_insert: use pctrie combined insert/lookup

This reduces work done under vm_page_insert for large objects.

Reviewed by: alc, dougm, markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D45486

33 hours agovm_radix: define vm_radix_insert_lookup_lt and use in vm_page_rename
Ryan Libby [Thu, 6 Jun 2024 17:26:50 +0000 (10:26 -0700)]
vm_radix: define vm_radix_insert_lookup_lt and use in vm_page_rename

Use the new pctrie combined lookup/insert.  This is an easy application
of the new facility.  There are other places where we do this for pages
that may need more plumbing to use combined lookup/insert.

Reviewed by: kib (previous version), dougm, markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D45396

33 hours agolam: fail on I/O errors
Cosimo Cecchi [Thu, 6 Jun 2024 17:24:07 +0000 (17:24 +0000)]
lam: fail on I/O errors

I/O errors should be reported; however lam currently does not
disambiguate between EOF because end-of-file was reached and EOF because
an I/O error occurred.
This commit changes lam to exit with EX_IOERR when an I/O error occurs.

Reviewed by: imp, allanjude
Sponsored by: Apple Inc.
Differential Revision: https://reviews.freebsd.org/D45437

33 hours agoctladm.8: fix several errors in the "port" section
Alan Somers [Wed, 5 Jun 2024 20:13:04 +0000 (14:13 -0600)]
ctladm.8: fix several errors in the "port" section

* Document the "-d" option.
* Add the "-c" and "-r" options to the summary.
* Correct the list of required options.
* Clarify that the "-t" option is only for use with "-o", "-w", and "-W"
* Replace references to the nonexistent "-n" with "-p".

Also, fix a few related error strings in the ctladm command.

MFC after: 2 weeks
Sponsored by: Axcient
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D45503

33 hours agocomm: close a race condition when comm is fed from stdin
Cosimo Cecchi [Thu, 6 Jun 2024 16:51:43 +0000 (16:51 +0000)]
comm: close a race condition when comm is fed from stdin

If one of the files has ended, we won't show the column, but we still
need to drain the file pointer to avoid potentially hitting a pipe
failure.

This commit moves the NULL offset checks inside show() so that getline()
and ferror() are still called on fp.

Reviewed by: allanjude
Sponsored by: Apple Inc.
Differential Revision: https://reviews.freebsd.org/D45440

33 hours agocomm: flush stdout for error checking prior to exiting
Cosimo Cecchi [Thu, 6 Jun 2024 16:51:22 +0000 (16:51 +0000)]
comm: flush stdout for error checking prior to exiting

UNIX conformance wants utilities to catch any errors when doing I/O, as
opposed to relying on the implicit flush upon exit.
comm currently does not do that.
This commit adds handling of I/O errors on stdout prior to exit.

Reviewed by: imp, allanjude
Sponsored by: Apple Inc.
Differential Revision: https://reviews.freebsd.org/D45439

35 hours agou3g: Add support for SIM7600G
Maxime Thiebaut [Thu, 6 Jun 2024 10:43:46 +0000 (10:43 +0000)]
u3g: Add support for SIM7600G

Signed-off-by: Maxime Thiebaut <maxime+freebsd@thiebaut.dev>
Reviewed by: kp

36 hours agolibusbhid: add missing include guards
Andreas Kempe [Sun, 10 Jul 2022 20:51:48 +0000 (22:51 +0200)]
libusbhid: add missing include guards

PR: 265136

37 hours agopfctl: fix possible out-of-bounds read
Kristof Provost [Wed, 5 Jun 2024 21:55:37 +0000 (17:55 -0400)]
pfctl: fix possible out-of-bounds read

Tags in $10 (filter_opts) are not guaranteed to be the maximum possible
tag length, so memcpy() can end up reading outside of the allocated
buffer.

Use strlcpy() instead.

Reported by: CheriBSD
Event: Kitchener-Waterloo Hackathon 202406

37 hours agopf: simplify pf_addrcpy() and pf_match_addr()
Kristof Provost [Wed, 5 Jun 2024 20:30:34 +0000 (16:30 -0400)]
pf: simplify pf_addrcpy() and pf_match_addr()

Use the v4/v6 union members rather than the uint32_t ones.
Export IN_ARE_MASKED_ADDR_EQUAL() in in_var.h and use it (and its IPv6
equivalent) for masked comparisons rather than hand-rolled code.

Event: Kitchener-Waterloo Hackathon 202406

37 hours agonetlink: pass the correct arguments for SIOCDIFADDR and SIOCDIFADDR_IN6
Kristof Provost [Wed, 5 Jun 2024 17:44:46 +0000 (19:44 +0200)]
netlink: pass the correct arguments for SIOCDIFADDR and SIOCDIFADDR_IN6

These take struct ifreq and struct in6_ifreq respectively. Passing struct
in_aliasreq or struct in6_aliasreq means we're supplying a shorter object than
expected. While this doesn't actively break things on most architectures other
than CHERI it is still wrong.

Reported by: CheriBSD
Event: Kitchener-Waterloo Hackathon 202406

37 hours agopf: remove incorrect SUNION2PF() macro
Kristof Provost [Wed, 5 Jun 2024 15:28:55 +0000 (17:28 +0200)]
pf: remove incorrect SUNION2PF() macro

It casts in_addr to pf_addr, which is smaller, so this isn't quite right.
Replace it with a function that will only read the actual address.

Reported by: CheriBSD
Event: Kitchener-Waterloo Hackathon 202406

40 hours agompi3mr: Track IO per target counter during queue poll with local variable
Chandrakanth patil [Thu, 6 Jun 2024 10:28:38 +0000 (10:28 +0000)]
mpi3mr: Track IO per target counter during queue poll with local variable

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D44494

40 hours agompi3mr: Divert large WriteSame IOs to firmware if unmap and ndob bits are set
Chandrakanth patil [Thu, 6 Jun 2024 08:38:52 +0000 (14:08 +0530)]
mpi3mr: Divert large WriteSame IOs to firmware if unmap and ndob bits are set

Firmware advertises the transfer lenght for writesame commands to driver during init.
So for any writesame IOs with ndob and unmap bit set and transfer lengh is greater
than the max write same length specified by the firmware, then direct those commands
to firmware instead of hardware otherwise hardware will break.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D44452

40 hours agompi3mr: driver version update to 8.10.0.1.0
Chandrakanth patil [Tue, 19 Mar 2024 07:29:01 +0000 (12:59 +0530)]
mpi3mr: driver version update to 8.10.0.1.0

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D44430

40 hours agompi3mr: copyright year update to 2024
Chandrakanth patil [Tue, 19 Mar 2024 07:25:04 +0000 (12:55 +0530)]
mpi3mr: copyright year update to 2024

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D44429

40 hours agompi3mr: mpi headers update to latest
Chandrakanth patil [Tue, 19 Mar 2024 07:23:07 +0000 (12:53 +0530)]
mpi3mr: mpi headers update to latest

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D44428

40 hours agompi3mr: Adding FreeBSD OS Type to Fault/Reset Reason Code
Chandrakanth patil [Tue, 19 Mar 2024 06:56:44 +0000 (12:26 +0530)]
mpi3mr: Adding FreeBSD OS Type to Fault/Reset Reason Code

The driver is modified to add FreeBSD OS type in the upper nibble of the
fault/reset reason code for appropriate qualification of the reason code.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D44427

40 hours agompi3mr: diag fault success beyond F000 fault code
Chandrakanth patil [Tue, 19 Mar 2024 06:47:57 +0000 (12:17 +0530)]
mpi3mr: diag fault success beyond F000 fault code

Accept any fault as successful for diagnostic fault reset, not just the 0xF000
code. print fault information and return.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D44426

40 hours agompi3mr: Update consumer index of admin and operational reply queues after every 100...
Chandrakanth patil [Thu, 14 Mar 2024 18:41:07 +0000 (00:11 +0530)]
mpi3mr: Update consumer index of admin and operational reply queues after every 100 replies

Instead of updating the ConsumerIndex of the Admin and Operational ReplyQueues
after processing all replies in the queue, it will now be periodically updated
after processing every 100 replies.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D44425

40 hours agompi3mr: Decrement per controller and per target counter post reset
Chandrakanth patil [Thu, 14 Mar 2024 18:12:49 +0000 (23:42 +0530)]
mpi3mr: Decrement per controller and per target counter post reset

Post controller reset, If any device removal events arrive, and if
there are any outstanding IOs then the driver will unnecessarily wait
in the loop for 30 seconds before removing the device from the OS.

reset target outstanding IO counter and controller outstanding IO counter
and remove the redundant wait loop.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D44424

40 hours agompi3mr: poll reply queue and add MPI3MR_DEV_REMOVE_HS_COMPLETED flag
Chandrakanth patil [Thu, 14 Mar 2024 17:47:06 +0000 (23:17 +0530)]
mpi3mr: poll reply queue and add MPI3MR_DEV_REMOVE_HS_COMPLETED flag

An outstanding IO counter per target check has been added before deleting
the target from the OS which will poll the reply queue if there are any
outstanding IOs are found.

A new flag, named "MPI3MR_DEV_REMOVE_HS_COMPLETED," is added. If a remove event
for a target occurs and before the deletion of the target resource if the add event
for another target arrives reusing the same target ID then this flag will prevent
the removal of the target reference. This flag ensures synchronization between the interrupt
top and bottom half during target removal and addition events.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D44423

40 hours agompi3mr: Controller state check before enabling PEL
Chandrakanth patil [Thu, 14 Mar 2024 17:14:53 +0000 (22:44 +0530)]
mpi3mr: Controller state check before enabling PEL

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D44422

40 hours agompi3mr: Block devices persist despite being offlined during reset
Chandrakanth patil [Wed, 13 Mar 2024 18:03:19 +0000 (23:33 +0530)]
mpi3mr: Block devices persist despite being offlined during reset

The driver removes the drive from the OS if firmware sends 'device added'
event with hidden bit or inaccessible status.

Reviewed by:            imp
Approved by:            imp
Differential revision:  https://reviews.freebsd.org/D44421

40 hours agonewfs_msdos: align to multiple of cluster size by default
Stefan Eßer [Thu, 6 Jun 2024 10:28:02 +0000 (12:28 +0200)]
newfs_msdos: align to multiple of cluster size by default

A previous commit aligned the start of the data area to a multiple of
the VM page size, in order to prevent extra buffers to be allocated
(which failed for 64 KB cluster size without this alignment).

Since a dependency on PAGE_SIZE caused compatibility issues, the
alignment was made conditional on this macro being defined, in the
previous commit. This lead to different behavior of this program
when built on FreeBSD vs. Linux (which does not define PAGE_SIZE).

This commit removes any use of PAGE_SIZE and instead always aligns
the start of the data area to a multiple of the cluster size.

The -A option is now implied, unless overridden by a specific number
of reserved sectors with the -r option.

Approved by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45436

41 hours agolinux: Allows writing to the vdso from the kernel
Andrew Turner [Wed, 5 Jun 2024 18:47:48 +0000 (18:47 +0000)]
linux: Allows writing to the vdso from the kernel

We need to write to the vdso in the kernel to perform fixups. Move it
from .rodata to .data so these can be run.

Reported by: cy
Sponsored by: Arm Ltd

44 hours agotcp: simplify stack switching protocol
Michael Tuexen [Thu, 6 Jun 2024 06:29:05 +0000 (08:29 +0200)]
tcp: simplify stack switching protocol

Before this patch, a stack (tfb) accepts a tcpcb (tp), if the
tp->t_state is TCPS_CLOSED or tfb->tfb_tcp_handoff_ok is not NULL
and tfb->tfb_tcp_handoff_ok(tp) returns 0.
After this patch, the only check is tfb->tfb_tcp_handoff_ok(tp)
returns 0. tfb->tfb_tcp_handoff_ok must always be provided.
For existing TCP stacks (FreeBSD, RACK and BBR) there is no
functional change. However, the logic is simpler.

Reviewed by: lstewart, peter_lei_ieee_.org, rrs
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D45253

45 hours agopmap: move the smp_targeted_tlb_shutdown pointer stuff to amd64 pmap.h
Konstantin Belousov [Thu, 6 Jun 2024 05:03:14 +0000 (08:03 +0300)]
pmap: move the smp_targeted_tlb_shutdown pointer stuff to amd64 pmap.h

Fixes: bec000c9c1ef409989685bb03ff0532907befb4aESC
Sponsored by: The FreeBSD Foundation

46 hours agoif_enc(4): Prefer the boolean form when calling bpf_peers_present()
Zhenlei Huang [Thu, 6 Jun 2024 04:20:26 +0000 (12:20 +0800)]
if_enc(4): Prefer the boolean form when calling bpf_peers_present()

No functional change intended.

MFC after: 1 week

47 hours agogetblk: reduce time under bufobj lock
Ryan Libby [Thu, 6 Jun 2024 03:21:22 +0000 (20:21 -0700)]
getblk: reduce time under bufobj lock

Use the new pctrie combined insert/lookup facility to reduce work and
time under the bufobj interlock when associating a buf with a vnode.

We now do one lookup in the dirty tree and one combined lookup/insert in
the clean tree instead of one lookup in dirty, two in clean, and then an
insert in clean.  We also avoid touching the possibly unrelated buf at
the tail of the queue.

Also correct an issue where the actual order of the tail queue depended
on the insertion order due to sign issues.

Reviewed by: kib (previous version), dougm, markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D45395

2 days agopctrie: add combined insert/lookup operations
Ryan Libby [Thu, 6 Jun 2024 02:17:20 +0000 (19:17 -0700)]
pctrie: add combined insert/lookup operations

In several places in code, we do a pctrie lookup followed by a pctrie
insert.  Provide a few flavors of combined lookup/insert.  This may save
a portion of the work from walking a large pctrie twice.

The general idea is that while we walk the trie during insert, we also
do the same kind of tracking work that we do during pctrie_lookup_ge or
pctrie_lookup_le, and we pass out a pctrie node from where such a lookup
may continue.

Reviewed by: dougm (previous version), kib (previous version), markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D45394

2 days agodrm2: Remove one more implementation of ilog2()
Mark Johnston [Wed, 5 Jun 2024 22:18:19 +0000 (18:18 -0400)]
drm2: Remove one more implementation of ilog2()

Reviewed by: dougm
Fixes: b0056b31e900 ("libkern: add ilog2 macro")
Differential Revision: https://reviews.freebsd.org/D45504

2 days agoiwn(4): correct debug message: "not" to "no"
Bjoern A. Zeeb [Wed, 5 Jun 2024 22:01:06 +0000 (22:01 +0000)]
iwn(4): correct debug message: "not" to "no"

Sponosred by: The FreeBSD Foundation
MFC after: 3 days

2 days agonvmf: Handle shutdowns more gracefully
John Baldwin [Wed, 5 Jun 2024 19:59:28 +0000 (12:59 -0700)]
nvmf: Handle shutdowns more gracefully

If an association is disconnected during a clean shutdown, abort all
pending and future I/O requests with an error to avoid hangs either due
to filesystem unmounts or a stuck GEOM event.

If an association is connected during a clean shutdown, gracefully
disconnect from the remote controller and close the open queues.

Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D45462

2 days agonvmf: Permit failing I/O requests while disconnected
John Baldwin [Wed, 5 Jun 2024 19:54:15 +0000 (12:54 -0700)]
nvmf: Permit failing I/O requests while disconnected

Add a kern.nvmf.fail_on_disconnection sysctl similar to the
kern.iscsi.fail_on_disconnection sysctl.  This causes pending I/O
requests to fail with an error if an association is disconnected
instead of requeueing to be retried once the association is
reconnected.  As with iSCSI, the default is to queue and retry
operations.

Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D45308

2 days agonvmf: Rescan namespaces after reconnecting
John Baldwin [Wed, 5 Jun 2024 19:53:08 +0000 (12:53 -0700)]
nvmf: Rescan namespaces after reconnecting

While a host was disconnected from a remote controller, namespaces
might have been added, removed, or altered properties.  Rescan the
namespaces after reconnecting to detect any such changes.

Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D45461

2 days agonvmf: Rescan all namespaces if the changed NS log page is too large
John Baldwin [Wed, 5 Jun 2024 19:52:43 +0000 (12:52 -0700)]
nvmf: Rescan all namespaces if the changed NS log page is too large

Previously this just punted with a warning message.

Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D45460

2 days agonvmf: Factor out most of nvmf_rescan_ns into a helper routine
John Baldwin [Wed, 5 Jun 2024 19:52:24 +0000 (12:52 -0700)]
nvmf: Factor out most of nvmf_rescan_ns into a helper routine

This function accepts a namespace ID and associated namespace data
from IDENTIFY and takes care of updating nvmeXnY and ndaZ.

Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D45459

2 days agonvmf: Refactor nvmf_add_namespaces to be more generic
John Baldwin [Wed, 5 Jun 2024 19:51:56 +0000 (12:51 -0700)]
nvmf: Refactor nvmf_add_namespaces to be more generic

Rename to nvmf_scan_active_namespaces and accept an additional
callback function and callback argument.  The callback is invoked on
each active namespace enumerated by the active namespace list from the
IDENTIFY command.

Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D45458

2 days agonvmf: Pass const pointers to namespace data to nvmf_*_ns
John Baldwin [Wed, 5 Jun 2024 19:51:37 +0000 (12:51 -0700)]
nvmf: Pass const pointers to namespace data to nvmf_*_ns

Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D45457

2 days agovm: Eliminate a redundant call to vm_reserv_break_all()
Alan Cox [Wed, 5 Jun 2024 06:40:20 +0000 (01:40 -0500)]
vm: Eliminate a redundant call to vm_reserv_break_all()

When vm_object_collapse() was changed in commit 98087a0 to call
vm_object_terminate(), rather than destroying the object directly, its
call to vm_reserv_break_all() should have been removed, as
vm_object_terminate() calls vm_reserv_break_all().

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

2 days agopci: Only add special VF handling for direct children in bus methods
John Baldwin [Wed, 5 Jun 2024 16:50:05 +0000 (09:50 -0700)]
pci: Only add special VF handling for direct children in bus methods

For activate/deactivate resource, use a more standard check at the
start of the function since the addition of the PCI_IOV code made this
more complex.  For the three recently added methods, just add the
typical check at the beginning that I missed.

This wasn't always fatal as if your system only had PCI device_t's as
children of PCI bus devices it would happen to work ok, but if you
have a non-PCI child device (e.g. an ATA channel) then dereferencing
ivars for non-direct-children could fault.

Reported by: Cirrus-CI (via emaste)
Reviewed by: emaste
Fixes: 871b33ad65ba pci: Consistently use pci_vf_* for suballocated VF memory resources
Differential Revision: https://reviews.freebsd.org/D45499

2 days agortld-elf: Use a proper struct type for tlsdesc entries
Jessica Clarke [Wed, 5 Jun 2024 16:41:54 +0000 (17:41 +0100)]
rtld-elf: Use a proper struct type for tlsdesc entries

This clarifies the code and makes it less error-prone. It also makes it
easier to extend downstream in CheriBSD (where pointer and integer
members no longer have the same representation and an additional member
is present).

Reviewed by: jhb, kib
Differential Revision: https://reviews.freebsd.org/D45143

2 days agopci(4): unbreak the build
Enji Cooper [Wed, 5 Jun 2024 04:16:48 +0000 (21:16 -0700)]
pci(4): unbreak the build

`argsp` is not defined in `generic_pcie_unmap_resource(..)`. Remove the
parameter passed to `bus_generic_unmap_resource(..)` as this parameter
is never passed to `generic_pcie_unmap_resource(..)`.

Fixes: 98056127ddfa ("acpi/pci/vmd: Fix a nit with nested resource mapping requests")
Reported by: Jenkins (aarch64, armv6, armv7, etc)
Differential Revision: https://reviews.freebsd.org/D45493

2 days agoriscv: add stage 2 translation to pmap.
Ruslan Bukin [Wed, 5 Jun 2024 13:08:35 +0000 (14:08 +0100)]
riscv: add stage 2 translation to pmap.

Add basic stage 2 translation support (guest-physical to host-physical).

RISC-V hypervisor spec[1] introduces new translation schemes: Sv32x4,
Sv39x4, Sv48x4 and Sv57x4.
In each case, the size of the incoming address is widened by 2 bits (e.g.
Sv39 becomes 41-bit system).
To accommodate the 2 extra bits, the root page table (only) is expanded
by a factor of four to be 16 KiB instead of the usual 4 KiB. The rest of
page table system (including PTE format) is similar.
This gives us 4x of memory space in each scheme, but it does not make sense
to support all that memory for now.
Allocate required amount of pages for the top directory in case of stage 2,
but leave it unused.

1. https://github.com/riscv/riscv-isa-manual/blob/main/src/hypervisor.adoc

Reviewed by: mhorne
Sponsored by: UKRI
Differential Revision: https://reviews.freebsd.org/D45481

2 days agoamd64: add a func pointer to tlb shootdown function
Souradeep Chakrabarti [Wed, 5 Jun 2024 12:25:05 +0000 (12:25 +0000)]
amd64: add a func pointer to tlb shootdown function

Make the tlb shootdown function as a pointer. By default, it still
points to the system function smp_targeted_tlb_shootdown(). It allows
other implemenations to overwrite in the future.

Reviewed by: kib
Tested by: whu
Authored-by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Co-Authored-by: Erni Sri Satya Vennela <ernis@microsoft.com>
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D45174

2 days agohidbus(4): Fix wrong assertion of bus
Zhenlei Huang [Wed, 5 Jun 2024 12:03:27 +0000 (20:03 +0800)]
hidbus(4): Fix wrong assertion of bus

Reviewed by: wulf
Fixes: 4151ac9f1292 hidbus(4): Use generic hid methods to ...
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45496

2 days agolinux64: Fix the build on arm64 with bti checking
Andrew Turner [Tue, 4 Jun 2024 12:47:52 +0000 (13:47 +0100)]
linux64: Fix the build on arm64 with bti checking

When we enable checking for BTI on arm64 we need to include an ELF
note in all object files linked into a module.

As using objcopy from a binary to an ELF object file doesn't add the
note switch to using .incbin from an assembly file. This allows us to
add the needed note without affecting the included object.

Reviewed by: imp, kib, emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45468

2 days agoarm64: Support BTI checking in most of the kernel
Andrew Turner [Tue, 4 Jun 2024 12:46:46 +0000 (13:46 +0100)]
arm64: Support BTI checking in most of the kernel

LLD has the -zbti-report=error argument to check if the BTI note is
present when linking. To allow for this to be used when linking the
kernel and modules:
 - Add the BTI note to the remaining assembly files
 - Mark ptrauth.c as protected by BTI
 - Disable -zbti-report for vmm hypervisor switching code as it's not
   used there.

The linux64 module doesn't build with the flag as it includes vdso code
that doesn't include the note.

Reviewed by: imp, kib, emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45466

2 days agostats: Fix the build under gcc
Andrew Turner [Tue, 4 Jun 2024 12:46:33 +0000 (13:46 +0100)]
stats: Fix the build under gcc

Reviewed by: brooks, imp
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45302

2 days agoarm64: Disable outling atomics
Andrew Turner [Tue, 4 Jun 2024 12:45:00 +0000 (13:45 +0100)]
arm64: Disable outling atomics

We don't have the symbols for this. The virtio randon number driver
uses a C11 atomic operation. With inline atomics this is translated to
an Armv8.0 atomic operation, with outling atomics this becomes a
function call to a handler. As we don't have the needed function the
kernel fails to link.

Fix by disabling outline atomics for now.

Reviewed by: brooks, imp
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45301

2 days agonuageinit: fix authorized_key test
Baptiste Daroussin [Wed, 5 Jun 2024 08:58:17 +0000 (10:58 +0200)]
nuageinit: fix authorized_key test

After miss reading the cloudinit spec I ended up writting a wrong
test for basic ssh key setup, nuageinit has been fixed, but not
the test, here is the actual fix.

Reported by: markj

2 days agonuageinit: make addsshkey friendly for testsuite
Baptiste Daroussin [Wed, 5 Jun 2024 08:44:17 +0000 (10:44 +0200)]
nuageinit: make addsshkey friendly for testsuite

2 days agonuageinit: use pw(8) instead of getent(1)
Baptiste Daroussin [Wed, 5 Jun 2024 08:34:25 +0000 (10:34 +0200)]
nuageinit: use pw(8) instead of getent(1)

pw(8) allows to seek for users in a custom rootdir, which makes it
easier for a testsuite

MFC After: 3 days

2 days agoarm64 pmap: Enable L3C promotions by pmap_enter_quick()
Alan Cox [Sat, 1 Jun 2024 18:17:52 +0000 (13:17 -0500)]
arm64 pmap: Enable L3C promotions by pmap_enter_quick()

More precisely, implement L3C (64KB/2MB, depending on base page size)
promotion in pmap_enter_quick()'s helper function,
pmap_enter_quick_locked().  At the same time, use the recently
introduced flag VM_PROT_NO_PROMOTE from pmap_enter_object() to
pmap_enter_quick_locked() to avoid L3C promotion attempts that will
fail.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D45445

3 days agoradlib: fix a memory leak in `is_valid_request`
Enji Cooper [Tue, 4 Jun 2024 20:01:55 +0000 (13:01 -0700)]
radlib: fix a memory leak in `is_valid_request`

Call `HMAC_CTX_free` if returning early from `is_valid_request` when
processing `Message-Authenticator` tags.

Reported by: Coverity
MFC after: 1 week
Fixes: 8d5c7813061d ("libradius: Fix input validation bugs")
Differential Revision: https://reviews.freebsd.org/D45488

3 days agonfsd: Update a file missed by commit e2c9fad2e0ae
Rick Macklem [Wed, 5 Jun 2024 01:54:15 +0000 (18:54 -0700)]
nfsd: Update a file missed by commit e2c9fad2e0ae

MFC after: 1 month

3 days agonfsd: Fix delegation handled for atomic upgrade
Rick Macklem [Wed, 5 Jun 2024 01:46:41 +0000 (18:46 -0700)]
nfsd: Fix delegation handled for atomic upgrade

For NFSv4.1/4.2, an atomic upgrade of a delegation from a
read delegation to a write delegation is allowed and can
result in signoficantly improved performance.

This patch adds support for this atomic upgrade, plus fixes
a couple of other delegation related bugs.  Since there were
three cases where delegations were being issued, the patch
factors this out into a separate function called
nfsrv_issuedelegations().

This patch should only affect the NFSv4.1/4.2 behaviour
when delegations are enabled, which is not the default.

MFC after: 1 month

3 days agopci: Consistently use pci_vf_* for suballocated VF memory resources
John Baldwin [Tue, 4 Jun 2024 23:51:37 +0000 (16:51 -0700)]
pci: Consistently use pci_vf_* for suballocated VF memory resources

Some of the bus resource methods were passing these up to the parent
which triggered rman mismatch assertions in INVARIANTS kernels.

Reported by: kp
Reviewed by: imp
Tested by: kp (earlier version)
Differential Revision: https://reviews.freebsd.org/D45406

3 days agoacpi/pci/vmd: Fix a nit with nested resource mapping requests
John Baldwin [Tue, 4 Jun 2024 23:50:56 +0000 (16:50 -0700)]
acpi/pci/vmd: Fix a nit with nested resource mapping requests

Some bus drivers use rmans to suballocate resources to child devices.
When the driver for a child device requests a mapping for a
suballocated resource, the bus driver translates this into a mapping
request for a suitable subrange of the original resource the bus
driver allocated from its parent.  This nested mapping request should
look like any other resource mapping request being made by the bus
device (i.e. as if the bus device had called bus_map_resource() or
bus_alloc_resource() with RF_ACTIVE).

I had slightly flubbed this last bit though since the direct use of
bus_generic_map/unmap_resource passed up the original child device
(second argument to the underlying kobj interface).  While this is
currently harmless, it is not strictly correct as the resource being
mapped is owned by the bus device, not the child and can break for
other bus drivers in the future.

Instead, use bus_map/unmap_resource for the nested request where the
requesting device is now the bus device that owns the parent resource.

Reviewed by: imp
Fixes: 0e1246e33461 acpi: Cleanup handling of suballocated resources
Fixes: b377ff8110e3 pcib: Refine handling of resources allocated from bridge windows
Fixes: d79b6b8ec267 pci_host_generic: Don't rewrite resource start address for translation
Fixes: d714e73f7895 vmd: Use bus_generic_rman_* for PCI bus and memory resources
Differential Revision: https://reviews.freebsd.org/D45433

3 days agoriscv: fix vm.pmap.kernel_maps with Sv48
Mitchell Horne [Tue, 4 Jun 2024 23:18:54 +0000 (20:18 -0300)]
riscv: fix vm.pmap.kernel_maps with Sv48

With 4-level paging enabled, the layout of KVA is identical, but we need
to step through an extra level to find the L1 table.

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

3 days agoriscv: Move sigcode out of locore.S
Mitchell Horne [Tue, 4 Jun 2024 23:18:05 +0000 (20:18 -0300)]
riscv: Move sigcode out of locore.S

It really doesn't fit here anymore as locore is all about early startup
code. Thus, move it to its own file.

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

3 days agodevmap: eliminate unused arguments
Mitchell Horne [Tue, 4 Jun 2024 23:17:47 +0000 (20:17 -0300)]
devmap: eliminate unused arguments

The optional 'table' pointer is a legacy part of the interface, which
has been replaced by devmap_register_table()/devmap_add_entry(). The few
in-tree callers have already adapted to this, so it can be removed.

The 'l1pt' argument is already entirely unused within the function.

Reviewed by: andrew, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45319

3 days agophysmem: zero entire array
Mitchell Horne [Tue, 4 Jun 2024 23:17:13 +0000 (20:17 -0300)]
physmem: zero entire array

As a convenience to callers, who might allocate the array on the stack.
An empty/zero-valued range indicates the end of the physmap entries.

Remove the now-redundant calls to bzero() at the call site.

Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45318

3 days agovnet tests: check for if_bridge.ko
Kristof Provost [Tue, 4 Jun 2024 18:02:18 +0000 (20:02 +0200)]
vnet tests: check for if_bridge.ko

A number of tests create a bridge, but did not check if if_bridge.ko is loaded.

We usually get away with that, because `ifconfig bridge create` autoloads the
module, but if we run the tests in a jail (e.g. because of kyua's upcoming
execenv.jail.params feature) we can't load the module and these tests can fail.

Check if the module is loaded, skip the test if it is not.

Reviewed by: markj
MFC after: 1 week
Event: Kitchener-Waterloo Hackathon 202406
Differential Revision: https://reviews.freebsd.org/D45487

3 days agobhyve: Add a stub VM_EXITCODE_REG_EMUL handler
Mark Johnston [Tue, 4 Jun 2024 19:06:42 +0000 (15:06 -0400)]
bhyve: Add a stub VM_EXITCODE_REG_EMUL handler

This lets us print a few fields of interest before aborting the VM loop.

No functional change intended.

Reviewed by: corvink, andrew
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D44741

3 days agobhyve: Add arm64 support to the gdb stub
Mark Johnston [Tue, 4 Jun 2024 19:03:17 +0000 (15:03 -0400)]
bhyve: Add arm64 support to the gdb stub

- Add -G to the arm64 getopt handler.
- Add static register definitions and extensible XML definitions.
- Provide definitions for MD bits such as breakpoint encoding and
  length.
- Ensure that bhyve re-injects breakpoint exceptions that it is not
  responsible for.

Reviewed by: andrew
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D44740

3 days agoarm64/vmm: Add breakpoint and single-stepping support
Mark Johnston [Tue, 4 Jun 2024 18:58:08 +0000 (14:58 -0400)]
arm64/vmm: Add breakpoint and single-stepping support

This will be used to implement parts of bhyve's gdb stub.

Three VM capabilities are added, similar to amd64 without monitor mode.
Two cause breakpoint and single-step exceptions to be raised to EL2 and
then down to bhyve.  One lets the gdb stub mask hardware interrupts
while single-stepping, since otherwise the guest will handle a timer
interrupt before executing the target instruction and thus fail
to make progress.

Reviewed by: bnovkov, andrew
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D44739

3 days agobuild.7: update cross-compile example
Mitchell Horne [Tue, 4 Jun 2024 18:22:54 +0000 (15:22 -0300)]
build.7: update cross-compile example

Replace armv6 with the more-relevant arm64.

MFC after: 3 days

3 days agobuild.7: +freebsd to description, link development
Alexander Ziaee [Sun, 2 Jun 2024 13:25:19 +0000 (09:25 -0400)]
build.7: +freebsd to description, link development

Reviewed by: mhorne
MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/1273

3 days agobuild.7: nit section order, tag spdx
Alexander Ziaee [Sun, 2 Jun 2024 13:23:40 +0000 (09:23 -0400)]
build.7: nit section order, tag spdx

Reviewed by: mhorne
MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/1273

3 days agovm_phys: use ilog2(x) instead of fls(x)-1
Doug Moore [Tue, 4 Jun 2024 18:07:07 +0000 (13:07 -0500)]
vm_phys: use ilog2(x) instead of fls(x)-1

One of these changes saves two instructions on an amd64
GENERIC-NODEBUG build. The rest are entirely cosmetic, because the
compiler can deduce that x is nonzero, and avoid the needless test.

Reviewed by: alc
Differential Revision: https://reviews.freebsd.org/D45331

3 days agox86: simplify ceil(log2(x)) function
Doug Moore [Tue, 4 Jun 2024 18:00:25 +0000 (13:00 -0500)]
x86: simplify ceil(log2(x)) function

A function called mask_width in one place and log2 in the other
calculates its value in a more complex way than necessary. A simpler
implementation offered here saves a few bytes in the functions that
call it.

Reviewed by: alc, avg
Differential Revision: https://reviews.freebsd.org/D45483

3 days agogit-arc.1: list width typo
Alexander Ziaee [Sat, 1 Jun 2024 06:19:33 +0000 (02:19 -0400)]
git-arc.1: list width typo

Reviewed by: mhorne
MFC after: 3 days
Fixes:   760be44702 ("git-arc: document "create" command options")
Pull Request: https://github.com/freebsd/freebsd-src/pull/1272

3 days agopf: fix overly large memcpy()
Kristof Provost [Tue, 4 Jun 2024 15:29:13 +0000 (17:29 +0200)]
pf: fix overly large memcpy()

We only want to copy the labels array, we don't want to copy the counter as well.

Reported by: CheriBSD
Event: Kitchener-Waterloo Hackathon 202406

3 days agopf: fix overly large copy in pf_rule_to_krule()
Kristof Provost [Tue, 4 Jun 2024 12:55:02 +0000 (14:55 +0200)]
pf: fix overly large copy in pf_rule_to_krule()

The timeout array in struct pf_rule has PFTM_OLD_MAX entries, the one in
struct pf_krule has PFTM_MAX entries (and PFTM_MAX > PFTM_OLD_MAX).
Use the smaller of the sizes when copying.

Reported by: CheriBSD
MFC after: 1 week
Event: Kitchener-Waterloo Hackathon 202406

3 days agoObsoleteFiles.inc: Add missed riscv64 file for LLVM 17
Jessica Clarke [Tue, 4 Jun 2024 17:07:56 +0000 (18:07 +0100)]
ObsoleteFiles.inc: Add missed riscv64 file for LLVM 17

LLVM 17 was the first version we shipped asan_static for.

3 days agotypo: Fix side -> size since it matters to the meaning...
Warner Losh [Sun, 2 Jun 2024 14:38:11 +0000 (08:38 -0600)]
typo: Fix side -> size since it matters to the meaning...

batch side doesn't make sense, but batch size does. Fix.

Sponsored by: Netflix

3 days agonetpfil tests: make the pls tests more robust
Kristof Provost [Mon, 3 Jun 2024 19:27:59 +0000 (21:27 +0200)]
netpfil tests: make the pls tests more robust

Give them more time to hit the expected loss numbers.
We see occasional failures during CI runs. This makes that less likely.

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

3 days agopf tests: make ether:dummynet test a little more robust
Kristof Provost [Sat, 1 Jun 2024 20:37:36 +0000 (22:37 +0200)]
pf tests: make ether:dummynet test a little more robust

Allow slightly more bandwidth, but cause ping to give up sooner.

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

3 days agopf tests: basic debug level test
Kristof Provost [Sat, 1 Jun 2024 18:07:56 +0000 (20:07 +0200)]
pf tests: basic debug level test

Set & retrieve the debug level.

Sponsored by: Rubicon Communications, LLC ("Netgate")