diff options
author | Shay Agroskin <shayagr@amazon.com> | 2020-12-08 20:02:00 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-12-09 15:26:40 -0800 |
commit | ce74496a1575dc5364ad2aed99d3604269c7b645 (patch) | |
tree | 93850872cde416d8164b00315cc62fa845e47c24 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | da9482332d581bb8ea69eca34d7f75a3c6247475 (diff) |
net: ena: use constant value for net_device allocation
The patch changes the maximum number of RX/TX queues it advertises to
the kernel (via alloc_etherdev_mq()) from a value received from the
device to a constant value which is the minimum between 128 and the
number of CPUs in the system.
By allocating the net_device struct with a constant number of queues,
the driver is able to allocate it at a much earlier stage, before
calling any ena_com functions. This would allow to make all log prints
in ena_com to use netdev_* log functions instead or current pr_* ones.
Note:
netdev_* prints in ena_com functions that are called before
net_device registration in ena_probe() might print messages that are
a bit ugly (with strings like "(unnamed net_device) (uninitialized)").
However we decided to use netdev_* prints in these functions anyway,
for the sake of getting better messages later, when ena_com functions
are called after ena_probe() form other parts of the driver.
See discussion about this decision in [1].
[1] http://www.mail-archive.com/netdev@vger.kernel.org/msg353590.html
Signed-off-by: Shay Agroskin <shayagr@amazon.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions