From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.26874.1611143666182837748 for ; Wed, 20 Jan 2021 03:54:26 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: linux.intel.com, ip: 134.134.136.31, mailfrom: maciej.rabeda@linux.intel.com) IronPort-SDR: pBBkHBVqbh0AcuCzvYJ3TOC5ls+F5GcvLLkSp1hOWC5wjE8mzRV5sVIChOoTkpInedq7v8ug6G R2BLyCdhuFyQ== X-IronPort-AV: E=McAfee;i="6000,8403,9869"; a="240629783" X-IronPort-AV: E=Sophos;i="5.79,361,1602572400"; d="scan'208";a="240629783" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2021 03:54:24 -0800 IronPort-SDR: pVPYcf2WQRzCRDzirUk0V02y4kdrVdfwi+uIFIOr7L0Pi5IjJzAO7v5zhCuvU5kdqoy5FlOwFC wkHm74s9lnFA== X-IronPort-AV: E=Sophos;i="5.79,361,1602572400"; d="scan'208";a="426870398" Received: from mrabeda-mobl.ger.corp.intel.com (HELO [10.249.156.97]) ([10.249.156.97]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2021 03:54:23 -0800 Subject: Re: [edk2-devel] [PATCH] NetworkPkg/Library/DxeHttpIoLib: Http boot failure with no initializes timeout value. To: devel@edk2.groups.io, gregx.yeh@intel.com Cc: Jiaxin Wu , Siyuan Fu References: <20210115062256.17672-1-gregx.yeh@intel.com> From: "Maciej Rabeda" Message-ID: <4bb4ebdc-b3a0-349e-644c-9d9819ae217d@linux.intel.com> Date: Wed, 20 Jan 2021 12:54:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <20210115062256.17672-1-gregx.yeh@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: pl Thanks for the patch! Reviewed-by: Maciej Rabeda On 15-Jan-21 07:22, GregX Yeh wrote: > 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.