Commit graph

290754 commits

Author SHA1 Message Date
Osama Abboud
e31fe28929 ena: Count all currently missing TX completions in check
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)
2024-10-31 14:54:10 +00:00
Osama Abboud
418d3190d7 ena: Fix customer metrics deallocation statement place
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)
2024-10-31 14:54:10 +00:00
Osama Abboud
699706f80b ena: Upgrade ena-com to freebsd v2.8.0
Merge commit '0fd934a2fd12fa74ae409d3de1313e449be5d97e'

Approved by: cperciva (mentor)
Sponsored by: Amazon, Inc.

(cherry picked from commit f5f8d7c9cd)
2024-10-31 14:54:10 +00:00
Mark Peek
f9e09dc5b1 bhyve: support noVNC SetPixelFormat request
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)
2024-10-31 07:41:17 -07:00
Bjoern A. Zeeb
d964b9d8ed LinuxKPI: 802.11: adjustments for v6.11 iwlwifi, rtw88 and rtw89
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)
2024-10-31 14:33:57 +00:00
Bjoern A. Zeeb
8341284368 LinuxKPI: update rcu_dereference_*() and lockdep_is_held()
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)
2024-10-31 14:33:57 +00:00
Alexander Ziaee
231e279ca9 wpi.4: move hardware to HARDWARE + minor cleanup
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)
2024-10-31 14:33:57 +00:00
Alexander Ziaee
bc56cb2939 iwn.4: move hardware to HARDWARE + minor cleanup
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)
2024-10-31 14:33:56 +00:00
Bjoern A. Zeeb
3ed00f3920 LinuxKPI based WiFi drivers: scripts to extract fwget(8) and port details
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)
2024-10-31 14:33:56 +00:00
Bjoern A. Zeeb
64517ad54a iwlwifi: FreeBSD specific sysctl export update
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)
2024-10-31 14:33:56 +00:00
Bjoern A. Zeeb
1579a25f0a LinuxKPI: pci: rename PCI_IRQ_LEGACY to PCI_IRQ_INTX
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)
2024-10-31 14:33:56 +00:00
Bjoern A. Zeeb
0dee359c09 LinuxKPI: netdevice: add alloc_netdev_dummy()
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)
2024-10-31 14:33:56 +00:00
Michael Tuexen
d27f63fa8c sctp: another cleanup
No functional change intended.

(cherry picked from commit d08713dcdb)
2024-10-31 12:44:02 +01:00
Michael Tuexen
abbfa0cb48 sctp: cleanup the addition of addresses which are already known
No functional change intended.

(cherry picked from commit a05620b0f6)
2024-10-31 12:43:29 +01:00
Michael Tuexen
676b45d04b sctp: further cleanup
(cherry picked from commit 02478e6591)
2024-10-31 12:42:52 +01:00
Michael Tuexen
129057d5fa sctp garbage collect sctp_update_ifn_mtu
(cherry picked from commit ce5b5361d4)
2024-10-31 12:42:13 +01:00
Michael Tuexen
18a20a4306 sctp: cleanup
No functional change intended.

(cherry picked from commit e4ac0183a1)
2024-10-31 12:41:41 +01:00
Michael Tuexen
8689398f09 sctp: improve debug output
(cherry picked from commit ce20b48a60)
2024-10-31 12:41:06 +01:00
Michael Tuexen
bbb73d8941 sctp: check locking requirements
Actually assert the locking instead of describing it in a comment.
No functional change intended.

(cherry picked from commit 4466a97e83)
2024-10-31 12:40:21 +01:00
Michael Tuexen
ebdee305b1 sctp: make sctp_free_ifn() static
It is not used outside of the file.
No functional change intended.

(cherry picked from commit e1a09d1e9d)
2024-10-31 12:40:03 +01:00
Alan Somers
d3459fe7f7 zfsd: replace vdevs with the AUX faulted state
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)
2024-10-31 08:00:32 -06:00
Michael Tuexen
efcaa63aca sctp: cleanup sctp_delete_ifn
The address lock is always held, so no need for the second
parameter.
No functional change intended.

(cherry picked from commit 2e9761eb80)
2024-10-31 12:38:39 +01:00
Michael Tuexen
1e980fdf7a getsockopt: improve locking for SOL_SOCKET level socket options
Ensure SOLISTENING() is done inside SOCK_LOCK()/SOCK_UNLOCK()
for getsockopt() handling of SOL_SOCKET-level socket options.

Reviewed by:		markj, rscheff
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D46881

(cherry picked from commit 3326ab87cc)
2024-10-31 12:37:55 +01:00
Michael Tuexen
b785f83e98 tcp: small cleanup
No functional change intended.

Reviewed by:		cc, glebius, markj, rscheff
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D46850

