From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Mon, 06 May 2019 11:23:48 -0700 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3C6FF7FDE5; Mon, 6 May 2019 18:23:47 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-124-221.rdu2.redhat.com [10.10.124.221]) by smtp.corp.redhat.com (Postfix) with ESMTP id B9DD960BEC; Mon, 6 May 2019 18:23:45 +0000 (UTC) Subject: Re: [edk2-devel] [Patch v3 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg. To: devel@edk2.groups.io, liming.gao@intel.com Cc: "Wu, Jiaxin" , "Ye, Ting" , "Fu, Siyuan" References: <20190425123735.10960-1-liming.gao@intel.com> <20190425123735.10960-3-liming.gao@intel.com> <4bc4a615-732f-a121-8a38-bac84ea1ee9f@redhat.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E4416B7@SHSMSX104.ccr.corp.intel.com> From: "Laszlo Ersek" Message-ID: <05e0ee81-93b5-bef7-d21e-dac80a4ee196@redhat.com> Date: Mon, 6 May 2019 20:23:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4416B7@SHSMSX104.ccr.corp.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 06 May 2019 18:23:47 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 >> Cc: Wu, Jiaxin ; Ye, Ting ; Fu, Siyuan >> 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.
>>> +# >>> +# 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 { > > 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