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@citrix.com>
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;
KeMemoryBarrier();
Ring->Front.rsp_cons = rsp_cons;
- if (!Retry)
- Ring->Shared->rsp_event = rsp_cons + 1;
-
}
if (!__ReceiverRingIsStopped(Ring))