diff options
author | Heng Luo <heng.luo@intel.com> | 2022-04-03 14:14:10 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-04-11 15:12:46 +0000 |
commit | 35a4b63247cb4e42f3484dcf2b45ce9a4360596e (patch) | |
tree | 7aca461e11c1a24bb0a029270e6a8f9667f896f7 /NetworkPkg/HttpDxe | |
parent | dab96cf02e3be378310dd1bce119b0fac6fac958 (diff) | |
download | edk2-35a4b63247cb4e42f3484dcf2b45ce9a4360596e.tar.gz edk2-35a4b63247cb4e42f3484dcf2b45ce9a4360596e.tar.bz2 edk2-35a4b63247cb4e42f3484dcf2b45ce9a4360596e.zip |
NetworkPkg: Add PCDs for HTTP DNS RetryCount and RetryInterval
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3889
Currently the HTTP DNS Retry Interval is 2 second and no retry attempt.
If DNS response can't arrive in 2 second, the DNS request is failed,
and then HTTP boot is failed.
In order to resolve this issue, Add PCDs to support RetryCount
and RetryInterval configured in Platform.
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Signed-off-by: Heng Luo <heng.luo@intel.com>
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Diffstat (limited to 'NetworkPkg/HttpDxe')
-rw-r--r-- | NetworkPkg/HttpDxe/HttpDns.c | 4 | ||||
-rw-r--r-- | NetworkPkg/HttpDxe/HttpDxe.inf | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/NetworkPkg/HttpDxe/HttpDns.c b/NetworkPkg/HttpDxe/HttpDns.c index 59a2784e6a..13cbde0f34 100644 --- a/NetworkPkg/HttpDxe/HttpDns.c +++ b/NetworkPkg/HttpDxe/HttpDns.c @@ -108,6 +108,8 @@ HttpDns4 ( Dns4CfgData.DnsServerListCount = DnsServerListCount;
Dns4CfgData.DnsServerList = DnsServerList;
Dns4CfgData.UseDefaultSetting = HttpInstance->IPv4Node.UseDefaultAddress;
+ Dns4CfgData.RetryInterval = PcdGet32 (PcdHttpDnsRetryInterval);
+ Dns4CfgData.RetryCount = PcdGet32 (PcdHttpDnsRetryCount);
if (!Dns4CfgData.UseDefaultSetting) {
IP4_COPY_ADDRESS (&Dns4CfgData.StationIp, &HttpInstance->IPv4Node.LocalAddress);
IP4_COPY_ADDRESS (&Dns4CfgData.SubnetMask, &HttpInstance->IPv4Node.LocalSubnet);
@@ -315,6 +317,8 @@ HttpDns6 ( Dns6ConfigData.DnsServerList = DnsServerList;
Dns6ConfigData.EnableDnsCache = TRUE;
Dns6ConfigData.Protocol = EFI_IP_PROTO_UDP;
+ Dns6ConfigData.RetryInterval = PcdGet32 (PcdHttpDnsRetryInterval);
+ Dns6ConfigData.RetryCount = PcdGet32 (PcdHttpDnsRetryCount);
IP6_COPY_ADDRESS (&Dns6ConfigData.StationIp, &HttpInstance->Ipv6Node.LocalAddress);
Status = Dns6->Configure (
Dns6,
diff --git a/NetworkPkg/HttpDxe/HttpDxe.inf b/NetworkPkg/HttpDxe/HttpDxe.inf index af681c0184..c9502d0bb6 100644 --- a/NetworkPkg/HttpDxe/HttpDxe.inf +++ b/NetworkPkg/HttpDxe/HttpDxe.inf @@ -75,6 +75,8 @@ [Pcd]
gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections ## CONSUMES
gEfiNetworkPkgTokenSpaceGuid.PcdHttpIoTimeout ## CONSUMES
+ gEfiNetworkPkgTokenSpaceGuid.PcdHttpDnsRetryInterval ## CONSUMES
+ gEfiNetworkPkgTokenSpaceGuid.PcdHttpDnsRetryCount ## CONSUMES
[UserExtensions.TianoCore."ExtraFiles"]
HttpDxeExtra.uni
|