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)
committerzihuan.ling <zihuan.ling@amlogic.com>
Fri, 1 Nov 2019 10:53:08 +0000 (18:53 +0800)
commit7cdf81e92ac936b8da69a41ead7c77c27f5a7f20
treead7129a9a7b7a09a527103765b93ff1194572692
parentaf6626a8c62b88e62cd449b83217c5ba77b06293
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>
Signed-off-by: zihuan.ling <zihuan.ling@amlogic.com>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c