From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=ievapDFi; spf=pass (domain: apple.com, ip: 17.151.62.68, mailfrom: afish@apple.com) Received: from nwk-aaemail-lapp03.apple.com (nwk-aaemail-lapp03.apple.com [17.151.62.68]) by groups.io with SMTP; Mon, 06 May 2019 11:49:43 -0700 Received: from pps.filterd (nwk-aaemail-lapp03.apple.com [127.0.0.1]) by nwk-aaemail-lapp03.apple.com (8.16.0.27/8.16.0.27) with SMTP id x46Ig7wE054382; Mon, 6 May 2019 11:49:42 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=mime-version : content-transfer-encoding : content-type : sender : subject : from : in-reply-to : date : cc : message-id : references : to; s=20180706; bh=+Fmn5nMAHUOnuX+QEdKvx2/45gX5yIVPBKuDj2rR3Gg=; b=ievapDFiNkAdgUIPn9xjfBszI15oR4ymkShk6T7+wDWau+a0VvX9d3UyQD0oWoyKlON3 CJw/lLNxWxFRGfr0OlQx7KHN9RsbMe3YHCkzZOicknVqTXZ2Kh2yjX1qZt+dMtsOxYOm TxRlJOwRuN2Habdi8R3FVQw4IqJ42wMTauXZkQSiGmo2+9V4X38SXvWHNIhwkdrvqqfs P4qb1YdghmW6WABfdHPoNiTmeH7P/huXEIe2JyHCjRx+TQj9sfObIa6AnnFLc7Lj1Cd5 Ge1vKRlmyCj8SSMdoBsVnIK1lgl3Pl6fICgXmY7TgVhUYFsaOlx8YuHilc9CEdBYN9L9 6A== Received: from ma1-mtap-s01.corp.apple.com (ma1-mtap-s01.corp.apple.com [17.40.76.5]) by nwk-aaemail-lapp03.apple.com with ESMTP id 2s9tyj9b3q-24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 06 May 2019 11:49:42 -0700 MIME-version: 1.0 Received: from nwk-mmpp-sz09.apple.com (nwk-mmpp-sz09.apple.com [17.128.115.80]) by ma1-mtap-s01.corp.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPS id <0PR3000FQIYSBVA0@ma1-mtap-s01.corp.apple.com>; Mon, 06 May 2019 11:49:40 -0700 (PDT) Received: from process_milters-daemon.nwk-mmpp-sz09.apple.com by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) id <0PR300200IV8EQ00@nwk-mmpp-sz09.apple.com>; Mon, 06 May 2019 11:49:40 -0700 (PDT) X-Va-A: X-Va-T-CD: bf37c344c8485966b42248bc5fa11885 X-Va-E-CD: 1fbf65ae1739181e696408f80d3fab44 X-Va-R-CD: 9c55bb79a229b645e33eb27cd6f00545 X-Va-CD: 0 X-Va-ID: 65a7243c-f3ec-437b-987b-d4f51718ab15 X-V-A: X-V-T-CD: bf37c344c8485966b42248bc5fa11885 X-V-E-CD: 1fbf65ae1739181e696408f80d3fab44 X-V-R-CD: 9c55bb79a229b645e33eb27cd6f00545 X-V-CD: 0 X-V-ID: 4dd2fde5-576a-414f-a05c-4da73947506a X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-06_11:,, signatures=0 Received: from [17.235.35.155] (unknown [17.235.35.155]) by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPSA id <0PR3000NAIYQMR30@nwk-mmpp-sz09.apple.com>; Mon, 06 May 2019 11:49:40 -0700 (PDT) Sender: afish@apple.com Subject: Re: [edk2-devel] [Patch v3 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg. From: "Andrew Fish" In-reply-to: <05e0ee81-93b5-bef7-d21e-dac80a4ee196@redhat.com> Date: Mon, 06 May 2019 11:49:27 -0700 Cc: liming.gao@intel.com, "Wu, Jiaxin" , "Ye, Ting" , "Fu, Siyuan" Message-id: <67143FD4-3EB3-4C6D-A4A8-2FC8FE963E49@apple.com> 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> <05e0ee81-93b5-bef7-d21e-dac80a4ee196@redhat.com> To: devel@edk2.groups.io, Laszlo Ersek X-Mailer: Apple Mail (2.3445.6.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-06_11:,, signatures=0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII > On May 6, 2019, at 11:23 AM, Laszlo Ersek wrote: > > 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)? > Laszlo, Seems like this behavior would be good to define if it is not documented. I would expect an error (multiple definition), or a warning (last one winning). For best compatibility promoting the current behavior, assuming it makes sense, is probably the way to go. Thanks, Andrew Fish > > (And thank you for the rest of the answers as well.) > > Cheers, > Laszlo > > >