net: stmmac: don't stop NAPI processing when dropping a packet
authorAaro Koskinen <aaro.koskinen@nokia.com>
Wed, 27 Mar 2019 20:35:37 +0000 (22:35 +0200)
committerJianxin Pan <jianxin.pan@amlogic.com>
Thu, 31 Oct 2019 10:34:15 +0000 (03:34 -0700)
commit62c3eb17e31f9d9eb6d2f609b6bf845d06597612
tree2c5e47b1357a7a4b183388df1fc33af7a623f931
parentd135a9a520336c5ae0f1b5ae9b805e4e82110ed9
net: stmmac: don't stop NAPI processing when dropping a packet

PD#TV-11316

[ Upstream commit 07b3975352374c3f5ebb4a42ef0b253fe370542d ]

Currently, if we drop a packet, we exit from NAPI loop before the budget
is consumed. In some situations this will make the RX processing stall
e.g. when flood pinging the system with oversized packets, as the
errorneous packets are not dropped efficiently.

If we drop a packet, we should just continue to the next one as long as
the budget allows.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Change-Id: Ib13615c2e413af86519c1cec0a6638b88ceaf4de
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c