Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2019-05-15 Thread Laszlo Ersek
On 05/15/19 09:02, Zhang, Shenglei wrote:
> Hi Laszlo:
> 
>> -Original Message-
>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>> Laszlo Ersek
>> Sent: Tuesday, May 14, 2019 9:49 PM
>> To: devel@edk2.groups.io; Zhang, Shenglei 
>> Cc: Justen, Jordan L ; Ard Biesheuvel
>> ; Anthony Perard ;
>> Julien Grall 
>> Subject: Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use
>> NetworkPkg's include fragment file.

>> (4) Therefore, please *prepend* a patch to this series that eliminates
>> the [LibraryClasses.common.DXE_DRIVER] resolutions altogether, at first.
> 
> Thanks for your comments!
> I'll send a patch first to solve the duplicated library classes about network 
> in
> [LibraryClasses.common.DXE_DRIVER] section.

Thanks for that, I'll review it soon.

>> (6) Please be consistent with the comments that you add near the
>> !include directives. In the current patch, you add comments for the libs
>> and the PCDs, but not for the defines or the components. Please stick
>> with one style -- either add zero comments, or add comments on all of
>> the !includes.
> 
> Actually, for components I add "Network Support" in the comments, which looks 
> like
> aligning with nearby components. Do you thinks it is acceptable?

Sorry, I missed the pre-existent comment there, and the fact that you
were preserving the comment.

So yes, that is fine -- as long as all !include directives uniformly
have a comment (newly added, or inherited from preexistent code), it's OK.

Please note however that your network *defines* !include still lacks a
comment! Please fix that, for consistency with the rest of the !include
directives.

