If we are trying to post fragments into the ring and find it full then
do a single poll to try to free up the space, rather than bailing and
waiting for the DPC to run.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
)
{
PXENVIF_TRANSMITTER_STATE State;
+ BOOLEAN Polled;
- if(!Ring->Enabled || Ring->Stopped)
+ if(!Ring->Enabled)
return;
State = &Ring->State;
+ Polled = FALSE;
- for (;;) {
+ while (!Ring->Stopped) {
NTSTATUS status;
if (State->Count != 0) {
status = __TransmitterRingPostFragments(Ring);
- if (!NT_SUCCESS(status)) {
+ if (!NT_SUCCESS(status))
Ring->Stopped = TRUE;
- break;
+ }
+
+ if (Ring->Stopped) {
+ if (!Polled) {
+ (VOID) TransmitterRingPoll(Ring);
+ Polled = TRUE;
}
+
+ continue;
}
if (Ring->RequestsPosted - Ring->RequestsPushed >=