Currently we count all of the newly added and already existing
missing tx completions in each iteration of
check_missing_comp_in_tx_queue() causing duplicate counts
to missing_tx_comp stat.
This commit adds a new counter new_missed_tx within the relevant
function which only counts the newly added missing tx completions
in each iteration of check_missing_comp_in_tx_queue().
This will allow us to update missing_tx_comp stat accurately without
counting duplicates.
Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.
(cherry picked from commit 1f67704e2c)
Upstream commit [1] made if_alloc_domain() never fail, then also do the
wrappers if_alloc(), if_alloc_dev(), and if_gethandle().
Upstream commit [2] removed the NULL check conducted by the driver.
This commit also removes err_customer_metrics_alloc goto label.
Commit [2] leaves behind a floating free() statement that
deallocates customer_metrics_array. This commit places the
deallocation statement where it belongs.
[1] commit 4787572d05 ("ifnet: make if_alloc_domain() never fail")
[2] commit aa3860851b ("net: Remove unneeded NULL check for the allocated ifnet")
Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.
(cherry picked from commit 5517ca8486)
The bhyve VNC server would ignore the SetPixelFormat message from the
VNC client. This change supports a limited implementation to detect
and reorder the colors such as requested from the noVNC client.
PR: 280984
Reviewed by: corvink
Differential Revision: https://reviews.freebsd.org/D46402
MFC after: 3 weeks
(cherry picked from commit dda0f9837b)
Bring ing the LinuxKPI 802.11 compat bits which are not altering
the mac80211 ops KPI.
* Add various functions for driver updates.
* Add functions (some compat code to I assume cleanup some
mac80211 ops) emulating chanctx changes doing (*config) updates.
* Adjust structs and defines.
* Deal with an enum growing more than 32 bits in printf.
* Add a mtx to struct wiphy which is exposed to the drivers.
Handle initialization and destruction for now.
* Implementation of wiphy_work and wiphy_delayed_work.
* Set was_assoc for deassoc/deauth in prep_tx_info.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit ac1d519c01)
Update rcu_dereference_{check,protected}() to call the check and log
once if it fails and if the RCU debug sysctl is turned on.
Also add proper checks for conditions passed in to these functions.
For that implement linux_rcu_read_lock_held() (lots of help from wulf).
(While here also remove extraneous extern for function prototypes).
Update lockdep_is_held() to always be an inline function with argument
annotation so that we do no longer have unused variables
in callers which only call lockdep_is_held().
Sponsored by: The FreeBSD Foundation
Reviewed by: wulf
Differential Revision: https://reviews.freebsd.org/D46842
(cherry picked from commit 5c92f84bb6)
Add devices supported by this driver to a HARDWARE section
for generation in the Hardware Compatibility Notes.
While here:
- describe more consistently with product doc and rest of manual
- consolidate basics in first paragraph of description
- mention boot time configuration
- cross-ref networking(7) quick start guide
- zap deprecated Tn, macro in list width, and "Dq Li" => "Ql"
- markup some unmarked elements
- add SPDX tag
Differential Revision: https://reviews.freebsd.org/D47170
(cherry picked from commit fa573868f1)
Add devices supported by this driver to a HARDWARE section
for inclusion in the release Hardware Compatibility Notes.
While here:
- add SPDX tag
- add networking(7) cross-ref quick start guide
- tweak examples for consistency
Differential Revision: https://reviews.freebsd.org/D47168
(cherry picked from commit 545dbf9d5f)
Add a "zzz_fw_ports_fwget.sh" script to each LinuxKPI based wireless
driver which in essential are all the same and in detail all different.
They extract information for fwget(8), wifi-firmware-* ports, man pages
and for iwlwififw also for the wiki.
Sponsored by: The FreeBSD Foundation
Suggested by: imp (to have automation in D44918)
(cherry picked from commit 96190b4fef)
Update the sysctl export (also adding a mapping function) to also
print (1) for all lines the "flavor" (device_family) name and (2)
also print lines where we only have the trans cfg and not iwl cfg
as with the flavor we can match PCI IDs to firmware package and so
we can have an increased number of matches.
A side effect is that we can also have fwget(8) PCI ID matches for
firmware (flavors) not yet (publicly) existing. That will allow
us to add them at a later point while a previous release already
supports the chipsets and knows how to get the firmware for them.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit b4c8f251d6)
PCI_IRQ_LEGACY was added in 366d68f283 (likely) for rtw88 only.
The define now got renamed and I cannot find any other use but
rtw88 and rtw89.
We keep the old name as comapt while driver updates are in
progress enabling it defining LINUXKPI_VERSION for the two drivers.
Sponsored by; The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46822
(cherry picked from commit 157e93e0e8)
Add alloc_netdev_dummy() which is needed by an updated rtw88 driver.
Given we already call linuxkpi_init_dummy_netdev() ourselves allow the
setup function to be NULL to not initialize and start a tasq td twice.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46802
(cherry picked from commit 105331f658)
Without this patch, vdevs faulted via AUX state would not be replaced
once the appropriate drive is replaced. ZFS does not internally use
that state, but a drive can be manually forced into such a state with a
command like zinject.
Submitted by: Goran Mekić <meka@tilda.center>
Sponsored by: ConnectWise
Differential Revision: https://reviews.freebsd.org/D46866
(cherry picked from commit 618ae939b7)
When the sysctl-variable net.inet.ip.accept_sourceroute is non-zero,
an mbuf would be leaked when processing a SYN-segment containing an
IPv4 strict or loose source routing option, when the on-stack
syncache entry is used or there is an error related to processing
TCP MD5 options.
Fix this by freeing the mbuf whenever an error occurred or the
on-stack syncache entry is used.
Reviewed by: markj, rscheff
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46839
(cherry picked from commit 01eb635d12)
Don't leak a reference count for so->so_cred when processing an
incoming SYN segment with an on-stack syncache entry and the
sysctl variable net.inet.tcp.syncache.see_other is false.
Reviewed by: cc, markj, rscheff
Sponsored by: Netflix, Inc.
Pull Request: https://reviews.freebsd.org/D46793
(cherry picked from commit cbc9438f05)
Don't leak a maclabel when SYN segments are processed which results
in an error due to MD5 signature handling.
Tweak the #idef MAC to allow additional upcoming changes.
Reviewed by: markj
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46766
(cherry picked from commit 78e1b031d2)
so_peerlabel can only be used when the socket is not listening.
Reviewed by: markj
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46755
(cherry picked from commit 2fb778fab8)
Whenever mac_syncache_init() returns an error, ensure that
*label = NULL. This simplifies the error handling by the caller.
Reviewed by: rscheff
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46701
(cherry picked from commit 3f2792166a)
tcp_lro_flush() is not used anymore outside of tcp_lro.c. Therefore
make it static.
Reviewed by: rscheff, glebius, Peter Lei
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46435
(cherry picked from commit e06cf0fc5d)
Use the appropriate function to flush correctly all entries. The old
code does not remove the element from the hash table, only from the
active queue.
Reviewed by: Peter Lei, rscheff
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46434
(cherry picked from commit 0b45d36510)
Use the appropriate function to flush correctly all entries. The old
code does not remove the element from the hash table, only from the
active queue.
Reviewed by: Peter Lei, rscheff
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46433
(cherry picked from commit 5203dcce25)
When the initial sending of the SYN ACK segment using
syncache_respond() fails, it is handled as a permanent error.
To improve consistency, apply this policy in all cases, where
syncache_respond() is called. These include
* timer based retransmissions of the SYN ACK
* retransmitting a SYN ACK in response to a SYN retransmission
* sending of challenge ACKs in response to received RST segments
In these cases, fall back to SYN cookies, if enabled.
While there, also improve consistency of the TCP stats counters.
Reviewed by: cc, glebius (earlier version)
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46428
(cherry picked from commit ef438f7706)
Do not report an error, if it is stored as a soft error. This avoids,
for example, the dropping of TCP connections using an interface,
while enabling or disabling LRO on that interface.
Reviewed by: cc
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46427
(cherry picked from commit b2044c4557)
The leading tab is always required, regardless of the configuration of
`syncdev` or `syncpeer`, as `maxupd`, `defer` and `version` all require
it.
Reviewed by: kp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47112
(cherry picked from commit 1c95ec17ca)
WITH_LOADER_BIOS_TEXTONLY is now the default so document
WITHOUT_LOADER_BIOS_TEXTONLY.
Fixes: 23dee252da loader: Change this BIOS tradeoff...
(cherry picked from commit 50b5a37a12)
So this is a gross hack to fix the 'noclean' build since we changed to
text-only loader. We have to fix it in a better way, but for the moment,
this will fix non-meta no-clean builds. A better hack is to fix this so
we build either vidconsole.c or textvidc.c, but some minor refactoring
and variable renaming is needed.
Fixes: 23dee252da
Sponsored by: Netflix
(cherry picked from commit 10c429016a)
After talking with a number of people about the removal of some things
to make the loader fit, readjust things a little.
Add back GZIP and BZIP2 compression support. Many of the downstream MFC
packaging systems depend on this. This adds back 20k to the size of the
loader.
Make the boot loader text-only by default. This saves 40k in size. Net,
we're 20k smaller. The graphics loader for BIOS is less useful than the
zip functionality: You can still boot w/a text only one it and you can
build a custom one if you really want it. It's also the default we use
for dual console.
This should be merged back into stable/14 and stable/13 so it's in the
next release for each of these. That way we have only one release (13.4)
with the other defaults.
MFC After: 3 days
Sponsored by: Netflix
Reviewed by: olce, rgrimes, emaste
Differential Revision: https://reviews.freebsd.org/D47203
(cherry picked from commit 23dee252da)