]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gve: Fixes for napi_poll when budget is 0
authorZiwei Xiao <ziweixiao@google.com>
Tue, 14 Nov 2023 00:41:44 +0000 (16:41 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:14:56 +0000 (17:14 +0000)
commita533c9763c3f8d568c8cb6785167b7be8b09de61
tree2b963bd0fda22a08be8f154f0a7e75905e2408e4
parentcb9e4507cca7b26aae3a12213ae51bb26ee79b28
gve: Fixes for napi_poll when budget is 0

[ Upstream commit 278a370c1766060d2144d6cf0b06c101e1043b6d ]

Netpoll will explicilty pass the polling call with a budget of 0 to
indicate it's clearing the Tx path only. For the gve_rx_poll and
gve_xdp_poll, they were mistakenly taking the 0 budget as the indication
to do all the work. Add check to avoid the rx path and xdp path being
called when budget is 0. And also avoid napi_complete_done being called
when budget is 0 for netpoll.

Fixes: f5cedc84a30d ("gve: Add transmit and receive support")
Signed-off-by: Ziwei Xiao <ziweixiao@google.com>
Link: https://lore.kernel.org/r/20231114004144.2022268-1-ziweixiao@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/google/gve/gve_main.c
drivers/net/ethernet/google/gve/gve_rx.c
drivers/net/ethernet/google/gve/gve_tx.c