Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

um: vector: Fix NAPI budget handling

Fix the handling of NAPI budget.

Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>

authored by

Anton Ivanov and committed by
Richard Weinberger
671cd5ee 612a8c8e

+2 -2
+2 -2
arch/um/drivers/vector_kern.c
··· 966 966 budget = qi->max_depth; 967 967 968 968 packet_count = uml_vector_recvmmsg( 969 - vp->fds->rx_fd, qi->mmsg_vector, qi->max_depth, 0); 969 + vp->fds->rx_fd, qi->mmsg_vector, budget, 0); 970 970 971 971 if (packet_count < 0) 972 972 vp->in_error = true; ··· 1180 1180 1181 1181 if (tx_enqueued || err > 0) 1182 1182 napi_schedule(napi); 1183 - if (work_done < budget) 1183 + if (work_done <= budget) 1184 1184 napi_complete_done(napi, work_done); 1185 1185 return work_done; 1186 1186 }