The dtrwait wait functionality was dropped in the TTY MPSAFE rewrite for
FreeBSD 8. Remove referneces to it here. Also, the sysctl was renamed
for drainwait, so use the new name. Given the 16 years between this
event and somebody noticing, I strongly suspect this file can just be
removed.
Sponsored by: Netflix
Reviewed by: kevans, emaste
Differential Revision: https://reviews.freebsd.org/D52316
Cyclades and digiboard drivers were removed in 2017 and 2016
respectively. There's no need for these anymore.
Sponsored by: Netflix
Reviewed by: kevans, emaste
Differential Revision: https://reviews.freebsd.org/D52315
Make sure we free all of the trees we allocated when we free the ruleset.
Found by 'kldunload pf' after a test run, now that the allocation is done from a
pf-specific malloc type.
Sponsored by: Rubicon Communications, LLC ("Netgate")
with TTL field to zero. To fix it function pf_test_state_icmp()
must initialize ttl field in pf_pdesc structure for inner packet.
feedback from bluhm@
OK bluhm@
Obtained from: OpenBSD, sashan <sashan@openbsd.org>, 0d48c46cfe
Sponsored by: Rubicon Communications, LLC ("Netgate")
We never actually use action or reason in pf_state_key_addr_setup(), so just
pass NULL to pf_pull_hdr().
No functional change.
Sponsored by: Rubicon Communications, LLC ("Netgate")
Currently used M_TEMP and M_IFADDR types are unreasonable for that purpose.
This dedicated statistics simplify the future pf(4) unlocking work by decreasing
search area of possible memory leaks.
ok bluhm sashan
FreeBSD note: The unlocking work has already been done in FreeBSD, but it's
still useful to have all pf malloc() allocations be accounted to pf, not the
generic 'temp' bucket.
Obtained from: OpenBSD, mvs <mvs@openbsd.org>, 062cda8b8d
Sponsored by: Rubicon Communications, LLC ("Netgate")
This fixes a few KNF issues and ugly line wrapping by using a local
version of nitems(); fix two bsearch() on top.
ok claudio
FreeBSD note: we already used nitems(), but now pick up the use of size_t over
unsigned int.
Obtained from: OpenBSD, tb <tb@openbsd.org>, 3d49904c6e
Sponsored by: Rubicon Communications, LLC ("Netgate")
internal representation of icmp type/code in pfctl(8)/pf(4) does not
fit into u_int8_t. Issue has been noticed and kindly reported by
amalinin _at_ bh0.amt.ru via bugs@.
OK bluhm@
Obtained from: OpenBSD, sashan <sashan@openbsd.org>, 1fdb608f55
Sponsored by: Rubicon Communications, LLC ("Netgate")
When fixing bug 286692, the change eafe5967ac, that fixed a case when
peer side does close(), also had regressed a case when our side does
shutdown(SHUT_WR). These actually are two independent code paths, and the
eafe5967ac shouldn't have touched the second block. The removal of
'kn->kn_flags |= EV_EOF' was incorrect and the statement on original
behavior in the commit message was also incorrect.
Do not add back so_error setting, since I failed to find a test case that
would return anything but 0 in kevent.fflags when run on stable/14.
This was found with help of https://github.com/tokio-rs/mio. Add a test
case into our test suite for that.
Fixes: eafe5967ac
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D52327
Chase commit 8e8d3068dc ("amd64 GENERIC: enable bloating kernel with
ext errors strings") from amd64. In general we would like to keep
GENERIC kernel options in sync between the Tier-1 architectures.
PR: 289236
Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52342
These fields all need to be explicitly initialized with zeroes. Prior
to the conversion to C++ these fields were zeroed by calloc().
This worked for me in earlier testing as my test boxes had
MALLOC_PRODUCTION enabled in make.conf.
PR: 289115
Reported by: Slawa Olhovchenkov <slw zxy.spb.ru>
Fixes: eb0dc901a5 ("ctld: Convert struct auth_group to a C++ class")
Fixes: 6acc7afa34 ("ctld: Convert struct port to a hierarchy of C++ classes")
Fixes: 2bb9180bb5 ("ctld: Convert struct target to a C++ class")
Fixes: ed076901ec ("ctld: Convert struct ctld_connection to a C++ class")
Sponsored by: Chelsio Communications
A VM had no virtual terminals and emitted a warning on boot
`eval: cannot open /dev/ttyv*: No such file or directory`.
Break the loop in this case to avoid the warning.
PR: 289173
Reviewed by: jlduran
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52344
The merge markers were added, it seems, in one of my rebases. The HEAD
entry is the merged code, as far as I can tell, and is what should be in
the base. None of these files are used during the build.
Noticed by: jhb
Sponsored by: Netflix
When building without NO_ROOT, ${TAG_ARGS} is not set, which means we
pass ",config" as an install(1) argument. Only add the config tag if
${TAG_ARGS} is defined to begin with.
Fixes: aa730a66bc ("sh: Add config tag to /.profile")
Reported by: bz
Simplify the logic and only count beacons when we are assoc, given
we only do this for debugging purposes of beacon/connection loss.
Fixes: bdfe17f129
MFC after: 3 days
At least iwlwifi(4) seems to expect us to be assoc when seeing
BSS_CHANGED_BEACON_INFO as it will stop session protection and
update the beacon filter amongst other things. Check for the vif
to be assoc before applying any dtim_period updates. See comment
for more details on the entire flow.
MFC after: 3 days
Set IEEE80211_FEXT_AMPDU_OFFLOAD if the driver/firmware does AMPDU[-TX]
offload and net80211 should stay out of the way.
Later use IEEE80211_CONF_AMPDU_OFFLOAD() (the IEEE80211_FEXT_AMPDU_OFFLOAD
net80211 flag) rather than the LinuxKPI check to clear AMPDU-RX if we do
not support crypto offload. This may seem odd at first as AMPDU-RX is
mandatory but we would not be able to get anything working if we would
let net80211 do a (*ic_ampdu_rx_start)() call.
Some of this is neccessary until we have the code for all drivers (rtw8x
use further interfaces) sorted.
Sponsored by: The FreeBSD Foundation (originally)
MFC after: 3 days
Fixes: ac2c7271b7
Parse out and display xhci controller extended capabilities. This gives
us a mechanism to pick these up when the controller attaches. The print
helps users and developer know the availability of features in the wild.
This change will let developers know from dmesg that a controller
supports USB debugging.
Reviewed by: aokblast
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51255
The file /.profile is installed as a hard link to /root/.profile. The
file in /root has the config tag, but the file in / does not, which
causes it to be overwritten by pkg upgrade. Since they're linked, this
also overwrites the file in /root.
Add the config tag to the file in / as well, so pkg treates both links
as config files and won't overwrite them.
PR: 289097
MFC after: 3 days
Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D52162
The -c command-line option, which allowed setting a global compression
method, is removed in favor of the <compress> directive in newsyslog.conf.
The motivation of this change is to eliminate a source of potential confusion.
Since newsyslog(8) is typically invoked by cron(8), having a command line
option that can override it could cause inconsistent behavior (specifying
in crontab would take precedence).
Suggested by: karels
Differential Revision: https://reviews.freebsd.org/D43466
Use '% IEEE80211_SEQ_RANGE' to limit the sequence numbers being
stored and retrieved to 0..4095 inclusive.
Differential Revision: https://reviews.freebsd.org/D52302
Reviewed by: bz
Put SYN-cookie related counters in its own container and use consistent
indentation for them.
Reviewed by: glebius
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D52227
Only compute wscale when it is actually used. While there, change the
type of wscale to u_int as suggested by glebius.
No functional change intended.
Reviewed by: glebius, rscheff (older version)
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D52296
Add capabilities RXCSUM and RXCSUM6 as well as TXCSUM and TXCSUM6 for
for receive and transmit checksum offloading for TCP and UDP to the
epair interface and enable them by default.
RXCSUM and RXCSUM6 are enabled because an epair interface may receive
a packet with the csum_flag CSUM_DATA_VALID set, which is expected
only if these capabilities are enabled. Since it seems not helpful to
remove this flag, it is not possible to disable these capabilities.
TXCSUM and TXCSUM6 are synchronized between the two epair interface
ends. If enabled/disabled on one end, it will be enabled/disabled on
the other end. If the sending epair interface end has TXCSUM or TXCSUM6
enabled and the receiving end is in a bridge, it is assumed that all
interfaces in the bridge have that capability enabled. Otherwise the
bridge would have disabled that capability on the receiving epair
interface end in the bridge which would have disabled that capability
on the sending epair interface end as well due to the synchronization.
Reviewed by: bcr, Seyed Pouria Mousavizadeh Tehrani
MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D51639
Also move num initialization for clarity.
We still need to check num in ng_unparse_composite (reported by des@ in
D52151) but this is another incremental improvement in netgraph input
validation.
Reviewed by: des
PR: 267334
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52151
* ISO 8601 defines two formats: basic and extended, clarify that we
output the extended format only.
* Clarify that ISO 8601 is only aware of timezone /offsets/, not timezones,
it has no relation to the Olson timezone database (TZ environment variable).
Reviewed by: otis (mentor), des
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D52314
Make it bool. Reword the comment, add note that mbuf is always consumed.
In case tunnel consumed the mbuf, don't INP_RUNLOCK(), behave just like
all the other normal exits from the function.
Reviewed by: tuexen, kp, markj
Differential Revision: https://reviews.freebsd.org/D52171
and fix assigning IP addresses to the gif(4) interface when it is a
member of a if_bridge(4) interface.
When setting the sysctl net.link.bridge.member_ifaddrs to 1, if_bridge(4)
can eliminate unnecessary walk of the member list to determine whether
the inbound unicast packets are for us or not.
Well when a gif(4) interface is member of a if_bridge(4) interface, it
acts as the tunnel endpoint to tunnel Ethernet frames over IP network,
aka the EtherIP protocol, so the IP addresses configured on it are
independent of the if_bridge(4) interface or other if_bridge(4) members,
hence the sysctl net.link.bridge.member_ifaddrs should not have any
influnce over gif(4) interfaces's behavior of assigning IP addresses.
PR: 227450
Reported by: Siva Mahadevan <me@svmhdvn.name>
Reviewed by: ivy, #bridge
MFC after: 1 week
Fixes: 0a1294f6c6 bridge: allow IP addresses on members to be disabled
Differential Revision: https://reviews.freebsd.org/D52200
if_bridge(4) should not prohibit adding a gif(4) interface which is
assigned with IP addresses as a bridge member regardless of the setting
of sysctl variable net.link.bridge.member_ifaddrs.
Assigning IP addresses on the gif(4) interface should not be affected
no matter whether it is member of a bridge interface or not.
PR: 227450
Reported by: Siva Mahadevan <me@svmhdvn.name>
Reviewed by: ivy (previous version)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D52200
- one duplcate entry: 0x664*|0x664*) -> 0x664*|0x665*)
- one unneeded glob: 0x98e4*) -> 0x98e4)
- 0x15e7|0x1636|0x1638|0x164c) half of these are green-sardine; split
- a missing entry for skillfish2 : + 0x143f
MFC after: 3 days
Reviewed by: imp, manu
Differential Revision: https://reviews.freebsd.org/D52312
Fix a redirect of stderr to stdout which is going to /dev/null.
A '&' got missing in the original rewrite from the review that
I took and committed. Seems no one had noticed during testing
or review. People may have ended up with a "/1" file in their
root file system.
Fixes: 40652f86b5
Reported by: Vladyslav Movchan (vladislav.movchan gmail.com)
MFX after: 3 days
X-MFC: squash
This catches a bug in tzcode which incorrectly considers TZDEFAULT as
unsafe as if it came from the environment.
Also deduplicate some repeated code, and fix a missing mode in an
open(2) call with O_CREAT set.
Event: Oslo Hackathon 202508
Reviewed by: philip
Differential Revision: https://reviews.freebsd.org/D52241
tzset() calls zoneinit() with the FROMENV flag set unconditionally, so
if TZ is unset and we use TZDEFAULT instead, we were still treating it
as if it came from the environment. Unset the FROMENV flag if name is
null and we switch to TZDEFAULT, or if, after skipping the optional
leading colon, we find that name is identical to TZDEFAULT.
This incorporates upstream change d0e0b00f846c ("Avoid unnecessary
access, stat calls").
Fixes: b6ea2513f7 ("tzcode: Limit TZ for setugid programs")
Event: Oslo Hackathon 202508
Reviewed by: philip
Differential Revision: https://reviews.freebsd.org/D52240
This patch adds a /boot/loader.conf setting that makes it possibly to
override the detected number of slots in storage enclosures. Some (yes
I'm looking at you HPE D6020!) reports less available slots that there
actually are (the D6020 seems to report 18 but actually has 35 per
drawer). This causes the mpr driver to have problems detecting/managing
all drives in a multienclosure setting. For the D6020 this occurs when
connecting two or more fully equipped (140 drives) enclosures to one
controller...
This problem can be "fixed" by adding the following to /boot/loader.conf
and rebooting:
hw.mpr.encl_min_slots="35"
Note: I (Warner) don't have this hardware to see if there's some way to
fix the detection, so I'm committing this as a stop-gap. It's a no-op if
no tunable is set.
PR: 271238
Reivewed by: imp
This patch reduces num_entries by 1 to reserve a admin slot. It
resolves the issue where admin requests cannot be executed
during QD32 because all queue entries are used.
It also resolve the issue of accessing the queue before it is
created by moving the queue construct point to before interrupt
enable.
Sponsored by: Samsung Electronic
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D51894
This patch enables WriteBooster to improve write performance. It
reserves SLC space from normal (TLC) storage to handle incoming
writes, reducing latency and handling bursty writes.
The buffer can be dedicated to a single LU or shared across
multiple LUs, depending on configuration. Data staged in SLC is
later flushed back to TLC automatically or on demand, without
changing data placement.
The following table shows WriteBooster performance as tested on a
Galaxy Book S + UFS 4.0(HS-GEAR 4) device.
```
----------------------------------------------------------------
| Workload | BS | QD | WriteBooster | Bandwidth |
----------------------------------------------------------------
| Sequential Write | 1MB | 32 | On | 1568 MiB/s |
| Sequential Write | 1MB | 32 | Off | 556 MiB/s |
----------------------------------------------------------------
```
Also, this function adds a power mode change quirk to the Intel
Lakefield UFS controller.
Sponsored by: Samsung Electronics
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D51893
This reverts commit f97b6a8f84, as it
turns out our fuzz implementation is just too naive. We can have more
leading context than trailing context and vice-versa, so we can't really
assume they're the same.
Restore the previous bug and we can work on it post-branch.
Reported by: cy
This ensures other threads, e.g. ioctl threads, see the correct counter
routine once after the interface has been attached.
This change partially reverts commit 23ac9029f9, which for unclear
reason moved setting the get counter routine after ether_ifattach().
Reviewed by: kbowling, kgalazka, #iflib
Fixes: 23ac9029f9 Update iflib to support more NIC designs
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D50712