changing UDP default timeout value to 2s to improve PXE BC boot performance.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10282 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2010-03-18 11:35:35 +00:00
parent 8e38f18ef7
commit 7bc01e86d9
3 changed files with 15 additions and 14 deletions

View File

@ -348,7 +348,7 @@ PxeBcDriverBindingStart (
Private->Udp4CfgData.TypeOfService = DEFAULT_ToS; Private->Udp4CfgData.TypeOfService = DEFAULT_ToS;
Private->Udp4CfgData.TimeToLive = DEFAULT_TTL; Private->Udp4CfgData.TimeToLive = DEFAULT_TTL;
Private->Udp4CfgData.DoNotFragment = FALSE; Private->Udp4CfgData.DoNotFragment = FALSE;
Private->Udp4CfgData.ReceiveTimeout = 50000; // 50 milliseconds Private->Udp4CfgData.ReceiveTimeout = PXEBC_DEFAULT_LIFETIME;
Private->Udp4CfgData.UseDefaultAddress = FALSE; Private->Udp4CfgData.UseDefaultAddress = FALSE;
PxeBcInitSeedPacket (&Private->SeedPacket, Private->Udp4Read); PxeBcInitSeedPacket (&Private->SeedPacket, Private->Udp4Read);

View File

@ -52,6 +52,7 @@ typedef struct _PXEBC_PRIVATE_DATA PXEBC_PRIVATE_DATA;
#define PXEBC_DEFAULT_UDP_OVERHEAD_SIZE 8 #define PXEBC_DEFAULT_UDP_OVERHEAD_SIZE 8
#define PXEBC_DEFAULT_TFTP_OVERHEAD_SIZE 4 #define PXEBC_DEFAULT_TFTP_OVERHEAD_SIZE 4
#define PXEBC_DEFAULT_PACKET_SIZE 1480 #define PXEBC_DEFAULT_PACKET_SIZE 1480
#define PXEBC_DEFAULT_LIFETIME 2000000 // 2 seconds, unit is microsecond
struct _PXEBC_PRIVATE_DATA { struct _PXEBC_PRIVATE_DATA {
UINT32 Signature; UINT32 Signature;

View File

@ -194,7 +194,7 @@ PxeBcConfigureUdpWriteInstance (
ZeroMem (&Udp4CfgData, sizeof (Udp4CfgData)); ZeroMem (&Udp4CfgData, sizeof (Udp4CfgData));
Udp4CfgData.ReceiveTimeout = 1000; Udp4CfgData.ReceiveTimeout = PXEBC_DEFAULT_LIFETIME;
Udp4CfgData.TypeOfService = DEFAULT_ToS; Udp4CfgData.TypeOfService = DEFAULT_ToS;
Udp4CfgData.TimeToLive = DEFAULT_TTL; Udp4CfgData.TimeToLive = DEFAULT_TTL;
Udp4CfgData.AllowDuplicatePort = TRUE; Udp4CfgData.AllowDuplicatePort = TRUE;