Thanks
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40644): https://edk2.groups.io/g/devel/message/40644
Mute This Topic: https://groups.io/mt/31616136/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2019-05-15 Thread Zhang, Shenglei
Hi Laszlo:

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Laszlo Ersek
> Sent: Tuesday, May 14, 2019 9:49 PM
> To: devel@edk2.groups.io; Zhang, Shenglei 
> Cc: Justen, Jordan L ; Ard Biesheuvel
> ; Anthony Perard ;
> Julien Grall 
> Subject: Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use
> NetworkPkg's include fragment file.
> 
> On 05/14/19 09:39, Zhang, Shenglei wrote:
> > This patch updates the platform DSC/FDF files to use the include fragment
> > files provided by NetworkPkg.
> > The feature enabling flags in [Defines] section have been updated to use
> > the NetworkPkg's terms, and the value has been overridden with the
> original
> > default value on this platform.
> >
> > This patch also rename the TLS_ENABLE flag to PLATFORM_TLS_ENABLE for
> the
> > platform specific configuration for TLS support.
> 
> Originally I thought that would be the right approach. However, Liming
> explained that we don't need "PLATFORM_TLS_ENABLE", because the
> platform
> DSC can override [Components] entries that are included from
> "NetworkComponents.dsc.inc".
> 
> Please see:
> 
>   https://bugzilla.tianocore.org/show_bug.cgi?id=1449
>   http://mid.mail-
> archive.com/4A89E2EF3DFEDB4C8BFDE51014F606A14E443D46@SHSMSX104.c
> cr.corp.intel.com
> 
> ... Oh wait, this patch doesn't actually introduce PLATFORM_TLS_ENABLE!
> The patch could be correct in fact (I'll review it just below); however,
> the commit message is incorrect.
> 
> (1) Please remove the PLATFORM_TLS_ENABLE paragraph from the commit
> message.
> 
> 
> > Cc: Jordan Justen 
> > Cc: Laszlo Ersek 
> > Cc: Ard Biesheuvel 
> > Cc: Anthony Perard 
> > Cc: Julien Grall 
> > Signed-off-by: Shenglei Zhang 
> > ---
> >  OvmfPkg/OvmfPkgIa32.dsc| 70 +++--
> >  OvmfPkg/OvmfPkgIa32.fdf| 29 +---
> >  OvmfPkg/OvmfPkgIa32X64.dsc | 71 +++---
> >  OvmfPkg/OvmfPkgIa32X64.fdf | 29 +---
> >  OvmfPkg/OvmfPkgX64.dsc | 69 +++-
> >  OvmfPkg/OvmfPkgX64.fdf | 29 +---
> >  6 files changed, 65 insertions(+), 232 deletions(-)
> >
> > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> > index 36a0f87258..0977233b8b 100644
> > --- a/OvmfPkg/OvmfPkgIa32.dsc
> > +++ b/OvmfPkg/OvmfPkgIa32.dsc
> > @@ -29,14 +29,17 @@
> ># -D FLAG=VALUE
> >#
> >DEFINE SECURE_BOOT_ENABLE  = FALSE
> > -  DEFINE NETWORK_IP6_ENABLE  = FALSE
> > -  DEFINE HTTP_BOOT_ENABLE= FALSE
> >DEFINE SMM_REQUIRE = FALSE
> > -  DEFINE TLS_ENABLE  = FALSE
> >DEFINE TPM2_ENABLE = FALSE
> >DEFINE TPM2_CONFIG_ENABLE  = FALSE
> >DEFINE USE_LEGACY_ISA_STACK= FALSE
> >
> > +  DEFINE NETWORK_TLS_ENABLE = FALSE
> > +  DEFINE NETWORK_IP6_ENABLE = FALSE
> > +  DEFINE NETWORK_HTTP_BOOT_ENABLE   = FALSE
> > +
> 
> (2) You forgot:
> 
>   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
> 
> 
> > +!include NetworkPkg/NetworkDefines.dsc.inc
> > +
> >#
> ># Flash size selection. Setting FD_SIZE_IN_KB on the command line
> directly to
> ># one of the supported values, in place of any of the convenience macros,
> is
> > @@ -139,10 +142,6 @@
> 
> (3) Please update your git configuration so that the diff hunk headers
> (@@) show what section you are modifying, in the INF, DSC, DEC, and FDF
> files:
> 
> (3a) run the command
> 
>   $ git config diff.ini.xfuncname '^\[[A-Za-z0-9_., ]+]'
> 
> from
> <https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-
> git-guide-for-edk2-contributors-and-maintainers#contrib-05>.
> 
> (3b) implement the settings from
> <https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-
> git-guide-for-edk2-contributors-and-maintainers#contrib-09>.
> 
> 
> >FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
> >UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
> >
> SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementL
> ib/DxeSecurityManagementLib.inf
> > -  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
> > -  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
> > -  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
> > -  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
> >UefiUsbLib|MdePkg/Library/UefiUsbL

Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2019-05-14 Thread Laszlo Ersek
On 05/14/19 09:39, Zhang, Shenglei wrote:
> This patch updates the platform DSC/FDF files to use the include fragment
> files provided by NetworkPkg.
> The feature enabling flags in [Defines] section have been updated to use
> the NetworkPkg's terms, and the value has been overridden with the original
> default value on this platform.
>
> This patch also rename the TLS_ENABLE flag to PLATFORM_TLS_ENABLE for the
> platform specific configuration for TLS support.

Originally I thought that would be the right approach. However, Liming
explained that we don't need "PLATFORM_TLS_ENABLE", because the platform
DSC can override [Components] entries that are included from
"NetworkComponents.dsc.inc".

Please see:

  https://bugzilla.tianocore.org/show_bug.cgi?id=1449
  
4A89E2EF3DFEDB4C8BFDE51014F606A14E443D46@SHSMSX104.ccr.corp.intel.com">http://mid.mail-archive.com/4A89E2EF3DFEDB4C8BFDE51014F606A14E443D46@SHSMSX104.ccr.corp.intel.com

... Oh wait, this patch doesn't actually introduce PLATFORM_TLS_ENABLE!
The patch could be correct in fact (I'll review it just below); however,
the commit message is incorrect.

(1) Please remove the PLATFORM_TLS_ENABLE paragraph from the commit
message.


> Cc: Jordan Justen 
> Cc: Laszlo Ersek 
> Cc: Ard Biesheuvel 
> Cc: Anthony Perard 
> Cc: Julien Grall 
> Signed-off-by: Shenglei Zhang 
> ---
>  OvmfPkg/OvmfPkgIa32.dsc| 70 +++--
>  OvmfPkg/OvmfPkgIa32.fdf| 29 +---
>  OvmfPkg/OvmfPkgIa32X64.dsc | 71 +++---
>  OvmfPkg/OvmfPkgIa32X64.fdf | 29 +---
>  OvmfPkg/OvmfPkgX64.dsc | 69 +++-
>  OvmfPkg/OvmfPkgX64.fdf | 29 +---
>  6 files changed, 65 insertions(+), 232 deletions(-)
>
> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> index 36a0f87258..0977233b8b 100644
> --- a/OvmfPkg/OvmfPkgIa32.dsc
> +++ b/OvmfPkg/OvmfPkgIa32.dsc
> @@ -29,14 +29,17 @@
># -D FLAG=VALUE
>#
>DEFINE SECURE_BOOT_ENABLE  = FALSE
> -  DEFINE NETWORK_IP6_ENABLE  = FALSE
> -  DEFINE HTTP_BOOT_ENABLE= FALSE
>DEFINE SMM_REQUIRE = FALSE
> -  DEFINE TLS_ENABLE  = FALSE
>DEFINE TPM2_ENABLE = FALSE
>DEFINE TPM2_CONFIG_ENABLE  = FALSE
>DEFINE USE_LEGACY_ISA_STACK= FALSE
>
> +  DEFINE NETWORK_TLS_ENABLE = FALSE
> +  DEFINE NETWORK_IP6_ENABLE = FALSE
> +  DEFINE NETWORK_HTTP_BOOT_ENABLE   = FALSE
> +

(2) You forgot:

  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE


> +!include NetworkPkg/NetworkDefines.dsc.inc
> +
>#
># Flash size selection. Setting FD_SIZE_IN_KB on the command line directly 
> to
># one of the supported values, in place of any of the convenience macros, 
> is
> @@ -139,10 +142,6 @@

(3) Please update your git configuration so that the diff hunk headers
(@@) show what section you are modifying, in the INF, DSC, DEC, and FDF
files:

(3a) run the command

  $ git config diff.ini.xfuncname '^\[[A-Za-z0-9_., ]+]'

from
.

(3b) implement the settings from
.


>FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
>UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
>
> SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
> -  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
> -  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
> -  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
> -  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
>UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
>
> SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf
>QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf

Unfortunately, the OVMF DSC files have a small wart that should be fixed
up, before this patch.

Namely, the above library class resolutions are duplicated between
[LibraryClasses], and [LibraryClasses.common.DXE_DRIVER].

(4) Therefore, please *prepend* a patch to this series that eliminates
the [LibraryClasses.common.DXE_DRIVER] resolutions altogether, at first.


(5) You forgot to remove:

  TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf


> @@ -168,7 +167,7 @@
>
> DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
>
>IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
> -!if $(TLS_ENABLE) == TRUE
> +!if $(NETWORK_TLS_ENABLE) == TRUE
>OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
>  !else
>OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
> @@ -186,11 +185,12 @@
>
>

Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2019-05-14 Thread Liming Gao
Shenglei:
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Zhang, 
> Shenglei
> Sent: Tuesday, May 14, 2019 3:40 PM
> To: devel@edk2.groups.io
> Cc: Justen, Jordan L ; Laszlo Ersek 
> ; Ard Biesheuvel ;
> Anthony Perard ; Julien Grall 
> 
> Subject: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's 
> include fragment file.
> 
> This patch updates the platform DSC/FDF files to use the include fragment
> files provided by NetworkPkg.
> The feature enabling flags in [Defines] section have been updated to use
> the NetworkPkg's terms, and the value has been overridden with the original
> default value on this platform.
> 
> This patch also rename the TLS_ENABLE flag to PLATFORM_TLS_ENABLE for the
> platform specific configuration for TLS support.
> 
> Cc: Jordan Justen 
> Cc: Laszlo Ersek 
> Cc: Ard Biesheuvel 
> Cc: Anthony Perard 
> Cc: Julien Grall 
> Signed-off-by: Shenglei Zhang 
> ---
>  OvmfPkg/OvmfPkgIa32.dsc| 70 +++--
>  OvmfPkg/OvmfPkgIa32.fdf| 29 +---
>  OvmfPkg/OvmfPkgIa32X64.dsc | 71 +++---
>  OvmfPkg/OvmfPkgIa32X64.fdf | 29 +---
>  OvmfPkg/OvmfPkgX64.dsc | 69 +++-
>  OvmfPkg/OvmfPkgX64.fdf | 29 +---
>  6 files changed, 65 insertions(+), 232 deletions(-)
> 
> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> index 36a0f87258..0977233b8b 100644
> --- a/OvmfPkg/OvmfPkgIa32.dsc
> +++ b/OvmfPkg/OvmfPkgIa32.dsc
> @@ -29,14 +29,17 @@
># -D FLAG=VALUE
>#
>DEFINE SECURE_BOOT_ENABLE  = FALSE
> -  DEFINE NETWORK_IP6_ENABLE  = FALSE
> -  DEFINE HTTP_BOOT_ENABLE= FALSE
>DEFINE SMM_REQUIRE = FALSE
> -  DEFINE TLS_ENABLE  = FALSE
>DEFINE TPM2_ENABLE = FALSE
>DEFINE TPM2_CONFIG_ENABLE  = FALSE
>DEFINE USE_LEGACY_ISA_STACK= FALSE
> 
> +  DEFINE NETWORK_TLS_ENABLE = FALSE
> +  DEFINE NETWORK_IP6_ENABLE = FALSE
> +  DEFINE NETWORK_HTTP_BOOT_ENABLE   = FALSE
> +
> +!include NetworkPkg/NetworkDefines.dsc.inc
> +
>#
># Flash size selection. Setting FD_SIZE_IN_KB on the command line directly 
> to
># one of the supported values, in place of any of the convenience macros, 
> is
> @@ -139,10 +142,6 @@
>FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
>UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
>
> SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
> -  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
> -  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
> -  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
> -  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
>UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
>
> SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf
>QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
> @@ -168,7 +167,7 @@
>
> DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
> 
>IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
> -!if $(TLS_ENABLE) == TRUE
> +!if $(NETWORK_TLS_ENABLE) == TRUE
>OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
>  !else
>OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
> @@ -186,11 +185,12 @@
> 
>TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
> 
> -!if $(HTTP_BOOT_ENABLE) == TRUE
> -  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
> -!endif
> +  #
> +  # Network libraries
> +  #
> +!include NetworkPkg/NetworkLibs.dsc.inc
> 
> -!if $(TLS_ENABLE) == TRUE
> +!if $(NETWORK_TLS_ENABLE) == TRUE
>TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
>  !endif
> 
> @@ -438,7 +438,7 @@
>  !if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048)
>gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
>gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
> -!if $(TLS_ENABLE) == FALSE
> +!if $(NETWORK_TLS_ENABLE) == FALSE
># match PcdFlashNvStorageVariableSize purely for convenience
>gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0xe000
>  !endif
> @@ -446,12 +446,12 @@
>  !if $(FD_SIZE_IN_KB) == 4096
>gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x8400
>gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x8400
> -!if $(TLS_ENABLE) == FALSE
> +!if $(NETWORK_TLS_ENABLE) == FALSE
># match PcdFlashNvSt

[edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2019-05-14 Thread Zhang, Shenglei
This patch updates the platform DSC/FDF files to use the include fragment
files provided by NetworkPkg.
The feature enabling flags in [Defines] section have been updated to use
the NetworkPkg's terms, and the value has been overridden with the original
default value on this platform.

This patch also rename the TLS_ENABLE flag to PLATFORM_TLS_ENABLE for the
platform specific configuration for TLS support.

Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Anthony Perard 
Cc: Julien Grall 
Signed-off-by: Shenglei Zhang 
---
 OvmfPkg/OvmfPkgIa32.dsc| 70 +++--
 OvmfPkg/OvmfPkgIa32.fdf| 29 +---
 OvmfPkg/OvmfPkgIa32X64.dsc | 71 +++---
 OvmfPkg/OvmfPkgIa32X64.fdf | 29 +---
 OvmfPkg/OvmfPkgX64.dsc | 69 +++-
 OvmfPkg/OvmfPkgX64.fdf | 29 +---
 6 files changed, 65 insertions(+), 232 deletions(-)

diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 36a0f87258..0977233b8b 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -29,14 +29,17 @@
   # -D FLAG=VALUE
   #
   DEFINE SECURE_BOOT_ENABLE  = FALSE
-  DEFINE NETWORK_IP6_ENABLE  = FALSE
-  DEFINE HTTP_BOOT_ENABLE= FALSE
   DEFINE SMM_REQUIRE = FALSE
-  DEFINE TLS_ENABLE  = FALSE
   DEFINE TPM2_ENABLE = FALSE
   DEFINE TPM2_CONFIG_ENABLE  = FALSE
   DEFINE USE_LEGACY_ISA_STACK= FALSE
 
+  DEFINE NETWORK_TLS_ENABLE = FALSE
+  DEFINE NETWORK_IP6_ENABLE = FALSE
+  DEFINE NETWORK_HTTP_BOOT_ENABLE   = FALSE
+
+!include NetworkPkg/NetworkDefines.dsc.inc
+
   #
   # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to
   # one of the supported values, in place of any of the convenience macros, is
@@ -139,10 +142,6 @@
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   
SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf
   QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
@@ -168,7 +167,7 @@
   
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
 
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
-!if $(TLS_ENABLE) == TRUE
+!if $(NETWORK_TLS_ENABLE) == TRUE
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
 !else
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
@@ -186,11 +185,12 @@
 
   TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
 
-!if $(HTTP_BOOT_ENABLE) == TRUE
-  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
-!endif
+  #
+  # Network libraries
+  #
+!include NetworkPkg/NetworkLibs.dsc.inc
 
-!if $(TLS_ENABLE) == TRUE
+!if $(NETWORK_TLS_ENABLE) == TRUE
   TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
 !endif
 
@@ -438,7 +438,7 @@
 !if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048)
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
-!if $(TLS_ENABLE) == FALSE
+!if $(NETWORK_TLS_ENABLE) == FALSE
   # match PcdFlashNvStorageVariableSize purely for convenience
   gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0xe000
 !endif
@@ -446,12 +446,12 @@
 !if $(FD_SIZE_IN_KB) == 4096
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x8400
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x8400
-!if $(TLS_ENABLE) == FALSE
+!if $(NETWORK_TLS_ENABLE) == FALSE
   # match PcdFlashNvStorageVariableSize purely for convenience
   gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x4
 !endif
 !endif
-!if $(TLS_ENABLE) == TRUE
+!if $(NETWORK_TLS_ENABLE) == TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x8
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x4
 !endif
@@ -500,9 +500,10 @@
   gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
 !endif
 
-!if $(HTTP_BOOT_ENABLE) == TRUE
-  gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
-!endif
+  #
+  # Network Pcds
+  #
+!include NetworkPkg/NetworkPcds.dsc.inc
 
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83, 0xA5, 0x04, 
0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 }
 
@@ -781,37 +782,8 @@
   #
   # Network Support
   #
-  MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
-  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-