(cherry picked from commit 2eacb0841c)
2024-10-31 12:37:05 +01:00
Michael Tuexen
67e4692998 tcp: improve mbuf handling when processing SYN segments
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)
2024-10-31 12:36:12 +01:00
Michael Tuexen
9a3bb25bab tcp: whitespace cleanup
No functional change intended.

Reported by:	markj
Sponsored by:	Netflix, Inc.

(cherry picked from commit a2e4f45480)
2024-10-31 12:35:24 +01:00
Michael Tuexen
00c3c39fcc tcp: improve ref count handling when processing SYN
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)
2024-10-31 12:34:33 +01:00
Michael Tuexen
2f5ac48d9b tcp: improve MAC error handling for SYN segments
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)
2024-10-31 12:33:35 +01:00
Michael Tuexen
66c7d5365a MAC: improve handling of listening sockets
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)
2024-10-31 12:32:36 +01:00
Michael Tuexen
406d75a581 MAC: improve consistency in error handling
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)
2024-10-31 12:24:34 +01:00
Michael Tuexen
8df12a277f tcp: make tcp_lro_flush() static
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)
2024-10-31 12:20:35 +01:00
Michael Tuexen
f84956ab37 al_eth: improve TCP LRO
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)
2024-10-31 12:19:40 +01:00
Michael Tuexen
c87c8fda44 neta: improve TCP LRO
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)
2024-10-31 12:18:52 +01:00
Michael Tuexen
003f1ebcbc tcp: improve consistency of syncache_respond() failure handling
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)
2024-10-31 12:17:53 +01:00
Michael Tuexen
2e45166856 tcp rack, bbr: improve handling of soft errors
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)
2024-10-31 12:16:29 +01:00
Zhenlei Huang
1821145f28 tcp cc: Remove a stray semicolon
MFC after:	1 week

(cherry picked from commit 2f395cfda8)
2024-10-31 12:40:18 +08:00
Zhenlei Huang
02e61e1d9e ocs_fc: Remove a stray semicolon
MFC after:	1 week

(cherry picked from commit 36756195a3)
2024-10-31 12:40:18 +08:00
Zhenlei Huang
1d8eda2e32 mpi3mr: Remove a stray semicolon
MFC after:	1 week

(cherry picked from commit 86a2c910c0)
2024-10-31 12:40:18 +08:00
Zhenlei Huang
e96a62ea65 mana: Remove stray semicolons
MFC after:	1 week

(cherry picked from commit 6ccf4f4071)
2024-10-31 12:40:17 +08:00
Zhenlei Huang
88971439fb enic: Remove a stray semicolon
MFC after:	1 week

(cherry picked from commit 75ff90814a)
2024-10-31 12:40:17 +08:00
Zhenlei Huang
5942658cf3 LinuxKPI: Remove stray semicolons
MFC after:	1 week

(cherry picked from commit b4856b8e9d)
2024-10-31 12:40:17 +08:00
Zhenlei Huang
4d2d1e824b arm64: rockchip: Remove a stray semicolon
MFC after:	1 week

(cherry picked from commit 88b71d1fe0)
2024-10-31 12:40:17 +08:00
Zhenlei Huang
30e256e1fa makefs: Remove a stray semicolon
MFC after:	1 week

(cherry picked from commit 56b17de1e8)
2024-10-31 12:40:17 +08:00
Zhenlei Huang
57af3009cb config: Remove a stray semicolon
MFC after:	1 week

(cherry picked from commit d96ba5a623)
2024-10-31 12:40:16 +08:00
Zhenlei Huang
00fa80275f ndp: Remove a stray semicolon
MFC after:	1 week

(cherry picked from commit 17120e4bc3)
2024-10-31 12:40:16 +08:00
Zhenlei Huang
2f3c87296c ifnet: Assert that we are assigning network stack correctly
It makes no sense to assign NULL vnet to an interface when the kernel
option VIMAGE is enabled. Add an assertion to catch that.

This will also help diagnosing problem report [1] and [2].

1. https://bugs.freebsd.org/275381
2. https://bugs.freebsd.org/282168

Reviewed by:	kp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D46982

(cherry picked from commit d1d839d0b5)
2024-10-31 12:40:16 +08:00
Zhenlei Huang
01f4a503eb ifconfig: Fix wrong indentation for the status of pfsync(4)
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)
2024-10-31 12:40:16 +08:00
Brooks Davis
22aed646a5 src.conf.5: LOADER_BIOS_TEXTONLY default change
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)
2024-10-30 22:16:59 -06:00
Warner Losh
1a37c4e533 stand: Ugly hack due to default change
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)
2024-10-30 22:07:11 -06:00
Warner Losh
4d3b05a853 loader: Change this BIOS tradeoff: Add back zip and use text only
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)
2024-10-30 22:05:56 -06:00