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 2ED5621A143EF for ; Mon, 7 Jan 2019 14:50:56 -0800 (PST) Received: from hkpgpgate101.nvidia.com (Not Verified[10.18.92.9]) by nat-hk.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 08 Jan 2019 06:50:55 +0800 Received: from HKMAIL104.nvidia.com ([10.18.16.13]) by hkpgpgate101.nvidia.com (PGP Universal service); Mon, 07 Jan 2019 14:50:55 -0800 X-PGP-Universal: processed; by hkpgpgate101.nvidia.com on Mon, 07 Jan 2019 14:50:55 -0800 Received: from DRBGMAIL101.nvidia.com (10.18.16.20) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 7 Jan 2019 22:50:54 +0000 Received: from HKMAIL101.nvidia.com (10.18.16.10) by DRBGMAIL101.nvidia.com (10.18.16.20) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 7 Jan 2019 22:50:53 +0000 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.57) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Mon, 7 Jan 2019 22:50:52 +0000 Received: from BYAPR12MB2743.namprd12.prod.outlook.com (20.177.125.220) by BYAPR12MB3303.namprd12.prod.outlook.com (20.179.93.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1495.7; Mon, 7 Jan 2019 22:50:49 +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; Mon, 7 Jan 2019 22:50:49 +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+EAKWj1iqQgACMXICAAAbioA== Date: Mon, 7 Jan 2019 22:50:49 +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-07T22:50:47.8666890Z; 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; BYAPR12MB3303; 6:WBMYv7Iao2YHDD2JOk7w5T2qJCbkEoU8XcSFH49v86ro9/cuW1RHVqGbfXWsbU9Qd7MfyKilyJD/KjEnWJ1zCHjzWiPu4Y6TOT1mt3sOXlQXlVRAnkzjIRNIlIHy1dZYe8KwS5pY9TRb5ZB9fnBi9Ab+51iR8QfVzgWLAzXgbFdgAESn2GHFIT9SIEoZtsj7mk8mRq1aHqe4r2MSGsUxjPIqMdADoRa6VBGqpU35BMDnwFog8XjvZyFvcry1wXIE6cNVFO/r4ci1vQXQITZPcwSWVXvHgBh0bhm5EMn2XZi4xibUePHiwcJ+FsxrliiN7uddlOMue1ClmLifcG4mtSStzsXU9G8Q6iJeBaepFfmvKu+uCMbVRVUuEwmhOjoNZcRwAXwsnJXQCQxI3A0+lWg+0Clb4OjFGsJKJ+oIT+cjjbIuK6ki9S02ndhflt9gywDLuoycJMYbvujsPl5gJQ==; 5:Ld3sL/oHxRqqqi1CIMLEGvQukD1rCLQypD3O2bfOcYGwlNdBz/pJwCmmjOeF9WCvxSzfQgMdJWd0LEkCyGgPTSoGHQHT/dPpyc73yhhrsFULe3MtHhtdwQEoSX7RuIoOpmp8yUz5vyNS+xS4PgT5dCSN14bBXuxjvN8JH+mWROJYbMJ6eSne5vjzw+7vej//b26CBZ/aBI1XPQyYLqJCVw==; 7:pMqEXv1bZJ6GVMMydD6Dk+AxPX+ljMXNr8EW4vwODzYbf7F5MyIbWiAwrg20BTZdrJTQQvprU0Abjc5EAHfImHHvLDyMVmFU5kRDtHPbIrSWZF1hQ2zbzBUrg1z/1Rfqx0Jfp688KqtK7L4yH1oJuw== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: e11a6356-3651-4fdd-f910-08d674f291bd x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR12MB3303; x-ms-traffictypediagnostic: BYAPR12MB3303: x-microsoft-antispam-prvs: x-forefront-prvs: 0910AAF391 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(376002)(39860400002)(396003)(366004)(189003)(199004)(13464003)(43544003)(316002)(305945005)(102836004)(76176011)(33656002)(81156014)(8676002)(110136005)(186003)(81166006)(7736002)(2501003)(256004)(14444005)(26005)(14454004)(478600001)(5660300001)(53546011)(74316002)(7696005)(6246003)(53936002)(25786009)(68736007)(97736004)(8936002)(446003)(6506007)(476003)(229853002)(106356001)(11346002)(486006)(2906002)(6436002)(86362001)(6116002)(99286004)(9686003)(71190400001)(55016002)(71200400001)(105586002)(3846002)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR12MB3303; H:BYAPR12MB2743.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: bmF+ZEON55HfXNjFmQRwmzRreLTcPTMzSL1xk7IOZmrt0L4k/gRYIfy02THcAm/y1R83fxg2lySBvHU0SExkbelV9n10tdyisQY0/AvsaWojqz0z1zkb/KlTDja26xzppyYQG1HTrr/MLwfLV9X0UdTxGdh14x/VWPompzKFgYWsZk6ZQIi/+Lau8l1wYtCUOwHTMw1zIQu5i1mHK33R1NjqEcjBXYvy8A3pVTkuhks1untDUopOAALcx8eGtavPHXIHV/4xmjcBxNDK57pTvXsQXOYBEmBd/k3N53EEoiZUeEzPP5KBsonlfxyiqWST spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: e11a6356-3651-4fdd-f910-08d674f291bd X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jan 2019 22:50:49.3716 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3303 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1546901455; bh=4cUmqmW5ZvWN7zoxOrpmvx4956UQvRHohG62Yv49oJw=; 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=oDfquoNm4pQ27CyUjBQddtDw76O0K4seIwrLmJWfmCTJemlS8K1DPLDhj/QhPPdea JQvqgq710psQnBWtHhf99qVF2lh/vYxslcEw35QGp1PTX44avUGFPyYOcep2wdBuzH hL9YtI/HYy1WfLienQYjMjFbkRhzWgcERuqQkDbLzrwlyL1KgxgbqmMKOi4Q+CVNPo roHSUPz0yADIW99aL3XZlpbSr2Km1j4/eOzTd4n6pmVwZe8QHTlbShUMIQxtGpSM3z tnR+T+oPb9lRhnHvhaX8KOalqSFqm+49QybG5umL0plTPD5fswFs81KDxHOT40ecNp +j+/+wvKhGqzQ== 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: Mon, 07 Jan 2019 22:50:58 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Mike, I build both DEBUG and RELEASE variant of the library and they both built a= few KB less in size compared to what is in tip right now. Can you please h= elp me with the optimization settings you have enabled so that I can try th= e same at my end? Also, if you want, we can look at the optimization part g= oing forward and fix the issue first by pushing in PATCH v2 1/4 and PATCH v= 2 2/4 which just adds uninstallation APIs keeping the same code structure a= s for install. Thanks Ashish -----Original Message----- From: Kinney, Michael D =20 Sent: Monday, January 7, 2019 3:23 PM 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. Hi Ashish, My main concern with this patch is that the generated code for optimized RE= LEASE builds is not as small. >>From a source maintenance perspective, the patch you have provided is easie= r to maintain. However, the implementation of the APIs that install protoc= ols was done to make sure the optimizer produces the smallest number of ins= tructions to install the protocols. I would prefer the APIs that install protocols remain unchanged, and that o= nly the new APIs to uninstall the protocols be added. The same approach co= uld be taken in the implementation to produce the exact right form of the u= ninstall action that is guaranteed to succeed if the uninstall API matches = the API that was used to install. Thanks, Mike > -----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,=20 > Siyuan ; Wu, Jiaxin > Subject: RE: [PATCH v3 0/2] Provide UEFILib functions for protocol=20 > uninstallation. >=20 > + Maintainers >=20 > -----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=20 > uninstallation. >=20 > An issue was seen in IScsiDxe in NetworkPkg where driver cleanup after=20 > initialization failure was not done right. Bug 1428 was filed in this=20 > regard. > As per discussions with Mike, it was also discussed that having=20 > UEFILib provide protocol uninstallation abstraction would help to=20 > avoid these issues in the future. Bug 1429 was found to track this.=20 > The first 2 patches take care of this. >=20 > Patch number 1 also simplifies the UEFILib protocol installation and=20 > uninstallation abstraction by adding a helper function doing=20 > operations instead of every public function. >=20 > Ashish Singhal (2): > MdePkg/UefiLib: Abstract driver model protocol uninstallation > NetworkPkg/IScsiDxe: Use UEFILib APIs to uninstall protocols. >=20 > MdePkg/Include/Library/UefiLib.h | 103 +++ > MdePkg/Library/UefiLib/UefiDriverModel.c | 1186 > ++++++++---------------------- > NetworkPkg/IScsiDxe/IScsiDriver.c | 31 +- > 3 files changed, 435 insertions(+), 885 deletions(-) >=20 > -- > 2.7.4 >=20 > ------------------------------------------------------- > ---------------------------- > This email message is for the sole use of the intended > recipient(s) and may contain > confidential information. Any unauthorized review, use, disclosure or=20 > distribution is prohibited. If you are not the intended recipient,=20 > please contact the sender by reply email and destroy all copies of the=20 > original message. > ------------------------------------------------------- > ----------------------------