cxgbe(4): T7 related updates to shared code
- 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
cxgbe(4): Add support for QSFP-DD connector and 400G transceivers
Tested with SR8 and DR4 transceivers.
MFC after: 1 week
Sponsored by: Chelsio Communications
libpfctl: fix error handling
In two cases we returned E2BIG where it should have been a boolean ('false').
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 9bb1c46b4c38c44565fc24f13acdc19b0cb5a1c4)
tarfs: Fix support for large files
* When fast-forwarding through a zstd frame, we incorrectly used the
min() inline function instead of the MIN() macro. The function
truncates the result to unsigned int, resulting in a decompression
error when trying to seek more than 4 GB into the frame.
* POSIX states that a size extended header record overrides the size
field in the header if present, and that one must be included if the
size of the file exceeds 8 GB (the size field maxes out at 64 GB).
* Reduce repetition in the exthdr parser by deduplicating the syntax
error handler.
MFC after: 1 week
Sponsored by: Klara, Inc.
Fixes: 69d94f4c7608 ("Add tarfs, a filesystem backed by tarballs.")
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D53718
cxgbe KTLS tx: Distribute FW6_PLD replies across rx queues
If the connection flowid is available then the replies are requested on
the rx queue that is receiving wire traffic for the connection. This
reduces contention for the txq lock.
Reviewed by: jhb
MFC after: 3 days
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D53385
LinuxKPI: 802.11: clear CONF_IDLE earlier
When starting to scan and ending a scan we clear/set the hardware to
idle. Similarly we set the hw to idle when we remove the channel
context but when starting we only set it to non-idle when we went from
assoc to run. This apparently was not a problem most of the time
as the switch from a failed hardware scan to a software scan was
racing against net80211. ad4ddc83ebf8 fixed that specifically for
rtw88 and while we were more consistently scanning, this broke
authentication as the setting of idle at the end of the scan was
now happening reliably. Move the unsetting of idle from assoc_to_run
to scan_to_auth for when we create the chanctx to keep it
symmetrical. This makes authentication work again for rtw88 (though
not for everyone due to other possible problems with net80211).
This likely also fixes the problems in the listed PRs.
iwlwifi(4) mvm and mld driver parts do not use this information at
all and were never affected.
[8 lines not shown]
vtnet: fix enabling/disabling tso
Transmit segment offloading depends on transmit checksum offloading.
Enforce that constraint. This also fixes a bug, since if_hwassist bits
are from the CSUM_ space, not from the IFCAP_ space.
Approved by: re (cperciva)
PR: 290773
Reviewed by: Timo Völker
Tested by: lg at efficientip.com
Differential Revision: https://reviews.freebsd.org/D53629
(cherry picked from commit 4c50ac68166caf7e08c5a9984d63fa91490fa50d)
(cherry picked from commit 0fb0ba51d8bc1e6673e073c1c5a02922f997f6b8)
tcp: drop SYN ACK segment for listening sockets
When a SYN ACK is received for a listening socket, just drop it
instead of killing the SYN-cache entry and send a RST.
This closes the possibility to kill a TCP connection during its
handling in the SYN-cache.
Approved by: re (cperciva)
Reviewed by: Nick Banks, Peter Lei
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D53540
(cherry picked from commit 239464e99321ede07664782426ec4e54cd8a618d)
(cherry picked from commit e082156ae14b6717f08dccfff62d1fcbb3b26487)
Azure: Fix image names
We need to specify the correct image names -- *.vhdf, not *.vhd -- in
order for them to upload.
15.0 candidate
Reviewed by: lwhsu
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D53684
(cherry picked from commit df84867e8af49437bdc76a0df41d78f5a362cd24)
pcic.4: Really remove
MFC after: 2 days
Fixes: 1d9f2db7c (pcic.4: Remove stale manual)
Fixes: 31b35400c (pccard: Remove more of the PC Card)
Reported by: emaste
lib: update ABI meta following libspl changes
In theory they should not have resulted in a change. In practice, the
way visibility is set up currently means that many of our convenience
libraries will "leak through" into the available symbols in our public
libraries.
In this commit, we're seeing all the new symbols in libspl through
libuutil, libzfs and libzfs_core. Importantly, none have been removed,
so consumers of these libraries will not notice.
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn at despairlabs.com>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #17861
pcic.4: Remove stale manual
MFC after: 2 days
Reviewed by: ziaee
Fixes: 31b35400c (pccard: Remove more of the PC Card)
Discussed with: bsdimp, emaste, jhb
Extracted from: https://reviews.freebsd.org/D53434
libspl/random: add switch to force pseudo-random numbers for all calls
ztest wants to force all kernel random calls to use the pseudo-random
generator (/dev/urandom), to avoid depleting the system entropy pool
just for testing.
Up until the previous commit, it did this by switching the path that the
libzpool (now libspl) random API would use to get random data from; that
is, it took advantage of an implementation detail.
Now that that hole is closed to it, we need another method. This commit
introduces that; a simple API call to enable/disable "force pseudo"
mode.
Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
libspl: hide global data objects
Currently libspl is a static archive that is linked into multiple shared
objects, which then re-export its symbols. We intend to fix this soon.
For the moment though, most programs shipped with OpenZFS depend on two
or more of these shared objects, and see the same symbols twice. For
functions this is not a problem, as they do not have any mutable state
and so the linker can simply select the first one and use that for all.
For global data objects however, each shared object will have direct
(non-relocatable) references to its own instance of the symbol, such
that changes on one will not necessarily be seen by the other. While
this shouldn't be a problem in practice as these reexported interfaces
are not supposed to be used, they are technically undefined behaviour in
C (C17 6.9.2) and are reported by ASAN as a violation of C++'s "One
Definition Rule".
To fix this, we hide these globals inside their compilation units, and
[7 lines not shown]
libzpool: add zfs_impl.c, remove from libicp
This isn't used by libicp directly, but is by some clients, and relies
on headers specific to the zfs module, which makes using it difficult
otherwise.
Also switch the checksum tests over to use libzpool, so they can get
access to it. That's not exactly what we want in the long term, but the
icp and zfs modules have a complicated relationship so this will do for
now.
Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
zfs_context: remove duplicate includes
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
icp: remove global icp includes
Only include the required icp headers. There's no need to
include sys/zfs_context.h and pull in all of the zfs headers.
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
libzpool: remove global libzpool includes
Only include the zfs headers where they're currently required to
compile. Unfortunately, including zfs_ioctl.h in user space pulls
in a bunch of internal zfs headers as a side effect. We'll need
to move these structures in to a new shared header to avoid this.
We should not need to add the LIBZPOOL_CPPFLAGS when building the
zed, zinject, zpool, libzfs, ior libzfs_core.
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
libzpool: add BE_POSIX_VENDOR for userspace bootenv
This is mostly a placeholder; it's not actually clear if a boot
environment makes any sense for userspace. Still, "posix" is the likely
future name of libzpool as a port, and this define is mandatory, so lets
roll with it for now.
Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861
debug: move all of the debug bits out of the spl
Pull all of the internal debug infrastructure up in to the zfs
code to clean up the layering. Remove all the dodgy usage of
SET_ERROR and DTRACE_PROBE from the spl. Luckily it was
lightly used in the spl layer so we're not losing much.
Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <robn at despairlabs.com>
Closes #17861