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 4C2A321195BCA for ; Sun, 13 Jan 2019 20:58:13 -0800 (PST) Received: from hkpgpgate101.nvidia.com (Not Verified[10.18.92.100]) by nat-hk.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 14 Jan 2019 12:58:12 +0800 Received: from HKMAIL102.nvidia.com ([10.18.16.11]) by hkpgpgate101.nvidia.com (PGP Universal service); Sun, 13 Jan 2019 20:58:11 -0800 X-PGP-Universal: processed; by hkpgpgate101.nvidia.com on Sun, 13 Jan 2019 20:58:11 -0800 Received: from HKMAIL103.nvidia.com (10.18.16.12) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 14 Jan 2019 04:58:10 +0000 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (104.47.40.58) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Mon, 14 Jan 2019 04:58:10 +0000 Received: from BYAPR12MB2743.namprd12.prod.outlook.com (20.177.125.220) by BYAPR12MB3125.namprd12.prod.outlook.com (20.178.54.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.14; Mon, 14 Jan 2019 04:57:47 +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.1516.019; Mon, 14 Jan 2019 04:57:47 +0000 From: Ashish Singhal To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" CC: "Fu, Siyuan" Thread-Topic: [PATCH] NetworkPkg: Protocol Uninstallation Cleanup Thread-Index: AQHUqRqJHatrzSIT2U+OS4CAi2/eIKWpQAOAgATysnA= Date: Mon, 14 Jan 2019 04:57:47 +0000 Message-ID: References: <2d3d928f7698138685701e6de58c083f65acafa4.1547148192.git.ashishsingha@nvidia.com> <895558F6EA4E3B41AC93A00D163B727416EC3FF3@SHSMSX107.ccr.corp.intel.com> In-Reply-To: <895558F6EA4E3B41AC93A00D163B727416EC3FF3@SHSMSX107.ccr.corp.intel.com> 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-14T04:57:43.2838136Z; 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: [216.228.112.21] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BYAPR12MB3125; 6:YAWwd1Q5i+/9C/kELr7AGHhCx1NUkFot946x3VD5c+SYf4E4qcLov6tFSh9PGS0+llWwPZf3qH+Ay1vAHtTpGomR5l1gd+xsod4z+iJDwPhQOOV0V06LXVeyItICgmlCcRs0+I3+dwmmmhV62D7eIR4Y0tyuI6htvlo78+vFLV4PuN0M5Y/v/4Ts8LrG3QAPQUcl6vnWdfah35xAbDg/DkVRH4W3zXC4H0tUVfKpjl3r77OFjeJmByNH1xF15qUjTHxCssVzQg/R1uqfzPdKKUtS8eNVQfH6EcU9i3xumAMuVYon5a4334IFrscBu695t4WhXEEuTSNlJpMcYFkIjzu1zbO+v/4R9K45/ef8MI5CEbUjg8ww9nfiOlIAolqkzEA7GulEhUKAXSpwj/b5JvvNOYQLASf4QPgLxdIZQXiG+qbT9tv3wHuFv5+Rxk1r0yse7AlILDHIaGp4Jfn37Q==; 5:UAtfRpPZZT7xW1Hkn68cJBD+ES4vez3QKOf8bn/ddWoFfyTgE8TiswmXrseQxUMeDbCtwGlP02XXP7eriMF6HSCCHjnj/XqHZ7vfJMG1emOaMuYPXyGeZYkvDj2LpJFnlqKXquASD77eruRKSJs4v4DZVVoHupkfNm2XfuIFuHbQrd19ojXxZ7l5FzEPTv8EjbvgtTlyU6AJGX49+LHxrw==; 7:P7vZlwk3LuvG7mvpgT4zOBX7tnCEBvhQl51vEmrZtZSW+Lm/Gv+uklxKfeLXCsDkB597xP5cqD4zKZuf/ZBJa4YU1uZBDVGBMThCY399YprdXm14nzAA+OiBzf9nuks0gi6uQRL8FENG+H+lXi4hrA== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: d430b6ea-b1a8-44ec-8860-08d679dcd3ce x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR12MB3125; x-ms-traffictypediagnostic: BYAPR12MB3125: x-microsoft-antispam-prvs: x-forefront-prvs: 0917DFAC67 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(39850400004)(136003)(396003)(376002)(13464003)(199004)(189003)(33656002)(106356001)(105586002)(2906002)(6116002)(3846002)(966005)(74316002)(86362001)(478600001)(14454004)(71200400001)(71190400001)(55016002)(229853002)(66066001)(6436002)(5660300001)(97736004)(186003)(26005)(68736007)(7736002)(8936002)(11346002)(81156014)(81166006)(486006)(305945005)(2501003)(76176011)(8676002)(256004)(19627235002)(4326008)(6246003)(6306002)(9686003)(53546011)(6506007)(53936002)(102836004)(25786009)(316002)(99286004)(476003)(446003)(7696005)(110136005)(44824005); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR12MB3125; 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: H24NIfFKzbzLh+oEkkiS0CIMJC3WlwC5OSyyefxyi9JRryOGc/joyDBYilMj5bPcz15160nI+uKDI8WcqfgCNl9L0+qQWv7Go85YxTdYH5yNpHh754sBgutrQCGlj0JuZbK4cz/jtbl85+mmhEdRThgPQdrKKfOwOn8DMobgxANwVZc6ZtA0sbNDk9WUarLW6jjUg8TQ5HaCFmRMLkeb/Ls2bmAySTp7qkuNovi8ySUl+qsG9EdmZ1f6Ck9AKCZujciM3PfCjCG9kiuP0M8XXyK3VMcmpAwlBVdot/spjMtjqWnOr+bh2mdZ0Mf1KFKndsXqn9zTNrut6StKm+ZiFhgEA2qP9gwHBgi2efg/Wukjag4oZ1ihWCFl4SCzypw+WCLqqtMyaf6kobV7iWfCMNAQTof0r/AdJcjhYv/vzXc= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: d430b6ea-b1a8-44ec-8860-08d679dcd3ce X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jan 2019 04:57:47.0596 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3125 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1547441892; bh=99Y1yKpPsNsXWI22O7OwAos9A2mbPVFGGLaBYUjGuOQ=; h=X-PGP-Universal:From:To:CC: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=A7ZylLBRB6w0L1gRsDdbO7jPeR61WwoUzXOo533SkqAwyJUicTm33EvKnEuRl7kXh tNxWkO2B9K0TKtg7+JQyLTvorgAUKxgu+iT+WePZF+x86A/9oPy/c6JrsyI9wFv/Dr af+aYaka8JS3zp1IH3pnRIVhj2xs84Yrq5ShcTvOOp6qBZMCeqG3M9cMLockYFyjkk g3m+gjMudIHfAM+OsLUj97C8UKH7Eo8jq2KIvY0m39Ieyegmbk9srYU6rLFXTAzK9C WW96Q2En3aHiez3iaTrp8+Ljp0i+nGmoi4J9d+6ZioKfpt4DXCfovc64fq4l+lL1VX xBbEAgjbeHvcw== Subject: Re: [PATCH] NetworkPkg: Protocol Uninstallation Cleanup 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, 14 Jan 2019 04:58:15 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks Jiaxin. Please let me know if anything else is needed to mainline = it. -----Original Message----- From: Wu, Jiaxin =20 Sent: Thursday, January 10, 2019 6:01 PM To: Ashish Singhal ; edk2-devel@lists.01.org Cc: Fu, Siyuan Subject: RE: [PATCH] NetworkPkg: Protocol Uninstallation Cleanup Looks good to me. Reviewed-by: Wu Jiaxin Thanks, Jiaxin > -----Original Message----- > From: Ashish Singhal [mailto:ashishsingha@nvidia.com] > Sent: Friday, January 11, 2019 3:27 AM > To: edk2-devel@lists.01.org > Cc: Fu, Siyuan ; Wu, Jiaxin=20 > ; Ashish Singhal > Subject: [PATCH] NetworkPkg: Protocol Uninstallation Cleanup >=20 > Use UEFILib provided protocol uninstallation abstraction instead of=20 > direct API for a proper cleanup. >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1444 >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ashish Singhal > --- > NetworkPkg/DnsDxe/DnsDriver.c | 30 ++++++++++-----------------= --- > NetworkPkg/HttpBootDxe/HttpBootDxe.c | 15 +++++---------- > NetworkPkg/HttpDxe/HttpDriver.c | 15 +++++---------- > NetworkPkg/IpSecDxe/IpSecDriver.c | 15 +++++---------- > NetworkPkg/TcpDxe/TcpDriver.c | 15 +++++---------- > NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c | 15 +++++---------- > 6 files changed, 35 insertions(+), 70 deletions(-) >=20 > diff --git a/NetworkPkg/DnsDxe/DnsDriver.c=20 > b/NetworkPkg/DnsDxe/DnsDriver.c index 1f9b924..b74f5ba 100644 > --- a/NetworkPkg/DnsDxe/DnsDriver.c > +++ b/NetworkPkg/DnsDxe/DnsDriver.c > @@ -510,28 +510,18 @@ DnsDriverEntryPoint ( > FreePool (mDriverData); >=20 > Error2: > - gBS->UninstallMultipleProtocolInterfaces ( > - gDns6DriverBinding.DriverBindingHandle, > - &gEfiDriverBindingProtocolGuid, > - &gDns6DriverBinding, > - &gEfiComponentName2ProtocolGuid, > - &gDnsComponentName2, > - &gEfiComponentNameProtocolGuid, > - &gDnsComponentName, > - NULL > - ); > + EfiLibUninstallDriverBindingComponentName2 ( > + &gDns6DriverBinding, > + &gDnsComponentName, > + &gDnsComponentName2 > + ); >=20 > Error1: > - gBS->UninstallMultipleProtocolInterfaces ( > - ImageHandle, > - &gEfiDriverBindingProtocolGuid, > - &gDns4DriverBinding, > - &gEfiComponentName2ProtocolGuid, > - &gDnsComponentName2, > - &gEfiComponentNameProtocolGuid, > - &gDnsComponentName, > - NULL > - ); > + EfiLibUninstallDriverBindingComponentName2 ( > + &gDns4DriverBinding, > + &gDnsComponentName, > + &gDnsComponentName2 > + ); >=20 > return Status; > } > diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.c > b/NetworkPkg/HttpBootDxe/HttpBootDxe.c > index 7ec06f960..0b16f95 100644 > --- a/NetworkPkg/HttpBootDxe/HttpBootDxe.c > +++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.c > @@ -1327,16 +1327,11 @@ HttpBootDxeDriverEntryPoint ( > &gHttpBootDxeComponentName2 > ); > if (EFI_ERROR (Status)) { > - gBS->UninstallMultipleProtocolInterfaces( > - ImageHandle, > - &gEfiDriverBindingProtocolGuid, > - &gHttpBootIp4DxeDriverBinding, > - &gEfiComponentName2ProtocolGuid, > - &gHttpBootDxeComponentName2, > - &gEfiComponentNameProtocolGuid, > - &gHttpBootDxeComponentName, > - NULL > - ); > + EfiLibUninstallDriverBindingComponentName2( > + &gHttpBootIp4DxeDriverBinding, > + &gHttpBootDxeComponentName, > + &gHttpBootDxeComponentName2 > + ); > } > return Status; > } > diff --git a/NetworkPkg/HttpDxe/HttpDriver.c=20 > b/NetworkPkg/HttpDxe/HttpDriver.c index 8df984d..979d76d 100644 > --- a/NetworkPkg/HttpDxe/HttpDriver.c > +++ b/NetworkPkg/HttpDxe/HttpDriver.c > @@ -230,16 +230,11 @@ HttpDxeDriverEntryPoint ( > &gHttpDxeComponentName2 > ); > if (EFI_ERROR (Status)) { > - gBS->UninstallMultipleProtocolInterfaces ( > - ImageHandle, > - &gEfiDriverBindingProtocolGuid, > - &gHttpDxeIp4DriverBinding, > - &gEfiComponentName2ProtocolGuid, > - &gHttpDxeComponentName2, > - &gEfiComponentNameProtocolGuid, > - &gHttpDxeComponentName, > - NULL > - ); > + EfiLibUninstallDriverBindingComponentName2 ( > + &gHttpDxeIp4DriverBinding, > + &gHttpDxeComponentName, > + &gHttpDxeComponentName2 > + ); > } > return Status; > } > diff --git a/NetworkPkg/IpSecDxe/IpSecDriver.c > b/NetworkPkg/IpSecDxe/IpSecDriver.c > index f66f89a..3082d99 100644 > --- a/NetworkPkg/IpSecDxe/IpSecDriver.c > +++ b/NetworkPkg/IpSecDxe/IpSecDriver.c > @@ -631,16 +631,11 @@ IpSecDriverEntryPoint ( > return Status; >=20 > ON_UNINSTALL_IPSEC4_DB: > - gBS->UninstallMultipleProtocolInterfaces ( > - ImageHandle, > - &gEfiDriverBindingProtocolGuid, > - &gIpSec4DriverBinding, > - &gEfiComponentName2ProtocolGuid, > - &gIpSecComponentName2, > - &gEfiComponentNameProtocolGuid, > - &gIpSecComponentName, > - NULL > - ); > + EfiLibUninstallDriverBindingComponentName2 ( > + &gIpSec4DriverBinding, > + &gIpSecComponentName, > + &gIpSecComponentName2 > + ); >=20 > ON_UNINSTALL_IPSEC: > gBS->UninstallProtocolInterface ( > diff --git a/NetworkPkg/TcpDxe/TcpDriver.c=20 > b/NetworkPkg/TcpDxe/TcpDriver.c index 2d4b16c..00d172b 100644 > --- a/NetworkPkg/TcpDxe/TcpDriver.c > +++ b/NetworkPkg/TcpDxe/TcpDriver.c > @@ -202,16 +202,11 @@ TcpDriverEntryPoint ( > &gTcpComponentName2 > ); > if (EFI_ERROR (Status)) { > - gBS->UninstallMultipleProtocolInterfaces ( > - ImageHandle, > - &gEfiDriverBindingProtocolGuid, > - &gTcp4DriverBinding, > - &gEfiComponentName2ProtocolGuid, > - &gTcpComponentName2, > - &gEfiComponentNameProtocolGuid, > - &gTcpComponentName, > - NULL > - ); > + EfiLibUninstallDriverBindingComponentName2 ( > + &gTcp4DriverBinding, > + &gTcpComponentName, > + &gTcpComponentName2 > + ); > return Status; > } >=20 > diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c > b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c > index 0ab640b..f25c27a 100644 > --- a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c > +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c > @@ -1269,16 +1269,11 @@ PxeBcDriverEntryPoint ( > &gPxeBcComponentName2 > ); > if (EFI_ERROR (Status)) { > - gBS->UninstallMultipleProtocolInterfaces ( > - ImageHandle, > - &gEfiDriverBindingProtocolGuid, > - &gPxeBcIp4DriverBinding, > - &gEfiComponentName2ProtocolGuid, > - &gPxeBcComponentName2, > - &gEfiComponentNameProtocolGuid, > - &gPxeBcComponentName, > - NULL > - ); > + EfiLibUninstallDriverBindingComponentName2 ( > + &gPxeBcIp4DriverBinding, > + &gPxeBcComponentName, > + &gPxeBcComponentName2 > + ); > } >=20 > return Status; > -- > 2.7.4 -------------------------------------------------------------------------= ---------- This email message is for the sole use of the intended recipient(s) and m= ay contain confidential information. Any unauthorized review, use, disclosure or di= stribution is prohibited. If you are not the intended recipient, please contact the= =20sender by reply email and destroy all copies of the original message. -------------------------------------------------------------------------= ----------