]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 13 Nov 2019 17:07:40 +0000 (18:07 +0100)
commit246b1dd67def35982f651e62e1e47afa175361ad
treec37a093a28122975c31e4b46b63be90e0bd1100a
parent53a5d21bf4196c1d3ac705b50536c3e0368b489c
net: ena: Fix bug where ring allocation backoff stopped too late

BugLink: https://bugs.launchpad.net/bugs/1850175
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: eece4d2ab9d2 ("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>
(cherry picked from commit 3e5bfb189e1a65df132fd0e3fa00fbb6feec1431)
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Khaled Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/amazon/ena/ena_netdev.c