Improve PXE Over IPv4 performance:

1. Stop UdpWrite instance upon return from EfiPxeBcUdpWrite() to avoid mass pkgs enqueue to this useless instance in Udp layer.
2. Enhance Udp timeout logic to prevent the worst case happen, and set PxeUdp instance to 50ms to avoid enqueue mass pkgs in background.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10861 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
hhuan13
2010-09-09 09:30:19 +00:00
parent f3e699088b
commit 2e4c2a049b
3 changed files with 18 additions and 14 deletions

View File

@@ -1407,20 +1407,20 @@ EfiPxeBcUdpWrite (
if (SrcPort != NULL) {
Private->CurrentUdpSrcPort = *SrcPort;
}
Status = PxeBcConfigureUdpWriteInstance (
Udp4,
&Private->StationIp.v4,
&Private->SubnetMask.v4,
&Private->GatewayIp.v4,
&Private->CurrentUdpSrcPort
);
if (EFI_ERROR (Status)) {
Private->CurrentUdpSrcPort = 0;
return EFI_INVALID_PARAMETER;
}
}
Status = PxeBcConfigureUdpWriteInstance (
Udp4,
&Private->StationIp.v4,
&Private->SubnetMask.v4,
&Private->GatewayIp.v4,
&Private->CurrentUdpSrcPort
);
if (EFI_ERROR (Status)) {
Private->CurrentUdpSrcPort = 0;
return EFI_INVALID_PARAMETER;
}
ZeroMem (&Token, sizeof (EFI_UDP4_COMPLETION_TOKEN));
ZeroMem (&Udp4Session, sizeof (EFI_UDP4_SESSION_DATA));
@@ -1492,6 +1492,10 @@ ON_EXIT:
FreePool (Udp4TxData);
//
// Reset the instance.
//
Udp4->Configure (Udp4, NULL);
return Status;
}