]> git.proxmox.com Git - mirror_edk2.git/commitdiff
DxeHttpIoLib: Http boot failure with no initializes timeout value.
authorGregX Yeh <gregx.yeh@intel.com>
Fri, 15 Jan 2021 06:22:56 +0000 (14:22 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 20 Jan 2021 12:33:38 +0000 (12:33 +0000)
https://bugzilla.tianocore.org/show_bug.cgi?id=3170
Using PcdHttpIoTimeout to set default timeout value to HttpIoLib.

Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: GregX Yeh <gregx.yeh@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.c
NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.inf
NetworkPkg/NetworkPkg.dec

index 67583fb2206bbd146ce980454716a450c851f202..04b01adec55ad02191683a0abc6c3ef03ce74ce3 100644 (file)
@@ -189,6 +189,7 @@ HttpIoCreateIo (
   HttpIo->Http        = Http;\r
   HttpIo->Callback    = Callback;\r
   HttpIo->Context     = Context;\r
+  HttpIo->Timeout     = PcdGet32 (PcdHttpIoTimeout);\r
 \r
   if (ConfigData != NULL) {\r
     if (HttpIo->IpVersion == IP_VERSION_4) {\r
index 25f5eb2ec69efa7e086def3a3a099f31472e18d0..347f8d5508c44109298449f01161c30a6a7a6e65 100644 (file)
@@ -43,3 +43,4 @@
 \r
 [Pcd]\r
   gEfiNetworkPkgTokenSpaceGuid.PcdMaxHttpChunkTransfer  ## SOMETIMES_CONSUMES\r
+  gEfiNetworkPkgTokenSpaceGuid.PcdHttpIoTimeout         ## SOMETIMES_CONSUMES\r
index 2d0d7fd2dce2d724fd1d8ded4ec5ebe1d77187d7..b81f10ef6ec0dbf47e2647ca4a9948c339976037 100644 (file)
@@ -3,7 +3,7 @@
 #\r
 # This package provides network modules that conform to UEFI 2.4 specification.\r
 #\r
-# Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.<BR>\r
 # (C) Copyright 2015-2020 Hewlett Packard Enterprise Development LP<BR>\r
 #\r
 # SPDX-License-Identifier: BSD-2-Clause-Patent\r
   # @Prompt Max size of total HTTP chunk transfer. the default value is 12MB.\r
   gEfiNetworkPkgTokenSpaceGuid.PcdMaxHttpChunkTransfer|0x0C00000|UINT32|0x0000000E\r
 \r
+  ## The Timeout value of HTTP IO.\r
+  # @Prompt The Timeout value of HTTP Io. Default value is 5000.\r
+  gEfiNetworkPkgTokenSpaceGuid.PcdHttpIoTimeout|5000|UINT32|0x0000000F\r
+\r
 [PcdsFixedAtBuild, PcdsPatchableInModule]\r
   ## Indicates whether HTTP connections (i.e., unsecured) are permitted or not.\r
   # TRUE  - HTTP connections are allowed. Both the "https://" and "http://" URI schemes are permitted.\r