r8169: improve rtl_rx
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 6 Dec 2020 00:00:07 +0000 (01:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 6 Dec 2020 00:29:21 +0000 (16:29 -0800)
commit2f53e9d7bc517cc296eefb7f7d3e2697428ab408
tree8ccf8fe66fa29f666d08194a4ecd841ae06e6db3
parent00649542f1ba1cc60759eb56f4675bf72ef3d999
r8169: improve rtl_rx

There's no need to check min(budget, NUM_RX_DESC). At first budget
(NAPI_POLL_WEIGHT = 64) is less then NUM_RX_DESC (256).
And more important: Even in case of budget > NUM_RX_DESC we could
safely continue processing descriptors as long as they are owned by
the CPU. In addition replace rx_left with a normal counter variable,
this allows to simplify the code. Last but not least there's no need
any longer to pass the budget as an u32.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c