| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D53097
Reviewed by: kbowling
Sponsored by: Netflix
|
| |
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D53096
Sponsored by: Netflix
|
| |
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D53095
Sponsored by: Netflix
|
| |
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D53094
Sponsored by: Netflix
|
| |
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D53093
Reviewed by: kbowling
Sponsored by: Netflix
|
| |
|
|
|
|
| |
Differential Revision: https://reviews.freebsd.org/D53092
Reviewed by: np (outside of differential)
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Do not create mutexes with snd_mtxcreate(). It doesn't provide any
value, plus it first allocates the mutex with malloc(9). Allocate
mutexes in the stack and use mtx_* functions directly instead of the
snd_mtx* wrappers.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D53855
|
| |
|
|
|
|
|
|
|
|
|
|
| |
There is no scenario where chn_intr() is called with the channel lock
already held.
No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D53854
|
| |
|
|
|
|
|
|
|
| |
PCM_ALIVE() is used only in pcm_unregister(), but it does not hurt to
use PCM_REGISTERED(), which uses PCM_ALIVE() internally. In fact, it's
more robust this way.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53841
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use CHN_LOCK()/CHN_UNLOCK() directly, instead of
dsp_lock_chans()/dsp_unlock_chans(). These functions are useful when we
want to potentially lock both channels. Here we know which channel we
are locking, so we can just lock it directly. This way we get rid of the
prio variable as well.
Related to runpid again, there is no reason to assign it when
CHN_F_RUNNING is not set. channel->pid (as well as channel->comm) is
always assigned in dsp_chn_alloc().
Get rid of runpid. I do not see how we can end up with channel->pid
(td->td_proc->p_pid) not matching buf->uio_td->td_proc->p_pid.
Also improve errno values.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D53736
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tag packets for 11n/11ac associated nodes with A_MPDU so they
get passed into the reordering logic
* tag A-MSDU frames with AMSDU and AMSDU_MORE so they don't get
dropped due to duplicate sequence numbers.
Note: I haven't yet elicited A-MSDU in A-MPDU to fully test this,
but I do see the net80211 reordering logic kick in (which you can
see via wlanstats -i wlan0 -o ampdu 1).
I've checked with Johannes Berg at Intel (who maintains the linux
iwlwifi stuff); he replied saying none of the firmware versions are
doing AMPDU reorder offloading.
Differential Revision: https://reviews.freebsd.org/D53781
Locally tested:
* AX210, STA mode, > 200mbit bidirectional traffic testing on
5GHz VHT/40.
|
| |
|
|
|
|
|
|
|
|
|
| |
Reporter noted packet loss with 82583. NVM is down level. The
errata docs mention disabling this, which should be the firmware
default, so I am not sure why we were enabling this bit. Linux and
OpenBSD have the same issue, while NetBSD got it right.
Reported by: Codin <codin@nagi.ftp.sh>
Tested by: Codin <codin@nagi.ftp.sh>
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The reporter contacted me with packet loss and throughput fluctuations
on a low power machine (Intel J1900) that got worse with the recent AIM
algorithm in FreeBSD 14.2+.
32K RX PBA matches Linux default. Add a conditional path since we don't
otherwise do a fixup for jumbo frames to retain space for two frames in
Tx.
With this change and an additional errata change, the throughput meets
line rate for the reporter.
Reported by: Codin <codin@nagi.ftp.sh>
Tested by: Codin <codin@nagi.ftp.sh>
MFC after: 2 weeks
|
| |
|
|
|
|
|
| |
Unused and confusing.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
INVARIANTS kernels may trigger a KASSERT panic from sndbuf_acquire(),
when fuzzing write(2) using stress2, because of a race in chn_write().
In the case of chn_write(), what sndbuf_acquire() does is extend the
ready-to-read area of the buffer by a specified amount of bytes. The
KASSERT in question makes sure the number of bytes we want to extend the
ready area by, is less than or equal to the number of free bytes in the
buffer. This makes sense, because we cannot extend the ready area to
something larger than what is available (i.e., free) in the first place.
What chn_write() currently does for every write is; calculate the
appropriate write size, let's say X, unlock the channel, uiomove() X
bytes to the channel's buffer, lock the channel, and call
sndbuf_acquire() to extend the ready area by X bytes. The problem with
this approach, however, is the following.
Suppose an empty channel buffer with a length of 1024 bytes, and 2
threads, (A) and (B), where (B) is a higher-priority one. Suppose thread
(A) wants to write 1024 bytes. It unlocks the channel and uiomove()s
1024 bytes to the channel buffer. At the same time, thread (B) picks up
the lock, and because it is higher priority, it keeps dominating the
lock for a few iterations. By the time thread (A) picks up the lock
again, it tries to call sndbuf_acquire() with a size of 1024 bytes,
which was calculated before it performed the uiomove(). In this case,
there is a very high chance that the buffer will not be empty, that is,
have a free area of 1024 bytes, as was the case when thread (A) started
executing, and so the KASSERT will trigger a panic because the condition
(bytes <= free) is not met.
Another scenario that can trigger a panic is the following: suppose a
buffer with a size of 4 bytes, and two threads: (A) and (B). In the
first iteration, thread (A) wants to write 2 bytes, while the buffer is
empty, BUT the pointer (sndbuf_getfreeptr()) is at the end (i.e.,
buf[3]). In the first iteration of the loop, because of the way we
calculate t, we'll end up writing only 1 byte, so after sz -= t, sz will
be 1, and so we'll need one more iteration in the inner loop, to write
the remaining 1 byte. Now we're at the end of the first loop, thread (A)
unlocks the channel, it has written 1 byte, it needs to write 1 more,
and the buffer is left with 3 empty slots. Now thread (B) picks up the
lock, and it wants to write 3 (or more) bytes. Eventually it writes the
3 bytes, and it leaves the buffer with 0 free slots. By the time thread
(A) picks up the lock again, and continues with the second iteration of
the inner loop, it will try to write the last byte, but sndbuf_acquire()
will panic because there is no free space anymore.
To fix this, get rid of the inner loop and calculate the write size on
each iteration. Also, call sndbuf_acquire() before unlocking the
channel. In the scenarios explained above, we'll end up entering the
chn_sleep() case. Modify it as well, so that we do not kill the channel
if we need to sleep more.
Do the same for chn_read() to avoid possible similar panics from
sndbuf_dispose().
Reported by: pho
Tested by: christos, pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: pho, kib
Differential Revision: https://reviews.freebsd.org/D53666
|
| |
|
|
|
|
| |
Reported by: andrew, rpokala
Fixes: 8d2a50bb3805 ("nvme: Abstract out function to obtain a disk ident string from cdata")
Sponsored by: Chelsio Communications
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
39d4094173f9 ("epair: add support for checksum offloading") revealed
that HW checksum offloading is not enabled when the dpaa2_ni driver
is attached despite being declared and enabled on the dpni interface.
I modified dpaa2_ni_setup_if_caps to take into account both IPv4 and
IPv6 checksum offloading capabilities and added a call to re-configure
interface capabilities on attach to fix it.
Reviewed by: bz
Fixes: 39d4094173f9 ("epair: add support for checksum offloading")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53436
|
| |
|
|
|
|
|
|
| |
Signal when the namespace is gone so we can tear down the disk when a
nvme drive is removed.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D33032
|
| |
|
|
|
|
|
| |
Signal the new media size when the namespace changes size.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D33032
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When we get a namespace notification, we have to reconstrut the
namespace to get the new identification data from the namespace. For
each namespace in the AEN, we will reconstrict it before we call the
notification. We also flag it as changed for the duration of the change
callback (prior versions of the patch needed to keep track, but we no
longer do, so this bit may be removed). Note when we've seen the
namespace so we can notify when it goes away.
Co-authored-by: imp
Differential Revision: https://reviews.freebsd.org/D33032
|
| |
|
|
|
|
|
|
|
|
| |
b21e67875bf0c tested for the good condition, not the error condition, so
we'd never do anything else in this function. This was causing certain
logging not to happen, and also prevented forthcoming namespace size
change code from working as well.
Fixes: b21e67875bf0c
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
bytes of zeros.
Our recent changes to iichid.c has caused us to attempt to read a
full REPORT instead, and at least one keyboard hangs solid when we
do that.
This patch changes us to be spec-compliant.
Differential Revision: https://reviews.freebsd.org/D53803
MFC after: 1 day
Approved by: re(ccperciva)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Some non-PCI devices can send interrupts, e.g. the Arm SMMU or GICv5
Interrupt Wire Bridge. Add support for these by implementing pci_get_id
and pci_alloc_msi and the MSI/MSI-X parts of the PCIB interface.
Only the MSI parts of the PCI interface are added as that is all I am
able to test.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D53330
|
| |
|
|
|
|
|
| |
Use the midr value to ensure we find the correct PCPU pointer on arm64.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D53327
|
| |
|
|
|
|
|
|
| |
This mirrors commit 6d0001d44490becdd20d627ce663c72a30b9aac3 but for
nvmf(4).
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D53339
|
| |
|
|
|
|
|
| |
This will permit sharing the code with nvmf(4).
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D53338
|
| |
|
|
|
|
|
| |
PR: 290496
Tested by: adrian
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Virtual Functions are considered untrusted and have no control
over VLAN filtering configuration in HW. To allow using
VLANs on VF intreface driver has to assume that VLAN HW Filtering
is always enabled and pass requests for adding or removing VLAN
tags to Physical Function driver using Mailbox API.
Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Approved by: kbowling (mentor)
Reviewed by: erj (previous version)
Tested by: gowtham.kumar.ks_intel.com
MFC after: 1 week
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D53245
|
| |
|
|
|
|
|
|
|
|
|
| |
Some TPM implementations have a different start method that requires
an additional notification for some state changes; for instance, the
"Pluton" start method. Just factor these transitions out for now, and
the coming commits will introduce points that the start method can hook
in at.
Reviewed by: obrien
Differential Revision: https://reviews.freebsd.org/D53682
|
| |
|
|
|
|
|
|
| |
PR: 289121
Reported by: Qiu-ji Chen
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D52199
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Send a TX A-MPDU exchange successfully; we were allocating the
A-MPDU TX queue but returning 0 to net80211 was telling it
to not establish the TX A-MPDU session and none of the BA session
tracking stuff would work.
* Clean up the TX A-MPDU queue lookup in the transmit path - only
QoS data frames are allowed, not qos null-data, cf/ack/etc frames;
only send them if the A-MPDU session is established.
* Tell net80211 that we've established the TX A-MPDU session once
the firmware queue has been created.
* Check to make sure we're not double (or more) creating TX AMDPU
sessions - only allocate a qid if we're not doing A-MPDU yet.
* Delete IWX_FLAG_A-MPDUTX - it's now being properly tracked!
Locally tested:
* AX210, STA mode - gets 50/50mbit on 2GHz HT20, and 100/100mbit on
5GHz VHT/40.
Differential Revision: https://reviews.freebsd.org/D53725
Reviewed by: thj
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I noticed a couple of things were happening:
* during suspend, I'd get a timeout in the NIC lock path (which
sets a bit on the NIC to say that the host wants to talk to it);
* resume wouldn't come back - scan commands would fail, and you'd have
to reinit the NIC again for it to work.
The thing is:
* the suspend path should already shut down the NIC by shutting down all
the VAPs (and the last VAP should call ic_parent to bring it down), and
* the resume path should already bring up the NIC by bringing up each VAP,
and the first VAP to be brought up calls ic_parent to bring it up.
So instead, I've shuffled around the code to just double check the
hardware state is consistent /before/ ieee80211_suspend_all() and
ieee80211_resume_all() is called.
This both fixes the errant hardware timeout during suspend, and it
fixes resume to work.
Locally tested:
* AX210, STA mode, both hardware ACPI suspend/resume and devctl suspend
and devctl resume
Differential Revision: https://reviews.freebsd.org/D53721
Reviewed by: thj
|
| |
|
|
|
|
|
|
|
|
| |
* Add IWN_DEBUG_KEYMGMT as a debug flag
* Convert DPRINTF(()) in key add/set to IWN_DPRINTF()
* printf() -> net80211_vap_printf()
* add braces around return value
Differential Revision: https://reviews.freebsd.org/D53703
Reviewed by: thj
|
| |
|
|
|
|
|
|
|
|
| |
* constify mtw_write_region_1()'s data field
* convert to use ieee80211_crypto_get_*()
* .. note that rx/tx mic data routines are explicitly being called,
as this NIC is doing TKIP + MIC offload
Differential Revision: https://reviews.freebsd.org/D53704
Reviewed by: bz
|
| |
|
|
|
|
|
|
|
|
|
| |
Migrate to the ieee80211_crypto_key_*() routines.
Should be no functional change.
Locally tested:
* RTL8821AU, STA mode
Differential Revision: https://reviews.freebsd.org/D52712
|
| |
|
|
|
|
| |
Fixes: 7b80c8b7d8d9 cxgbe(4): Expanded interrupt handling for T7
MFC after: 1 week
Sponsored by: Chelsio Communications
|
| |
|
|
|
|
| |
Reported by: np
Fixes: 9349214a2815 mlx5: Preallocate ktls tags asynchronously
Sponsored by: Netflix
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Catch up with the new cause/perr registers. The high level approach
is the same but the T7 has an extra top level INT_CAUSE concentrator
and a PERR_CAUSE concentrator with a changed layout.
- Add various flags to control the interrupt handlers' behavior.
- Implement a t4_intr_clear that internally use the slow handler as an
iterator over known cause/perr registers. This lets the driver clear
all of the interrupt sources that it knows about. The firmware sets
up the interrupt enables and clears the causes normally so this call
should be redundant.
MFC after: 1 week
Sponsored by: Chelsio Communications
|
| |
|
|
|
|
|
|
|
|
| |
Disabled by default, but also redundant, since most of the errors they
catch will be caught anyway by WITNESS and the locking subsystem.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D53735
|
| |
|
|
|
|
|
|
|
| |
No reason to do so.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D53734
|
| |
|
|
|
|
|
|
|
| |
uiomove_faultflag() takes care of that already.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D53733
|
| |
|
|
|
|
|
|
|
|
|
| |
It is defined by default, and there is no reason to have a switch for
it. While here, also get rid of some unnecessary comments and ioctl
definitions.
No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
| |
No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
| |
No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
| |
- Avoid some more registers with read side-effects during regdump.
- mps_tcam_size is 3x the size of T6/T5.
- Update rss_rd_row to work with T7.
Obtained from: Chelsio Communications
MFC after: 1 week
Sponsored by: Chelsio Communications
|
| |
|
|
|
|
|
| |
Tested with SR8 and DR4 transceivers.
MFC after: 1 week
Sponsored by: Chelsio Communications
|
| |
|
|
|
|
|
|
|
| |
No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D53696
|