net/ena: limit refill threshold by fixed value
authorMichal Krawczyk <mk@semihalf.com>
Wed, 8 Apr 2020 08:29:16 +0000 (10:29 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:07 +0000 (13:57 +0200)
commit7755060798de9c0146df8809926030ed47fc9086
tree5734a3faaf52e0d6eac3fe721fe516e818d50c1b
parent74456796e0c3524d66e2d2bd73c2e95b7c52ddf2
net/ena: limit refill threshold by fixed value

Divider used for both Tx and Rx cleanup/refill threshold can cause too
big delay in case of the really big rings - for example if the 8k Rx
ring will be used, the refill won't trigger unless 1024 threshold will
be reached. It will also cause driver to try to allocate that much
descriptors.

Limiting it by fixed value - 256 in that case, would limit maximum
time spent in repopulate function.

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
drivers/net/ena/ena_ethdev.c
drivers/net/ena/ena_ethdev.h