From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: liming.gao@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Mon, 06 May 2019 21:23:12 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 May 2019 21:23:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,440,1549958400"; d="scan'208";a="142100733" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga006.jf.intel.com with ESMTP; 06 May 2019 21:23:10 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 6 May 2019 21:23:10 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 6 May 2019 21:23:10 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.33]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.18]) with mapi id 14.03.0415.000; Tue, 7 May 2019 12:23:08 +0800 From: "Liming Gao" To: "afish@apple.com" , "devel@edk2.groups.io" , Laszlo Ersek CC: "Wu, Jiaxin" , "Ye, Ting" , "Fu, Siyuan" Subject: Re: [edk2-devel] [Patch v3 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg. Thread-Topic: [edk2-devel] [Patch v3 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg. Thread-Index: AQHU/ow2H6bhVB8Wy0+9F6YRZbxFKaZcp8DggAFGuACAAAcvgIAA9pAw Date: Tue, 7 May 2019 04:23:07 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E443D46@SHSMSX104.ccr.corp.intel.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> <67143FD4-3EB3-4C6D-A4A8-2FC8FE963E49@apple.com> In-Reply-To: <67143FD4-3EB3-4C6D-A4A8-2FC8FE963E49@apple.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2E5YTAyZDEtNjdkOC00ZWQwLWFiNDEtMWI1MzhlOTI1ZjA2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaDRYWXFnYlZvb2JTaWFzZFFYZFEzUFFMZ214T3lYNmM2OHVYWldvN1RvK1hpR2xkZklnbU03QWI0dW5HOVVWZSJ9 dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: afish@apple.com [mailto:afish@apple.com] > Sent: Tuesday, May 7, 2019 2:49 AM > To: devel@edk2.groups.io; Laszlo Ersek > Cc: Gao, Liming ; Wu, Jiaxin = ; Ye, Ting ; Fu, Siyuan > > Subject: Re: [edk2-devel] [Patch v3 2/3] NetworkPkg: Add DSC/FDF include= segment files to NetworkPkg. >=20 >=20 >=20 > > 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 inc= lude segment files to NetworkPkg. > >>> > >>> On 04/25/19 14:37, Liming Gao wrote: > > > > [...] > > > >>>> diff --git a/NetworkPkg/NetworkComponents.dsc.inc b/NetworkPkg/Netw= orkComponents.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 Archit= ectures. > >>>> +# > >>>> +# This file can be included to the [Components*] section(s) of a p= latform DSC file > >>>> +# by using "!include NetworkPkg/NetworkComponents.dsc.inc" to spec= ify the INF files > >>>> +# of EDKII network drivers according to the value of flags describ= ed in > >>>> +# "NetworkDefines.dsc.inc". > >>>> +# > >>>> +# Copyright (c) 2019, Intel Corporation. All rights reserved.
> >>>> +# > >>>> +# SPDX-License-Identifier: BSD-2-Clause-Patent > >>>> +# > >>>> +## > >>>> + > >>>> +!if $(NETWORK_ENABLE) =3D=3D TRUE > >>>> + MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf > >>>> + > >>>> + !if $(NETWORK_SNP_ENABLE) =3D=3D TRUE > >>>> + MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf > >>>> + !endif > >>>> + > >>>> + !if $(NETWORK_VLAN_ENABLE) =3D=3D TRUE > >>>> + MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf > >>>> + !endif > >>>> + > >>>> + MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf > >>>> + > >>>> + !if $(NETWORK_IP4_ENABLE) =3D=3D 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) =3D=3D 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) =3D=3D TRUE > >>>> + NetworkPkg/TlsDxe/TlsDxe.inf > >>>> + NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf > >>>> + !endif > >>>> + > >>>> + !if $(NETWORK_HTTP_BOOT_ENABLE) =3D=3D TRUE > >>>> + NetworkPkg/DnsDxe/DnsDxe.inf > >>>> + NetworkPkg/HttpDxe/HttpDxe.inf > >>>> + NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf > >>>> + NetworkPkg/HttpBootDxe/HttpBootDxe.inf > >>>> + !endif > >>>> + > >>>> + !if $(NETWORK_ISCSI_ENABLE) =3D=3D 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 i= t > >>> 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 ca= n > >>> simply set NETWORK_TLS_ENABLE to FALSE, and preserve its own (curren= t) > >>> 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 sa= me > > component INF file multiple times, and the last reference will take > > effect (including PCD and lib overrides)? > > BZ https://bugzilla.tianocore.org/show_bug.cgi?id=3D1449 for this support.= It is in edk2 201903 stable tag.=20 I will add this change in edk2 201903 notes. Bob will update build spec fo= r this change.=20 >=20 > Laszlo, >=20 > 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). >=20 > For best compatibility promoting the current behavior, assuming it makes= sense, is probably the way to go. >=20 > Thanks, >=20 > Andrew Fish >=20 >=20 > > > > (And thank you for the rest of the answers as well.) > > > > Cheers, > > Laszlo > > > >=20 > >