freebsd-dev/sys/dev/ena
Marcin Wojtas e2735b095b Fix assumptions about number of IO queues in the ENA
Make the ena_adapter::num_io_queues a number of effectively used IO
queues. While the ena_adapter::max_num_io_queues is an upper-bound
specified by the HW, the ena_adapter::num_io_queues may be lower than
that, depending on runtime system resources availability.

On reset, there are called ena_destroy_device() and then
ena_restore_device(). The latter calls, in turn, ena_enable_msix(),
which will attempt to re-acquire ena_adapter::max_num_io_queues of
MSIX vectors again.

Thus, the value of ena_adapter::num_io_queues may be different before
and after reset. For this reason, free the IO rings structures (drbr,
counters) in ena_destroy_device() and allocate again in
ena_restore_device().

Submitted by:  Maciej Bielski <mba@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Amazon, Inc.
2020-05-26 15:54:32 +00:00
..
ena_datapath.c Rework ENA Rx queue size configuration 2020-05-26 15:48:06 +00:00
ena_datapath.h Expose argument names for non static ENA driver functions 2020-05-26 15:41:53 +00:00
ena_netmap.c Rework ENA Rx queue size configuration 2020-05-26 15:48:06 +00:00
ena_netmap.h Expose argument names for non static ENA driver functions 2020-05-26 15:41:53 +00:00
ena_sysctl.c Rework ENA Tx buffer ring size reconfiguration 2020-05-26 15:50:30 +00:00
ena_sysctl.h Expose argument names for non static ENA driver functions 2020-05-26 15:41:53 +00:00
ena.c Fix assumptions about number of IO queues in the ENA 2020-05-26 15:54:32 +00:00
ena.h Rework ENA Tx buffer ring size reconfiguration 2020-05-26 15:50:30 +00:00