[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH xenvif 2/5] Make sure event counter is updated before finish receiver ring poll
There was a flaw in commit 5932938b "Don't bump the receiver event counter if the poller is going to retry" in that it is possible to drop out of poll without ever updating the event counter (if one attempt requests a retry and the next attempt finds nothing to do). This patch fixes the issue by using the RING_FINAL_CHECK_FOR_RESPONSES macro to update the event counter, which checks for a race with new responses. Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> --- src/xenvif/receiver.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/xenvif/receiver.c b/src/xenvif/receiver.c index 1f64fab..3ee5a06 100644 --- a/src/xenvif/receiver.c +++ b/src/xenvif/receiver.c @@ -1969,8 +1969,13 @@ ReceiverRingPoll( KeMemoryBarrier(); - if (rsp_cons == rsp_prod) - break; + if (rsp_cons == rsp_prod) { + RING_IDX WorkToDo; + + RING_FINAL_CHECK_FOR_RESPONSES(&Ring->Front, WorkToDo); + if (!WorkToDo) + break; + } while (rsp_cons != rsp_prod && !Retry) { netif_rx_response_t *rsp; @@ -2156,9 +2161,6 @@ ReceiverRingPoll( KeMemoryBarrier(); Ring->Front.rsp_cons = rsp_cons; - if (!Retry) - Ring->Shared->rsp_event = rsp_cons + 1; - } if (!__ReceiverRingIsStopped(Ring)) -- 2.5.3 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |