linux_dsm_epyc7002/drivers/net/ethernet/amazon/ena
Sameeh Jubran 13ca32a69e net: ena: allow queue allocation backoff when low on memory
If there is not enough memory to allocate io queues the driver will
try to allocate smaller queues.

The backoff algorithm is as follows:

1. Try to allocate TX and RX and if successful.
1.1. return success

2. Divide by 2 the size of the larger of RX and TX queues (or both if their size is the same).

3. If TX or RX is smaller than 256
3.1. return failure.
4. else
4.1. go back to 1.

Also change the tx_queue_size, rx_queue_size field names in struct
adapter to requested_tx_queue_size and requested_rx_queue_size, and
use RX and TX queue 0 for actual queue sizes.
Explanation:
The original fields were useless as they were simply used to assign
values once from them to each of the queues in the adapter in ena_probe().
They could simply be deleted. However now that we have a backoff
feature, we have use for them. In case of backoff there is a difference
between the requested queue sizes and the actual sizes. Therefore there
is a need to save the requested queue size for future retries of queue
allocation (for example if allocation failed and then ifdown + ifup was
called we want to start the allocation from the original requested size of
the queues).

Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-06-12 11:23:44 -07:00
..
ena_admin_defs.h net: ena: add MAX_QUEUES_EXT get feature admin command 2019-06-12 11:23:44 -07:00
ena_com.c net: ena: add MAX_QUEUES_EXT get feature admin command 2019-06-12 11:23:44 -07:00
ena_com.h net: ena: add MAX_QUEUES_EXT get feature admin command 2019-06-12 11:23:44 -07:00
ena_common_defs.h net: ena: complete host info to match latest ENA spec 2018-10-11 10:13:50 -07:00
ena_eth_com.c net: ena: add handling of llq max tx burst size 2019-06-03 13:30:38 -07:00
ena_eth_com.h net: ena: optimise calculations for CQ doorbell 2019-06-03 13:30:38 -07:00
ena_eth_io_defs.h net: ena: fix indentations in ena_defs for better readability 2018-10-11 10:13:51 -07:00
ena_ethtool.c net: ena: allow queue allocation backoff when low on memory 2019-06-12 11:23:44 -07:00
ena_netdev.c net: ena: allow queue allocation backoff when low on memory 2019-06-12 11:23:44 -07:00
ena_netdev.h net: ena: allow queue allocation backoff when low on memory 2019-06-12 11:23:44 -07:00
ena_pci_id_tbl.h
ena_regs_defs.h net: ena: fix indentations in ena_defs for better readability 2018-10-11 10:13:51 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00