net: ena: limit refill Rx threshold to 256 to avoid latency issues
authorArthur Kiyanovski <akiyano@amazon.com>
Thu, 11 Oct 2018 08:26:23 +0000 (11:26 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Oct 2018 17:13:51 +0000 (10:13 -0700)
commit0574bb806dad29a3dada0ee42b01645477d48282
tree90ca00914c5a65cb39a81bb496f9c22dee112ba7
parentbd791175a6432d24fc5d7b348304276027372545
net: ena: limit refill Rx threshold to 256 to avoid latency issues

Currently Rx refill is done when the number of required descriptors is
above 1/8 queue size. With a default of 1024 entries per queue the
threshold is 128 descriptors.
There is intention to increase the queue size to 8196 entries.
In this case threshold of 1024 descriptors is too large and can hurt
latency.
Add another limitation to Rx threshold to be at most 256 descriptors.

Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_netdev.c
drivers/net/ethernet/amazon/ena/ena_netdev.h