]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add sysctl node for ENA IO queues number adjustment
authorMarcin Wojtas <mw@FreeBSD.org>
Tue, 26 May 2020 15:57:02 +0000 (15:57 +0000)
committerMarcin Wojtas <mw@FreeBSD.org>
Tue, 26 May 2020 15:57:02 +0000 (15:57 +0000)
commit56d41ad5fe9c2fcbc2363bf3ca7e69684a26b4bd
tree56c8593926f910268695f09b4e6c6b1f7359a91f
parente2735b095b7e31a6e07b8639ed151456a610bc07
Add sysctl node for ENA IO queues number adjustment

By default, in ena_attach() the driver attempts to acquire
ena_adapter::max_num_io_queues MSI-X vectors for the purpose of IO
queues, however this is not guaranteed. The number of vectors acquired
depends also on system resources availability.

Regardless of that, enable the number of effectively used IO queues to
be further limited through the sysctl node.

Example: Assumming that there are 8 IO queues configured by default, the
command

$ sysctl dev.ena.0.io_queues_nb=4

will reduce the number of available IO queues to 4. Similarly, the value
can be also increased up to maximum supported value. A value higher than
maximum supported number of IO queues is ignored. Zero is ignored too.

Submitted by:  Maciej Bielski <mba@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Amazon, Inc.
sys/dev/ena/ena.c
sys/dev/ena/ena.h
sys/dev/ena/ena_sysctl.c