public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] NetworkPkg/Library/DxeHttpIoLib: Http boot failure with no initializes timeout value.
@ 2021-01-15  6:22 GregX Yeh
  2021-01-20  9:43 ` [edk2-devel] " Siyuan, Fu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: GregX Yeh @ 2021-01-15  6:22 UTC (permalink / raw)
  To: devel; +Cc: Maciej Rabeda, Jiaxin Wu, Siyuan Fu

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>
---
 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.<BR>
+# Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.<BR>
 # (C) Copyright 2015-2020 Hewlett Packard Enterprise Development LP<BR>
 #
 # 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH] NetworkPkg/Library/DxeHttpIoLib: Http boot failure with no initializes timeout value.
  2021-01-15  6:22 [PATCH] NetworkPkg/Library/DxeHttpIoLib: Http boot failure with no initializes timeout value GregX Yeh
@ 2021-01-20  9:43 ` Siyuan, Fu
  2021-01-20 11:54 ` Maciej Rabeda
       [not found] ` <165BEEA0E105E3C7.2239@groups.io>
  2 siblings, 0 replies; 4+ messages in thread
From: Siyuan, Fu @ 2021-01-20  9:43 UTC (permalink / raw)
  To: devel@edk2.groups.io, Yeh, GregX; +Cc: Maciej Rabeda, Wu, Jiaxin

This seems good with me. 

Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yeh, GregX
> Sent: 2021年1月15日 14:23
> To: devel@edk2.groups.io
> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>; Wu, Jiaxin
> <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>
> Subject: [edk2-devel] [PATCH] NetworkPkg/Library/DxeHttpIoLib: Http boot
> failure with no initializes timeout value.
> 
> 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>
> ---
>  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.<BR>
> +# Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.<BR>
>  # (C) Copyright 2015-2020 Hewlett Packard Enterprise Development LP<BR>
>  #
>  # 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|UINT3
> 2|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
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH] NetworkPkg/Library/DxeHttpIoLib: Http boot failure with no initializes timeout value.
  2021-01-15  6:22 [PATCH] NetworkPkg/Library/DxeHttpIoLib: Http boot failure with no initializes timeout value GregX Yeh
  2021-01-20  9:43 ` [edk2-devel] " Siyuan, Fu
@ 2021-01-20 11:54 ` Maciej Rabeda
       [not found] ` <165BEEA0E105E3C7.2239@groups.io>
  2 siblings, 0 replies; 4+ messages in thread
From: Maciej Rabeda @ 2021-01-20 11:54 UTC (permalink / raw)
  To: devel, gregx.yeh; +Cc: Jiaxin Wu, Siyuan Fu

Thanks for the patch!

Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>

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 <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>
> ---
>   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.<BR>
> +# Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.<BR>
>   # (C) Copyright 2015-2020 Hewlett Packard Enterprise Development LP<BR>
>   #
>   # 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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH] NetworkPkg/Library/DxeHttpIoLib: Http boot failure with no initializes timeout value.
       [not found] ` <165BEEA0E105E3C7.2239@groups.io>
@ 2021-01-20 12:40   ` Maciej Rabeda
  0 siblings, 0 replies; 4+ messages in thread
From: Maciej Rabeda @ 2021-01-20 12:40 UTC (permalink / raw)
  To: devel, gregx.yeh; +Cc: Jiaxin Wu, Siyuan Fu

Patch merged.
PR: https://github.com/tianocore/edk2/pull/1371
Commit: 
https://github.com/tianocore/edk2/commit/ca272b9513a6de5772e6e8ef5bbecd2e23cf9fb3

On 20-Jan-21 12:54, Maciej Rabeda wrote:
> Thanks for the patch!
>
> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
>
> 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 <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>
>> ---
>>   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.<BR>
>> +# Copyright (c) 2009 - 2021, Intel Corporation. All rights 
>> reserved.<BR>
>>   # (C) Copyright 2015-2020 Hewlett Packard Enterprise Development 
>> LP<BR>
>>   #
>>   # 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.
>
>
>
> 
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-20 12:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-15  6:22 [PATCH] NetworkPkg/Library/DxeHttpIoLib: Http boot failure with no initializes timeout value GregX Yeh
2021-01-20  9:43 ` [edk2-devel] " Siyuan, Fu
2021-01-20 11:54 ` Maciej Rabeda
     [not found] ` <165BEEA0E105E3C7.2239@groups.io>
2021-01-20 12:40   ` Maciej Rabeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox