|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] netfront: make req_prod check properly deal with index wraps
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1525335399 -7200
# Thu May 03 10:16:39 2018 +0200
# Node ID bd81621b04afff0f403d1701970d12ebf05eccb1
# Parent f8a110b3f989066e9b987739323c427a030efd45
netfront: make req_prod check properly deal with index wraps
Using > on bare ring indexes is always wrong, as this will fail when the
indexes wrap. Since the private req_prod_pvt is never behind the shared
req_prod, simply use != here.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
diff -r f8a110b3f989 -r bd81621b04af drivers/xen/netfront/netfront.c
--- a/drivers/xen/netfront/netfront.c Thu May 03 10:15:19 2018 +0200
+++ b/drivers/xen/netfront/netfront.c Thu May 03 10:16:39 2018 +0200
@@ -775,7 +775,7 @@ no_skb:
/* Is the batch large enough to be worthwhile? */
if (i < (np->rx_target/2)) {
- if (req_prod > np->rx.sring->req_prod)
+ if (req_prod != np->rx.sring->req_prod)
goto push;
return;
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |