]> git.baikalelectronics.ru Git - kernel.git/commit
net: ena: Fix bug where ring allocation backoff stopped too late
authorSameeh Jubran <sameehj@amazon.com>
Sun, 23 Jun 2019 07:11:10 +0000 (10:11 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Jun 2019 15:39:08 +0000 (08:39 -0700)
commit6b4a712e2de018285b2b2b0c9e353c45486cf23f
tree6864df988175e9b6007b7ca890727843d2da160f
parent49f286c4d43ea5d895b69946ea846c0b5528e74b
net: ena: Fix bug where ring allocation backoff stopped too late

The current code of create_queues_with_size_backoff() allows the ring size
to become as small as ENA_MIN_RING_SIZE/2. This is a bug since we don't
want the queue ring to be smaller than ENA_MIN_RING_SIZE

In this commit we change the loop's termination condition to look at the
queue size of the next iteration instead of that of the current one,
so that the minimal queue size again becomes ENA_MIN_RING_SIZE.

Fixes: 1de92492e88b ("net: ena: add ethtool function for changing io queue sizes")
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>
drivers/net/ethernet/amazon/ena/ena_netdev.c