net: aquantia: Introduce rx refill threshold value
authorIgor Russkikh <Igor.Russkikh@aquantia.com>
Sat, 23 Mar 2019 15:23:34 +0000 (15:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Mar 2019 02:16:53 +0000 (22:16 -0400)
commit9773ef18b83d8acc5862ea7e727d6e4d52846dd7
treed63bc6457458f5bc17b93e469ba70248defe7a31
parent46f4c29d9de6e4a9d4ed7de9a37dd42501d89f86
net: aquantia: Introduce rx refill threshold value

Before that, we've refilled ring even on single descriptor move.
Under high packet load that caused page allocation logic to be triggered
too often. That made overall ring processing slower.

Moreover, with page buffer reuse implemented, we should give a chance
higher networking levels to process received packets faster, release
the pages they consumed and therefore give a higher chance for these
pages to be reused.

RX ring is now refilled only when AQ_CFG_RX_REFILL_THRES or more
descriptors were processed (32 by default). Under regular traffic this
gives quite enough time for packet to be consumed and page to be reused.

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
drivers/net/ethernet/aquantia/atlantic/aq_ring.c