ena: Reinit RSS components during queue count change flow
The io_queues_nb sysctl is writable while the interface is down, and
setting it destroys the RSS components. When the interface is not UP
nothing reinitialises them, so the indirection table is left referencing
queues that no longer exist until the next ifconfig up.
Call ena_rss_configure() after the queue count changes when the
interface is down. When it is up, this happens through ena_up().
This can configure RSS twice if the interface is brought up afterwards,
costing three redundant admin commands. That is preferred over changing
ena_up(), which the reset path also uses.
Reviewed by: cperciva
Fixes: 56d41ad5fe9c ("Add sysctl node for ENA IO queues number adjustment")
MFC after: 3 days
Sponsored by: Amazon, Inc.
ena: Update driver version to v2.8.5
New Features:
* Retrieve RSS indirection table size from device
Bug Fixes:
* Limit IO IRQ setup loop to active queues only
* Reinit RSS table on device restore when queue count shrinks
* Fix RSS not working after driver reload
* Fix NULL deref before NULL check in RSS sysctl
* Reinit RSS components during queue count change flow
Minor Changes:
* Fix ENA_MEM_FREE_COHERENT with an expression size argument
Reviewed by: cperciva
MFC after: 3 days
Sponsored by: Amazon, Inc.
ena: Reinit RSS table on device restore when queue count shrinks
When ena_restore_device() is called after a reset, pci_alloc_msix()
may return fewer MSI-X vectors than requested, causing num_io_queues
to shrink. When this happens, the RSS indirection table retains
entries referencing queues that no longer exist, routing packets to
non-existent queues and causing connectivity loss.
Extract ena_set_io_queue_count() to pair the queue count update with
ena_com_rss_destroy(), ensuring the RSS table is always invalidated
when the queue count changes. Use it from both ena_update_io_rings()
and ena_restore_device().
Reviewed by: cperciva
Fixes: e2735b095b7e ("Fix assumptions about number of IO queues in the ENA")
MFC after: 3 days
Sponsored by: Amazon, Inc.
ena: Fix NULL deref before NULL check in RSS sysctl
In ena_sysctl_rss_indir_table(), the code dereferenced
indir->sysctl_buf before checking whether indir itself is NULL.
Move the NULL check above the dereference so the early-return path
fires before any access through indir.
Reviewed by: cperciva
Fixes: 6d1ef2abd330 ("ena: Implement full RSS reconfiguration")
MFC after: 3 days
Sponsored by: Amazon, Inc.
ena: Retrieve RSS table size from device
The current driver assumes a default RSS table size of 128 entries,
expecting the device's RSS table size to match this assumption.
This patch allows the driver to create RSS indirection table
with the size advertised by the device.
Reviewed by: cperciva
MFC after: 3 days
Sponsored by: Amazon, Inc.
ena: Fix RSS not working after driver reload
When reloading the driver (kldunload/kldload),
ena_rss_init_default_deferred() is called before ena_attach()
completes. At this point, devclass_get_softc() returns NULL for all
devices because the adapter structs have not been populated yet. As a
result, ena_rss_init_default() is never called and ENA_FLAG_RSS_ACTIVE
is never set. Later, in ena_up_complete(), the code checks the flag,
finds it unset, and skips ena_rss_configure() entirely. RSS is never
initialized, and all traffic is directed to queue 0.
Remove the ENA_FLAG_RSS_ACTIVE gate in ena_up_complete() and always call
ena_rss_configure(), which initialises the table when tbl_log_size is
zero. The deferred SYSINIT is now redundant, so remove it.
Reviewed by: cperciva
Fixes: 9b8d05b8ac78 ("Add support for Amazon Elastic Network Adapter (ENA) NIC")
MFC after: 3 days
Sponsored by: Amazon, Inc.
ena: Limit IO IRQ setup loop to active queues only
The loop in ena_request_io_irq() iterated over adapter->msix_vecs,
which reflects the maximum number of MSI-X vectors allocated at
init time. When the number of IO queues is reduced at runtime via
the io_queues_nb sysctl, msix_vecs is not updated, causing the
driver to bind interrupts and log CPU affinity for queues that no
longer exist.
Replace the loop bound with ENA_IO_IRQ_IDX(adapter->num_io_queues)
to iterate only over the currently active IO queues.
Also replace the loop in ena_free_io_irq() the same.
Reviewed by: cperciva
Fixes: 56d41ad5fe9c ("Add sysctl node for ENA IO queues number adjustment")
MFC after: 3 days
Sponsored by: Amazon, Inc.
www/mod_sgi4: removed MOVED line now the port has been reintroduced
The port has been reintroduced, so this is no longer needed
and may break existing setups that have mod_wsgi4 installed.
Fixes: 0121f370d86ddea8411bacfb72961eecedbd163a
Approved by: clusteradm
ena: Retrieve RSS indirection table size from the device in ena-com
This patch allows the driver to create RSS indirection table with the
size advertised by the device.
Reviewed by: cperciva
MFC after: 3 days
Sponsored by: Amazon, Inc.
ena: Fix ENA_MEM_FREE_COHERENT with an expression size argument
ENA_MEM_FREE_COHERENT() discards its size parameter with "(void)size".
A cast binds tighter than '*', so when the argument is an in-place
calculation the macro expands to ((void)(a)) * b, which fails to
compile with "void value not ignored as it ought to be".
Wrap the parameter in parentheses before casting it. No functional
change for existing callers, which all pass a plain variable.
Reviewed by: cperciva
MFC after: 3 days
Sponsored by: Amazon, Inc.
amd64 FRED: normalize the user-provided 'fred' knob value
Assembler accesses 'fred' as byte, ensure that any non-zero
user-provided value works. This is pure cosmetics.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
amd64 resumectx(): restore FRED state before loading %cr4
%cr4 has the FRED enable bit. This only matters for NMI and #MC, and the
kernel is really not ready to handle them while in resumectx(), but do
it for formal correctness.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
amd64 FRED: no need to store fs/gsbase on user_fred_not_syscall path
The stores are only relevant for PCB_FULL_IRET return to userspace,
and setting the flag stores the bases into the pcb anyway. Also, the
hidden issue is that FRED already did implicit SWAPGS on entry, so
stored gsbase was wrong anyway.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
amd64 FRED: handle in-kernel faults same as IDT
Pass #MC and #DF directly to corresponding handlers, avoiding EFI
pcb_onfault case.
If a fault occurs while kdb/ddb is active, handler must call
kdb_reenter() and not do the normal processing, which typically ends up
in panic() for kernel-mode faults. But #MC and #DF should be excluded
there as well.
NMI is not an exception, it is delivered as specific event.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
rtwn: fix 8188f channel offset / width programming
* rtwn_chan2centieee() already calculates the proper centre
frequency, so it doesn't need to be further offset.
* Don't program R92C_RF_CHNLBW with further 20MHz wide bits;
the rest of the programming works correctly for 20/40MHz
operation.
Tested:
* Verified against the linux rtl8xxxu/8188f.c code.
* Tested w/ 20 and 40MHz 11n; 40MHz is now operating at higher
speed.
Fixes: 2c38dc04d6f8bc84620bb3b67c8ccd9f910c4d03
Makefile.inc1: Make sure mandoc bootstrap tool depends on libz
It links against both libopenbsd and libz, so reflect this in the
bootstrap tool's dependencies in case of races from highly-parallel
builds.
Reported by: jkh
MFC after: 1 week
x11-toolkits/py-pyfltk: update the port to version 1.4.5.0
This synchronizes Python bindings with FLTK 1.4.5 after
commit 514ac9a10d22. While here:
- Move SF.net in front as that's where distfile is first
published (per modification time)
- Reduce globbing scope in PORTDOCS and PORTEXAMPLES
- HTML files and images no longer come with the distfile
- Shorten some command lines so they fit the standard
80-character terminal width