From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.545.1610691793824655386 for ; Thu, 14 Jan 2021 22:23:13 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: gregx.yeh@intel.com) IronPort-SDR: jl0Z+YUDjsicCObNgYQ93OK+9AgVZM3zAiLJczRYuf/zDecqr0izO86S3CdhCgt1n2nKJAa67t yl0FajciJyZw== X-IronPort-AV: E=McAfee;i="6000,8403,9864"; a="177726874" X-IronPort-AV: E=Sophos;i="5.79,348,1602572400"; d="scan'208";a="177726874" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2021 22:23:10 -0800 IronPort-SDR: 2fauLtDcqUhx4LbDmh7+tVYrUnY2jdw4XOXvNrA+g+Rlm9z+Cl3QanFogTR2zhRqkKkd1tZQGz WYZjPKCm1JGA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,348,1602572400"; d="scan'208";a="568391974" Received: from chinghux-desk1.gar.corp.intel.com ([10.5.215.141]) by orsmga005.jf.intel.com with ESMTP; 14 Jan 2021 22:23:08 -0800 From: "GregX Yeh" To: devel@edk2.groups.io Cc: Maciej Rabeda , Jiaxin Wu , Siyuan Fu Subject: [PATCH] NetworkPkg/Library/DxeHttpIoLib: Http boot failure with no initializes timeout value. Date: Fri, 15 Jan 2021 14:22:56 +0800 Message-Id: <20210115062256.17672-1-gregx.yeh@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 https://bugzilla.tianocore.org/show_bug.cgi?id=3170 Using PcdHttpIoTimeout to set default timeout value to HttpIoLib. Cc: Maciej Rabeda Cc: Jiaxin Wu Cc: Siyuan Fu Signed-off-by: GregX Yeh --- NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.c | 1 + NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.inf | 1 + NetworkPkg/NetworkPkg.dec | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.c b/NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.c index 67583fb220..04b01adec5 100644 --- a/NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.c +++ b/NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.c @@ -189,6 +189,7 @@ HttpIoCreateIo ( HttpIo->Http = Http; HttpIo->Callback = Callback; HttpIo->Context = Context; + HttpIo->Timeout = PcdGet32 (PcdHttpIoTimeout); if (ConfigData != NULL) { if (HttpIo->IpVersion == IP_VERSION_4) { diff --git a/NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.inf b/NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.inf index 25f5eb2ec6..347f8d5508 100644 --- a/NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.inf +++ b/NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.inf @@ -43,3 +43,4 @@ [Pcd] gEfiNetworkPkgTokenSpaceGuid.PcdMaxHttpChunkTransfer ## SOMETIMES_CONSUMES + gEfiNetworkPkgTokenSpaceGuid.PcdHttpIoTimeout ## SOMETIMES_CONSUMES diff --git a/NetworkPkg/NetworkPkg.dec b/NetworkPkg/NetworkPkg.dec index 2d0d7fd2dc..87725674e9 100644 --- a/NetworkPkg/NetworkPkg.dec +++ b/NetworkPkg/NetworkPkg.dec @@ -3,7 +3,7 @@ # # This package provides network modules that conform to UEFI 2.4 specification. # -# Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.
# (C) Copyright 2015-2020 Hewlett Packard Enterprise Development LP
# # SPDX-License-Identifier: BSD-2-Clause-Patent @@ -96,6 +96,10 @@ ## The maximum size of total HTTP chunk transfer. # @Prompt Max size of total HTTP chunk transfer. the default value is 12MB. gEfiNetworkPkgTokenSpaceGuid.PcdMaxHttpChunkTransfer|0x0C00000|UINT32|0x0000000E + + ## The Timeout value of HTTP IO. + # @Prompt The Timeout value of HTTP Io. Default value is 5000. + gEfiNetworkPkgTokenSpaceGuid.PcdHttpIoTimeout|5000|UINT32|0x0000000F [PcdsFixedAtBuild, PcdsPatchableInModule] ## Indicates whether HTTP connections (i.e., unsecured) are permitted or not. -- 2.16.2.windows.1