public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, liming.gao@intel.com
Cc: "Wu, Jiaxin" <jiaxin.wu@intel.com>,
	"Ye, Ting" <ting.ye@intel.com>,
	"Fu, Siyuan" <siyuan.fu@intel.com>
Subject: Re: [edk2-devel] [Patch v3 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.
Date: Mon, 6 May 2019 20:23:44 +0200	[thread overview]
Message-ID: <05e0ee81-93b5-bef7-d21e-dac80a4ee196@redhat.com> (raw)
In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4416B7@SHSMSX104.ccr.corp.intel.com>

On 05/05/19 17:21, Liming Gao wrote:
> Reply for the comments in the patch content. 
>> -----Original Message-----
>> From: Laszlo Ersek [mailto:lersek@redhat.com]
>> Sent: Monday, April 29, 2019 9:05 PM
>> To: devel@edk2.groups.io; Gao, Liming <liming.gao@intel.com>
>> Cc: Wu, Jiaxin <jiaxin.wu@intel.com>; Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>
>> Subject: Re: [edk2-devel] [Patch v3 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.
>>
>> On 04/25/19 14:37, Liming Gao wrote:

[...]

>>> diff --git a/NetworkPkg/NetworkComponents.dsc.inc b/NetworkPkg/NetworkComponents.dsc.inc
>>> new file mode 100644
>>> index 0000000000..aede5ea8be
>>> --- /dev/null
>>> +++ b/NetworkPkg/NetworkComponents.dsc.inc
>>> @@ -0,0 +1,61 @@
>>> +## @file
>>> +# Network DSC include file for [Components*] section of all Architectures.
>>> +#
>>> +# This file can be included to the [Components*] section(s) of a platform DSC file
>>> +# by using "!include NetworkPkg/NetworkComponents.dsc.inc" to specify the INF files
>>> +# of EDKII network drivers according to the value of flags described in
>>> +# "NetworkDefines.dsc.inc".
>>> +#
>>> +# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
>>> +#
>>> +#    SPDX-License-Identifier: BSD-2-Clause-Patent
>>> +#
>>> +##
>>> +
>>> +!if $(NETWORK_ENABLE) == TRUE
>>> +  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
>>> +
>>> +  !if $(NETWORK_SNP_ENABLE) == TRUE
>>> +    MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
>>> +  !endif
>>> +
>>> +  !if $(NETWORK_VLAN_ENABLE) == TRUE
>>> +    MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
>>> +  !endif
>>> +
>>> +  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
>>> +
>>> +  !if $(NETWORK_IP4_ENABLE) == TRUE
>>> +    MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
>>> +    MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
>>> +    MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
>>> +    MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
>>> +    MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
>>> +  !endif
>>> +
>>> +  !if $(NETWORK_IP6_ENABLE) == TRUE
>>> +    NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
>>> +    NetworkPkg/Ip6Dxe/Ip6Dxe.inf
>>> +    NetworkPkg/Udp6Dxe/Udp6Dxe.inf
>>> +    NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
>>> +  !endif
>>> +
>>> +  NetworkPkg/TcpDxe/TcpDxe.inf
>>> +  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
>>> +
>>> +  !if $(NETWORK_TLS_ENABLE) == TRUE
>>> +    NetworkPkg/TlsDxe/TlsDxe.inf
>>> +    NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
>>> +  !endif
>>> +
>>> +  !if $(NETWORK_HTTP_BOOT_ENABLE) == TRUE
>>> +    NetworkPkg/DnsDxe/DnsDxe.inf
>>> +    NetworkPkg/HttpDxe/HttpDxe.inf
>>> +    NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
>>> +    NetworkPkg/HttpBootDxe/HttpBootDxe.inf
>>> +  !endif
>>> +
>>> +  !if $(NETWORK_ISCSI_ENABLE) == TRUE
>>> +    NetworkPkg/IScsiDxe/IScsiDxe.inf
>>> +  !endif
>>> +!endif
>>
>> OK, this matches the FDF include file (except for IScsiDxe, but that's a
>> problem I pointed out under (6)).
>>
>> The NETWORK_TLS_ENABLE part looks good too. It's worth noting that it
>> won't be suitable for OVMF, because OVMF hooks TlsAuthConfigLib into
>> TlsAuthConfigDxe, for dynamically setting the variables
>> "HttpTlsCipherList" and "TlsCaCertificate".
>>
>> But, that's not a problem for this generic DSC include file. OVMF can
>> simply set NETWORK_TLS_ENABLE to FALSE, and preserve its own (current)
>> TLS_ENABLE build flag, and everything in the DSC/FDF that depends on
>> that platform build flag.
> 
> After include NetworkPkg/NetworkComponents.dsc.inc, you can override TlsAuthConfigDxe.inf
> with the below to match Ovmf usage. 
>   NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
>     <LibraryClasses>
>       NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf
>   }

Oh, that's very interesting. Is this a documented feature of the DSC
files (from the DSC spec), or just something that happens to work with
BaseTools?

In other words, are DSC files officially permitted to reference the same
component INF file multiple times, and the last reference will take
effect (including PCD and lib overrides)?


(And thank you for the rest of the answers as well.)

Cheers,
Laszlo

  reply	other threads:[~2019-05-06 18:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 12:37 [Patch v3 0/3] Add package level include DSC/FDF in NetworkPkg Liming Gao
2019-04-25 12:37 ` [Patch v3 1/3] NetworkPkg DSC: Add the required ARM library to pass ARM build Liming Gao
2019-04-26 22:04   ` [edk2-devel] " Laszlo Ersek
2019-04-26 22:19     ` Ard Biesheuvel
2019-04-29  2:02       ` Liming Gao
2019-04-25 12:37 ` [Patch v3 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg Liming Gao
2019-04-29 13:05   ` [edk2-devel] " Laszlo Ersek
2019-04-29 14:18     ` Liming Gao
2019-05-05 15:21     ` Liming Gao
2019-05-06 18:23       ` Laszlo Ersek [this message]
2019-05-06 18:49         ` Andrew Fish
2019-05-07  4:23           ` Liming Gao
2019-05-07  1:22       ` Siyuan, Fu
2019-04-25 12:37 ` [Patch v3 3/3] NetworkPkg: Add package level include DSC file Liming Gao
2019-04-29 12:03   ` [edk2-devel] " Laszlo Ersek
2019-04-29 14:15     ` Liming Gao
2019-04-29 13:10 ` [edk2-devel] [Patch v3 0/3] Add package level include DSC/FDF in NetworkPkg Laszlo Ersek
2019-04-29 14:19   ` Liming Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05e0ee81-93b5-bef7-d21e-dac80a4ee196@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox