summaryrefslogtreecommitdiffstats
path: root/arch/um/drivers
diff options
context:
space:
mode:
authorAnton Ivanov <anton.ivanov@cambridgegreys.com>2024-07-06 11:12:00 +0200
committerRichard Weinberger <richard@nod.at>2024-09-12 20:09:41 +0200
commit671cd5eed9db3415b42826747114a330bc303ae9 (patch)
tree6fa2fff79dd1a0eb9e1a58d5c358063d2c97b43d /arch/um/drivers
parentum: vector: Replace locks guarding queue depth with atomics (diff)
downloadlinux-671cd5eed9db3415b42826747114a330bc303ae9.tar.xz
linux-671cd5eed9db3415b42826747114a330bc303ae9.zip
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>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r--arch/um/drivers/vector_kern.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index 0d7e7a25b674..c992da83268d 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -966,7 +966,7 @@ static int vector_mmsg_rx(struct vector_private *vp, int budget)
budget = qi->max_depth;
packet_count = uml_vector_recvmmsg(
- vp->fds->rx_fd, qi->mmsg_vector, qi->max_depth, 0);
+ vp->fds->rx_fd, qi->mmsg_vector, budget, 0);
if (packet_count < 0)
vp->in_error = true;
@@ -1180,7 +1180,7 @@ static int vector_poll(struct napi_struct *napi, int budget)
if (tx_enqueued || err > 0)
napi_schedule(napi);
- if (work_done < budget)
+ if (work_done <= budget)
napi_complete_done(napi, work_done);
return work_done;
}