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)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 19 Jun 2019 22:16:58 +0000 (23:16 +0100)
commita6d85ec79dff0210070b219e506a908bc9d0ed9c
tree5e3e39a8c78f3f8e368ce4994633316a05a05ef0
parent25621860a928ea6e246e1dd68a430f0fb06775e3
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>
Gbp-Pq: Topic features/all/ena
Gbp-Pq: Name 0009-net-ena-limit-refill-Rx-threshold-to-256-to-avoid-la.patch
drivers/net/ethernet/amazon/ena/ena_netdev.c
drivers/net/ethernet/amazon/ena/ena_netdev.h