From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=203.18.50.4; helo=nat-hk.nvidia.com; envelope-from=ashishsingha@nvidia.com; receiver=edk2-devel@lists.01.org Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5225921B02822 for ; Tue, 8 Jan 2019 09:24:24 -0800 (PST) Received: from hkpgpgate102.nvidia.com (Not Verified[10.18.92.100]) by nat-hk.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 09 Jan 2019 01:24:23 +0800 Received: from HKMAIL104.nvidia.com ([10.18.16.13]) by hkpgpgate102.nvidia.com (PGP Universal service); Tue, 08 Jan 2019 09:24:22 -0800 X-PGP-Universal: processed; by hkpgpgate102.nvidia.com on Tue, 08 Jan 2019 09:24:22 -0800 Received: from DRBGMAIL102.nvidia.com (10.18.16.21) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 8 Jan 2019 17:24:21 +0000 Received: from HKMAIL104.nvidia.com (10.18.16.13) by DRBGMAIL102.nvidia.com (10.18.16.21) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 8 Jan 2019 17:24:19 +0000 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (104.47.44.59) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Tue, 8 Jan 2019 17:24:20 +0000 Received: from BYAPR12MB2743.namprd12.prod.outlook.com (20.177.125.220) by BYAPR12MB2806.namprd12.prod.outlook.com (20.177.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1495.7; Tue, 8 Jan 2019 17:24:17 +0000 Received: from BYAPR12MB2743.namprd12.prod.outlook.com ([fe80::d51a:3dbb:3b90:178b]) by BYAPR12MB2743.namprd12.prod.outlook.com ([fe80::d51a:3dbb:3b90:178b%5]) with mapi id 15.20.1495.011; Tue, 8 Jan 2019 17:24:17 +0000 From: Ashish Singhal To: "Kinney, Michael D" , "edk2-devel@lists.01.org" , "Gao, Liming" , "Fu, Siyuan" , "Wu, Jiaxin" Thread-Topic: [PATCH v3 0/2] Provide UEFILib functions for protocol uninstallation. Thread-Index: AQHUpkKMUsqRLfZf6EqMNFFJsf+EAKWj1iqQgACMXICAAAbioIABJ72AgAAP78A= Date: Tue, 8 Jan 2019 17:24:16 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Enabled=True; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SiteId=43083d15-7273-40c1-b7db-39efd9ccc17a; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Owner=ashishsingha@nvidia.com; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SetDate=2019-01-08T17:24:15.4729587Z; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Name=Unrestricted; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Application=Microsoft Azure Information Protection; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Extended_MSFT_Method=Automatic; Sensitivity=Unrestricted authentication-results: spf=none (sender IP is ) smtp.mailfrom=ashishsingha@nvidia.com; x-originating-ip: [8.46.90.104] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BYAPR12MB2806; 6:4A/PhQHu3oV14VXW97K4qutfisKM5Cr8StK6NUeJ/wvLLZWJC+chQy1ySrVw2h3kDP+DQQbRPbBC9mLLV90A+sfHR315FXItThA74JiyrRNKVeQ1tRIkxEks7NHvNxBO6e2eMTf6eIVpYWcLox8MdAXVjunF3C6Obn9AKzreLzgwCEN2OShqrfApbwQiarFhRwiYyNsNUcqw34nhta7xQuvDxENvxcYJbIz7uqy9Y6XwRxxlcaWM8P+kKyXl9HLtKcT2AcaXubFAn+QL3QotVic6kDWSUkPbGXdPHJho2QuIclfPBuD53gNj4oZINDtoASk4ye/WwFfCjlT0vgbhvErgczVmpSNIc+P4DPp72RscbAgZQWq49YHjorP2a3pPUy7NdGfbT3HunoZkCRRsumR3B2q/hd4aVROQkQawQi4D4oBTePQZy8u5shGNi61qJW1yAwFldawEV0AoLorqyA==; 5:RAR8SKBbvyRIp44may+5kiEZJst7NOh9gRKarOKVWn9aC9WogebrWlxlFfaVfjmDVyupeu339HPr9vhlAMQEmKq+mmPfia/LU6HTrcAQT4ptNPZ2Ri3rGnouTpUvgnPri/hzkI576XNv/NXYCte5wDF0Gxg2gABQ37fOg5Bbwly71VwtbOotgA+qXeZmRsSUaFGmGL5Fss48gaZeEu+iIA==; 7:AbJv4HtxDGPkWcUM+pQo+C3nbLScS+8LKTi+iAw0nx5bYA+mKUSi3bMNv4M37OObc0H2k1YnrL99BWQxZN3D9xTGOIqUmUlS3foWvlSmXZvI6YQkBy/KqGA8YBy6l1yzfiGcy4DgP/e91Ks5ynEfMg== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 93b7c651-1ec1-4aa9-44e9-08d6758e1e2d x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR12MB2806; x-ms-traffictypediagnostic: BYAPR12MB2806: x-microsoft-antispam-prvs: x-forefront-prvs: 0911D5CE78 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(376002)(366004)(396003)(136003)(13464003)(199004)(189003)(43544003)(229853002)(476003)(68736007)(446003)(66066001)(7736002)(6436002)(105586002)(5660300001)(33656002)(486006)(102836004)(316002)(55016002)(97736004)(26005)(2906002)(478600001)(6506007)(3846002)(6116002)(53546011)(14454004)(305945005)(106356001)(11346002)(76176011)(9686003)(25786009)(6246003)(186003)(53936002)(81166006)(81156014)(8676002)(93886005)(86362001)(99286004)(256004)(14444005)(110136005)(7696005)(71200400001)(8936002)(71190400001)(2501003)(74316002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR12MB2806; H:BYAPR12MB2743.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nvidia.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: N/B1me4DzUPLaiTSKyam8pCA05chJ+g7rB4kJfp5pKqSZg14dhv518o/cMYS2BRAqdkjlMo1dxCkj0f++QMnVwjeS7fdsPoqUF9iljUCWj06e9mC16CTumLFXD/7e0/ghn0mKMCoX/cB3TmjMSR4J2mevDaVwofCcWi0MAf56N83Ha9dxNDzGw6bop6dXhgnvebMDUKKewnY7Z0d1HzZbhe9mhAaqgY2UncQphUWBWU0zkyrPjAfBeDsIUeohx/GBspmsj5rsGRNJIvA/86Gk9iz1hcndTAHi3WS+Gl6jjR6IXV7GhN51U0TjDgh1ooU spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 93b7c651-1ec1-4aa9-44e9-08d6758e1e2d X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2019 17:24:16.9901 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2806 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1546968263; bh=tEVU2f+/+9BUdeWsYWUtbJexI0iuQV62hHvz5JtStB0=; h=X-PGP-Universal:From:To:Subject:Thread-Topic:Thread-Index:Date: Message-ID:References:In-Reply-To:Accept-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:msip_labels:authentication-results: x-originating-ip:x-ms-publictraffictype: x-microsoft-exchange-diagnostics: x-ms-exchange-antispam-srfa-diagnostics: x-ms-office365-filtering-correlation-id:x-microsoft-antispam: x-ms-traffictypediagnostic:x-microsoft-antispam-prvs: x-forefront-prvs:x-forefront-antispam-report:received-spf: x-ms-exchange-senderadcheck:x-microsoft-antispam-message-info: spamdiagnosticoutput:spamdiagnosticmetadata:MIME-Version: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg: Content-Language:Content-Type:Content-Transfer-Encoding; b=VzY2cmA4MueAxCLeOWhWWFUBq78E6kh/B9LjjG9+kefrDv9sarIk5wuugUzqfBTfi x24KZaaa7StWx3A0N+CbDeKc7U7tRrPp0JUTxMhQlezWfFO0BefjUlRA3eSHLosc2n OIruU10ETpjPNL4iZSR3Op01Fg8MPmA5kPF2pmmlHGX57OnfBJYKkErhGnYhglxo7L YCWP6KeKCHGOisFU/I+144DLFQFzuvz9wOBk70HuzzfL5qhS1hM5F5pNI2gj/TooYd 7dQU2MbjIps5wBrxyUTw4gtECkoRhKeNxEnXRynEJvMNL4MuudzJirUEunRy5S5iec rpwRsgqW4+8+w== Subject: Re: [PATCH v3 0/2] Provide UEFILib functions for protocol uninstallation. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 17:24:26 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks Mike. Please let me know if you have any more questions and/or comme= nts. Thanks Ashish -----Original Message----- From: Kinney, Michael D =20 Sent: Tuesday, January 8, 2019 9:26 AM To: Ashish Singhal ; edk2-devel@lists.01.org; Gao,= Liming ; Fu, Siyuan ; Wu, Jiaxi= n ; Kinney, Michael D Subject: RE: [PATCH v3 0/2] Provide UEFILib functions for protocol uninstal= lation. Ashish, Good point. I was looking at the code size of a single uncompressed UEFI D= river (DiskIoDxe). I suspect that the patch provides a more consistent pat= tern across all drivers that use these UefiLib APIs, and then provides bett= er compression on an FV that contains many UEFI Drivers. I also suspect there may be a small size increase for the single compressed= UEFI Driver use case for PCI Option ROMs. I will run a few more experiments this morning. Thanks, Mike > -----Original Message----- > From: Ashish Singhal [mailto:ashishsingha@nvidia.com] > Sent: Monday, January 7, 2019 2:51 PM > To: Kinney, Michael D ;=20 > edk2-devel@lists.01.org; Gao, Liming ; Fu,=20 > Siyuan ; Wu, Jiaxin > Subject: RE: [PATCH v3 0/2] Provide UEFILib functions for protocol=20 > uninstallation. >=20 > Hi Mike, >=20 > I build both DEBUG and RELEASE variant of the library and they both=20 > built a few KB less in size compared to what is in tip right now. Can=20 > you please help me with the optimization settings you have enabled so=20 > that I can try the same at my end? Also, if you want, we can look at=20 > the optimization part going forward and fix the issue first by pushing=20 > in PATCH v2 1/4 and PATCH v2 2/4 which just adds uninstallation APIs=20 > keeping the same code structure as for install. >=20 > Thanks > Ashish >=20 > -----Original Message----- > From: Kinney, Michael D > Sent: Monday, January 7, 2019 3:23 PM > To: Ashish Singhal ; edk2-=20 > devel@lists.01.org; Gao, Liming ; Fu, Siyuan=20 > ; Wu, Jiaxin ; Kinney,=20 > Michael D > Subject: RE: [PATCH v3 0/2] Provide UEFILib functions for protocol=20 > uninstallation. >=20 > Hi Ashish, >=20 > My main concern with this patch is that the generated code for=20 > optimized RELEASE builds is not as small. >=20 > From a source maintenance perspective, the patch you have provided is=20 > easier to maintain. However, the implementation of the APIs that=20 > install protocols was done to make sure the optimizer produces the=20 > smallest number of instructions to install the protocols. >=20 > I would prefer the APIs that install protocols remain unchanged, and=20 > that only the new APIs to uninstall the protocols be added. The same=20 > approach could be taken in the implementation to produce the exact=20 > right form of the uninstall action that is guaranteed to succeed if=20 > the uninstall API matches the API that was used to install. >=20 > Thanks, >=20 > Mike >=20 > > -----Original Message----- > > From: Ashish Singhal [mailto:ashishsingha@nvidia.com] > > Sent: Monday, January 7, 2019 6:02 AM > > To: edk2-devel@lists.01.org; Kinney, Michael D=20 > > ; Gao, Liming > ; Fu, > > Siyuan ; Wu, Jiaxin > > > Subject: RE: [PATCH v3 0/2] Provide UEFILib functions > for protocol > > uninstallation. > > > > + Maintainers > > > > -----Original Message----- > > From: Ashish Singhal > > Sent: Sunday, January 6, 2019 9:38 PM > > To: edk2-devel@lists.01.org > > Cc: Ashish Singhal > > Subject: [PATCH v3 0/2] Provide UEFILib functions for > protocol > > uninstallation. > > > > An issue was seen in IScsiDxe in NetworkPkg where > driver cleanup after > > initialization failure was not done right. Bug 1428 > was filed in this > > regard. > > As per discussions with Mike, it was also discussed > that having > > UEFILib provide protocol uninstallation abstraction > would help to > > avoid these issues in the future. Bug 1429 was found > to track this. > > The first 2 patches take care of this. > > > > Patch number 1 also simplifies the UEFILib protocol > installation and > > uninstallation abstraction by adding a helper > function doing > > operations instead of every public function. > > > > Ashish Singhal (2): > > MdePkg/UefiLib: Abstract driver model protocol > uninstallation > > NetworkPkg/IScsiDxe: Use UEFILib APIs to uninstall > protocols. > > > > MdePkg/Include/Library/UefiLib.h | 103 +++ > > MdePkg/Library/UefiLib/UefiDriverModel.c | 1186 > > ++++++++---------------------- > > NetworkPkg/IScsiDxe/IScsiDriver.c | 31 +- > > 3 files changed, 435 insertions(+), 885 deletions(-) > > > > -- > > 2.7.4 > > > > ----------------------------------------------------- > -- > > ---------------------------- > > This email message is for the sole use of the > intended > > recipient(s) and may contain > > confidential information. Any unauthorized review, > use, disclosure or > > distribution is prohibited. If you are not the > intended recipient, > > please contact the sender by reply email and destroy > all copies of the > > original message. > > ----------------------------------------------------- > -- > > ----------------------------