if_geneve: Fix uninitialized variable use in geneve_udp_input()
Set the ifp variable as soon as soft_c becomes available
so that interface statistics can be incremented.
PR: 295129
Reported by: Robert Morris <rtm at lcs.mit.edu>
Fixes: e44d2e941e8e ("if_geneve: Add Support for Geneve ...")
sys/cdefs.h: move __BEGIN_DECLS/__END_DECLS into a helper sys/_decls.h
There are situations where nothing from sys/cdefs.h is needed except for
the declaration braces. More, the other facilities from sys/cdefs.h
might unnecessarly pollute the namespace.
Reviewed by: markj, imp
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D56889
vop_read_pgcache_post(): report inotify IN_ACCESS same as for vop_read_post()
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D56611
vnode: add VIRF_KNOTE flag
to indicate non-empty vnode knote list. Use it instead of
VN_KNLIST_EMPTY() and guard note activations with it.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D56611
sys/vnode.h: remove stale comment
The source sweep is not going to happen.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D56611
[libm] implementation of rsqrt, rsqrtf, and rsqrtl
From the PR:
The attached diff implements the inverse square root function, i.e,
rsqrt(x) = 1 / sqrt(x). Exhaustive testing of the float version
suggests that it is correctly rounded in round-to-nearest for all
test values in the range [0x1p-127,0x1p126].
Exhaustive testing of rsqrt and rsqrtl cannot be done, but 1100M
values of x for rsqrt and 400M values for rsqrtl were tested. All
tested values were correctly rounded.
I do not have access to LD128 (i.e., IEEE 128-bit floating point)
hardware, so the implementation of rsqrtl() is untested.
The following is a summary of changes to source code.
* lib/msun/Makefile:
. Add s_rsqrt.c and s_rsqrtf.c to COMMON_SRCS.
. For non-53-bit long double targets, add s_rsqrtl.c to COMMON_SRCS.
[31 lines not shown]
Add O_SYMLINK emulation
for MacOSX partial compatibility, defined as O_PATH | O_NOFOLLOW.
fstat(2) and freadlink(3) works on the resulting file descriptors,
but reads on the regular file do not.
More complete but more hackish version was developed but deemed too
hackish.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D56365
tests/carp: Rework unicast_v4
For unicast tests, it is sufficient to use wait_for_carp() to verify
the setup is sane. Additional sanity checks are not necessarily
required but can serve purpose for redundancy.
For some unclear reason routed(8) is advertising route to carp BACKUP.
That makes the test flaky. Also routed(8) is marked deprecated and may
be removed from base in the future. Let's just add static route entry
manually for additional sanity checks.
Other noticeable changes:
1. Add atf_check to configuration steps to prevent potential failure
on setup. That helps diagnosing on failure.
2. Shorten the names of jails to improve readability.
3. Prefer `[ifconfig|route|sysctl] -j` over `jexec [ifconfig|route|sysctl]`
to make the lines shorter.
MFC note: At the time writing, routed(8) does not know carp addresses
[11 lines not shown]
tests/carp: make a 0.2 second pause before configuring second jail
for all scenarios where both jails have same priority/advskew. There is a
tiny chance that on both sides carp_master_down() will be executed in
parallel and advertisements will also fly through the bridge(4) in
parallel, thus both sides will switch to MASTER before receiving the
announcement from peer. This makes the test to fail. So far this
flakyness was observed for carp:vrrp_v4 only, but in theory it is possible
for any of the patched scenarios.
Note that this sleep does not prolong execution of the tests, as the first
jail is already configured, and if we slept before configuring the second,
we would sleep less in wait_for_carp().
(cherry picked from commit 27ff90cd3d8d2ac8198f30cbebeefb15a49d41bc)
(cherry picked from commit ad2fff6d6a4d74b6bb9008e447eafc567e8660e0)
blacklistd: Fix RFC1918 typo
This is a direct commit to the stable/14 branch, partially cherry picked
from commit 5a6d9479ae2271a97dd23ceee8ad284770302874, as the stable/14
branch only has blacklistd.
The address in the configuration file example was intended to be from
the 192.168.0.0/16 range of IPv4 private addresses (RFC1918).
Reported on mastodon.social at
https://mastodon.social/@asmodai/116316630762241486.
Fix submitted upstream by emaste@. Fixing locally first.
Reported by: asmodai
Reviewed by: emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56773
libc: correct posix_spawn_file_actions_init ENOMEM error
The return value of posix_spawn_file_actions_init() is an error number.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D56911
tests/carp: make a 0.2 second pause before configuring second jail
for all scenarios where both jails have same priority/advskew. There is a
tiny chance that on both sides carp_master_down() will be executed in
parallel and advertisements will also fly through the bridge(4) in
parallel, thus both sides will switch to MASTER before receiving the
announcement from peer. This makes the test to fail. So far this
flakyness was observed for carp:vrrp_v4 only, but in theory it is possible
for any of the patched scenarios.
Note that this sleep does not prolong execution of the tests, as the first
jail is already configured, and if we slept before configuring the second,
we would sleep less in wait_for_carp().
(cherry picked from commit 27ff90cd3d8d2ac8198f30cbebeefb15a49d41bc)
tests/carp: Rework unicast_v4
For unicast tests, it is sufficient to use wait_for_carp() to verify
the setup is sane. Additional sanity checks are not necessarily
required but can serve purpose for redundancy.
For some unclear reason routed(8) is advertising route to carp BACKUP.
That makes the test flaky. Also routed(8) is marked deprecated and may
be removed from base in the future. Let's just add static route entry
manually for additional sanity checks.
Other noticeable changes:
1. Add atf_check to configuration steps to prevent potential failure
on setup. That helps diagnosing on failure.
2. Shorten the names of jails to improve readability.
3. Prefer `[ifconfig|route|sysctl] -j` over `jexec [ifconfig|route|sysctl]`
to make the lines shorter.
MFC note: At the time writing, routed(8) does not know carp addresses
[10 lines not shown]
tests/carp: make sleep interval in the wait loop smaller
Makes tests to finish slightly faster.
(cherry picked from commit e353cbffd600ae3c00c8584dddcabf9d0ae1202a)
tests/carp: kill routed(8) before destroying interfaces
Otherwise routed logs a warning:
"MCAST_LEAVE_GROUP ALLROUTERS: Can't assign requested address"
that may be misinterpreted as a problem.
(cherry picked from commit 8596810d02a1e361e0312d116339aa106aca4b19)