From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.44]) by mx.groups.io with SMTP id smtpd.web10.23858.1681619771170626705 for ; Sat, 15 Apr 2023 21:36:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=VM+lQGu8; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.244.44, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aMAaHpNC7DFW7NY53ImS2Bmg/leqy4DdhKS+oqPXBDtLIsWmI2lcjbt35oRvu5hk9yS03C218M/YiIW5TWCOBZLzkVLw/ii2yi1/pvQW1OQeUova2sjSQNhP7nEAlTiKB3/L7NH3DzQ6B/yx7r6DsjqiPDoLPw7pItfbaEszdML21WSXRkK1k9kRf/LAeM4gnO6IEA6JR2zKBGYa9IQ5PTcVp65eHksAYLkPSqioPCu/WX1wLCbX4/Phzp0GFhK/Os+LMT1B8KtXNUxAUv+yCNXZleMeLU6So807KEv0oqkQHs8vyFJhHFo4xdZvEOLbvQ1UXGCqJMjk4x4c0mb+vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2rUtp4pY1Zrs9l94NcREGSF5LZmsmaGq88g96xKaJSA=; b=eC2mrhjfCTb5PueYD8VQxJrh6twpfVDgOjFv9AZEyaWhc042QXqxa3X9m/ZA0npBlmZlC6oUHMxIDHKkX9WmiomntjFfusfYPaGHsfa6vJyEGQ7rk0kfSNLH2ynQEczO8uhfxo08MKlYgoJ28+al54yDsrkfPml2hQ1WQ71QhH24WM2/92mcDpg2fiOo2r7vO+pcNd+oydPF1L0TJV5ie33I27k/n8VnDrvA0crlV9uOWYmdTs2q/Erq+dPiDY+/5gtf3AOQUMVUgV2tUteOrJIg//soG3TU7i3+C8u825TVDv48Zh5tZI/WLXi8/tkJsDEyRM9Fszk70xQcwUub4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2rUtp4pY1Zrs9l94NcREGSF5LZmsmaGq88g96xKaJSA=; b=VM+lQGu8JfXGpS6MC68d2SPL6X26xcSSq2LZ3Cu0/M6hwOGeUA1luqjYNSdIrolSJ0YPT4Mb1v30qV76zLD2fmunUKbZsTyNeKjZAak3XAXmDBTGXwtU1vNiv0Pw3yVg9LV2KsRuoFCzyD0kt53b4VTYYde/7krjknbiVmFRUqM= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by DM4PR12MB5817.namprd12.prod.outlook.com (2603:10b6:8:60::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30; Sun, 16 Apr 2023 04:36:07 +0000 Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::30f:bd83:40dd:8f1]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::30f:bd83:40dd:8f1%3]) with mapi id 15.20.6298.030; Sun, 16 Apr 2023 04:36:06 +0000 From: "Chang, Abner" To: Minh Nguyen , "devel@edk2.groups.io" CC: "patches@amperecomputing.com" , "nicklew@nvidia.com" , "igork@ami.com" , "nhi@os.amperecomputing.com" , "tinhnguyen@os.amperecomputing.com" , Vu Nguyen Subject: Re: [PATCH 3/5] RedfishPkg: Create RestEx child on selected interface Thread-Topic: [PATCH 3/5] RedfishPkg: Create RestEx child on selected interface Thread-Index: AQHZbqnrNhk9IBTVY0uO/0xIkIbpUK8tWzpA Date: Sun, 16 Apr 2023 04:36:06 +0000 Message-ID: References: <20230414081903.7892-1-minhnguyen@os.amperecomputing.com> <20230414081903.7892-4-minhnguyen@os.amperecomputing.com> In-Reply-To: <20230414081903.7892-4-minhnguyen@os.amperecomputing.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2023-04-16T04:36:03Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=07942507-d5f7-4cbb-85db-8c4c664b62de; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR12MB3966:EE_|DM4PR12MB5817:EE_ x-ms-office365-filtering-correlation-id: 5f8c317d-60cf-4e55-99ef-08db3e3417c2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 2tSskuN2BMGnqU0jjUX0HmLm6JKA37gkFpc0AmxND3q0S/3nYZ0tTLUucL2/+Ot73XMwii5sPOHkjd8tyC1TLMoX31+3M/7z3tCG/2JtT3dq7T6xrNdfIo/L0xK0Q/WQb4orVtthDyCcGVpEZdp0oHsKoGd+7mTa1cja7iwIycY9rX+OOmD0YGeUrej0YMjA1kwNM8o6uwNwOO8Nveh/ijRzF8+IJyyNDnUT7t4+RjvMPrfY15PKYGxh513QOPNLCpIdGZ3mZz5kZKkP4Y7dDfDmodmW1kJnBVwdSSF0Gbwosy1Vj6ZRR27sihDV3kWqVoxHCedy7a9xtYNAuqh+C6Gr71anKD5FyGV3FTi7/jEYr9xVzepxwIyFaF1LsRF+7krTOlQDKn7KFhTlsw04q3sVNjmXMzLh0CWvJWFEP8sp8bvShMP5uJmRWs9HG409b97Ko1WeBtGxVLH/s8ZCSUOP6REZMrz6TFB4w7pW1t7Z3ngj6lgg4fec1v1gDm7qvjPl1pD+zxFvwzx097GP6EOUCXwi/nX2odftoGe5mQPRRGd71N8/8WaQqiszDntgk35XR09M9xp75H/qS9baR9oucMaAlu3ukYn5rLYLqmn0wdwyJXsI5aA1AFtLSdvg x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3966.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(396003)(346002)(366004)(39860400002)(451199021)(5660300002)(71200400001)(7696005)(66556008)(66476007)(2906002)(4326008)(66946007)(76116006)(64756008)(66446008)(86362001)(38070700005)(122000001)(41300700001)(33656002)(478600001)(38100700002)(52536014)(316002)(8936002)(8676002)(55016003)(54906003)(9686003)(53546011)(110136005)(6506007)(26005)(186003)(83380400001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?GuMRXmikPvn7jTLhvVFtU97NSOuPCsA5mLhzAdm2FN/uj2i232300gLdjSCM?= =?us-ascii?Q?lFpkvGC9iukovzpvAXAmjtggbACUlc4NO1Kv1lGVm5CXbnuI+AGyPImtIU/+?= =?us-ascii?Q?rM40uuPgB9rlATbkz1myCTzB40XFw61zaIfLyJ8vKB5B6Z0VG5U44zaBwW2/?= =?us-ascii?Q?7psquKcFdqwJSesMzJgwddwFDpnFssP0R+b6WzemtroaIuXKL4nmsVQDCE7k?= =?us-ascii?Q?uFIuCaicZc58dD77+WnWsp93Ht09dnfeYI7JSj7X+DkRB+mWRA5CAyuGLEdA?= =?us-ascii?Q?mgM1l0ZUhxYYp2C6qqd2P0gO0fHtOSqViVJliK/p0mYx3nDZZWblqq73WYEf?= =?us-ascii?Q?Gw2rOcemnIANHeLYDSf0bzCftYvkQnokcr9mxE7ObjMvKSAIJbK/2xMwy8yx?= =?us-ascii?Q?pKouY788RMtX10V6HqRcLeZZ53UdDt2egc9EgrauZaua51B5WsYNRCUEyU04?= =?us-ascii?Q?kBE3YqBx+v/Tbpo/qoLfW4MAqSH2Qwxs46qL+w9CTVZF9epvx3wDYz4pRANy?= =?us-ascii?Q?x0GrR+jOWQ0toyd6s6odOJsKbnD6JU0Jhu0CL/ztMEQpqkXulvsVNVsq9+8D?= =?us-ascii?Q?MmzabENYuCGaenceLS8DTNUwrV3JjE6ou5+jNCb7wwA0Ptpgnrdk8wKiCVaM?= =?us-ascii?Q?tN4EB1+zdtaWYmLz08b1hr87l6QZ7dZdRK7PYEXxl+/b6ReDbOa71H4YO6Po?= =?us-ascii?Q?nvD6Id4FkfZgkHwFUJdaljN9uHYVmo21TrC45r8W08y1XXelZ3qWVqLmiLWl?= =?us-ascii?Q?JILw/NrGA0UY32lPlHlZIOx7X5KPsQsiCT/9C/n/Mpl02zD98AeJts7ghSXI?= =?us-ascii?Q?nztO0dXrra/rovPEmSSDr48BrtrYR6bW2Pg1rXrTV0IRg5qRK4zm3VHbMhBr?= =?us-ascii?Q?3Fz9So6KR54YyAOToHlJhykTcspwDHsaqI4l2Vq0YeDDfTAtaCLIP2vbXyRw?= =?us-ascii?Q?PjbhOBFXuuA6DmTthYJfmL/OdqAXzDjAMxXt3TAClhpITq1l4Jbx2Oe59gpq?= =?us-ascii?Q?b646cvmywKJN+Pko6BWKTazHEZ+BDlRUSPn7aauaHY/AE4FUK++ZgaQ8pqVx?= =?us-ascii?Q?xWKA6OaxYTmOQrukKiJAvH5QTMq0ZzQl1Qeo/xGA1LtSWdNRRXUB5DDFf6dp?= =?us-ascii?Q?FkPNF1vMXxAPdZY3eBq/u0YoCniOjwijvelmq0ZUFrCDuPQfI7PVKty4ExFG?= =?us-ascii?Q?aOtcKFDilcrsKf5sbwBc0RO9LMMLl7sNpKA7AeauTJoBtQSdL2NDci7iM462?= =?us-ascii?Q?D1t1KvvafATdP4QZ4BBR1MxB+GoigE1d+c8arx4G1wTcX+R4wo+rIJ+Ig2Q4?= =?us-ascii?Q?kwRnB/tVeI9gznRy+Xin7emhjie2WYeOSoq45EDjojSeX8qLqzMu57muSvGJ?= =?us-ascii?Q?SytAlDtOqFtZP+s5fg/+aPmv0oLQiSnRMzM8FYVWc1XGRHV2l9c1hBVlIK/p?= =?us-ascii?Q?vdDbrWB2uZ9ELP020MLGZfQgnsBI7b+w1o1v+3gwmeUxgapoJULPdI6bvUEv?= =?us-ascii?Q?wC5aq/2aOMpulDPF2fLAJazHLm/hhUZHcOnLzzpcbeFtw9sWpxyTXoX/yMkN?= =?us-ascii?Q?W6gzzz1iyECGkEO7QuU=3D?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3966.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f8c317d-60cf-4e55-99ef-08db3e3417c2 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2023 04:36:06.0529 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 57zqjqjJu8PrNx2ZJhAdM6VkdAludAm7EOl+zD833tQuVD+VttY6QK905kfnnmfaBjNKt3LVJdxOxTsxa5diNg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5817 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Hi Minh, That is weird I can't find this patch set on group.io, and I can't apply th= is patch from email neither. Could you please check it? Thanks Abner > -----Original Message----- > From: Minh Nguyen > Sent: Friday, April 14, 2023 4:19 PM > To: devel@edk2.groups.io > Cc: patches@amperecomputing.com; Chang, Abner > ; nicklew@nvidia.com; igork@ami.com; > nhi@os.amperecomputing.com; tinhnguyen@os.amperecomputing.com; Vu > Nguyen ; Minh Nguyen > > Subject: [PATCH 3/5] RedfishPkg: Create RestEx child on selected interfac= e >=20 > Caution: This message originated from an External Source. Use proper > caution when opening attachments, clicking links, or responding. >=20 >=20 > From: Vu Nguyen >=20 > When a MAC address matching interface is found, a RestEx child will be > created to provide the Redfish communication on that interface. > Currently, It will try to locate all RestEx binding services and choose t= he first > satisfied instance without taking care about current selected interface. = This > might raise an issue on the system with multiple network devices that the > RestEx child was installed on wrong interface. >=20 > Signed-off-by: Minh Nguyen > --- > RedfishPkg/Include/Library/RestExLib.h | 3 + > RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c | 153 ++++++++-------= --- > -- > RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 1 + > 3 files changed, 63 insertions(+), 94 deletions(-) >=20 > diff --git a/RedfishPkg/Include/Library/RestExLib.h > b/RedfishPkg/Include/Library/RestExLib.h > index bc4e4ca6caa7..2c32c3684cf4 100644 > --- a/RedfishPkg/Include/Library/RestExLib.h > +++ b/RedfishPkg/Include/Library/RestExLib.h > @@ -2,6 +2,7 @@ > This library provides help functions for REST EX Protocol. >=20 > (C) Copyright 2020 Hewlett Packard Enterprise Development LP
> + Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -20,6 +21,7 @@ > This function allows the caller to create child handle for specific > REST server. >=20 > + @param[in] Controller The controller handle used of selecte= d > interface. > @param[in] Image The image handle used to open service= . > @param[in] AccessMode Access mode of REST server. > @param[in] ConfigType Underlying configuration to communica= te > with REST server. > @@ -32,6 +34,7 @@ > **/ > EFI_STATUS > RestExLibCreateChild ( > + IN EFI_HANDLE Controller, > IN EFI_HANDLE Image, > IN EFI_REST_EX_SERVICE_ACCESS_MODE AccessMode, > IN EFI_REST_EX_CONFIG_TYPE ConfigType, > diff --git a/RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c > b/RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c > index d9acad24dec1..6002be93c54e 100644 > --- a/RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c > +++ b/RedfishPkg/Library/DxeRestExLib/DxeRestExLib.c > @@ -2,6 +2,7 @@ > This library provides help functions for REST EX Protocol. >=20 > (C) Copyright 2020 Hewlett Packard Enterprise Development LP
> + Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -9,6 +10,7 @@ >=20 > #include > #include > +#include > #include #include > #include > @@ -21,6 +23,7 @@ > This function allows the caller to create child handle for specific > REST server. >=20 > + @param[in] Controller The controller handle used of selecte= d > interface. > @param[in] Image The image handle used to open service= . > @param[in] AccessMode Access mode of REST server. > @param[in] ConfigType Underlying configuration to communica= te > with REST server. > @@ -33,6 +36,7 @@ > **/ > EFI_STATUS > RestExLibCreateChild ( > + IN EFI_HANDLE Controller, > IN EFI_HANDLE Image, > IN EFI_REST_EX_SERVICE_ACCESS_MODE AccessMode, > IN EFI_REST_EX_CONFIG_TYPE ConfigType, > @@ -41,8 +45,6 @@ RestExLibCreateChild ( > ) > { > EFI_STATUS Status; > - UINTN NoBuffer; > - EFI_HANDLE *Handle; > EFI_HANDLE ChildHandle; > EFI_REST_EX_PROTOCOL *RestEx; > EFI_REST_EX_SERVICE_INFO *RestExServiceInfo; @@ -59,116 +61,79 @@ > RestExLibCreateChild ( > } >=20 > *ChildInstanceHandle =3D NULL; > - // > - // Locate all REST EX binding service. > - // > - Handle =3D NULL; > - NoBuffer =3D 0; > - Status =3D gBS->LocateHandleBuffer ( > - ByProtocol, > - &gEfiRestExServiceBindingProtocolGuid, > - NULL, > - &NoBuffer, > - &Handle > - ); > - if (EFI_ERROR (Status) && (Status !=3D EFI_BUFFER_TOO_SMALL)) { > + > + ChildHandle =3D NULL; > + Status =3D NetLibCreateServiceChild ( > + Controller, > + Image, > + &gEfiRestExServiceBindingProtocolGuid, > + &ChildHandle > + ); > + if (EFI_ERROR (Status)) { > + DEBUG (( > + DEBUG_ERROR, > + "%a: Failed to create service child - %r \n", > + __FUNCTION__, > + Status > + )); > return Status; > } > - > - Handle =3D (EFI_HANDLE *)AllocateZeroPool (sizeof (EFI_HANDLE) * > NoBuffer); > - if (Handle =3D=3D NULL) { > - return EFI_OUT_OF_RESOURCES; > - } > - > - Status =3D gBS->LocateHandleBuffer ( > - ByProtocol, > - &gEfiRestExServiceBindingProtocolGuid, > + Status =3D gBS->OpenProtocol ( > + ChildHandle, > + &gEfiRestExProtocolGuid, > + (VOID **)&RestEx, > + Image, > NULL, > - &NoBuffer, > - &Handle > + EFI_OPEN_PROTOCOL_GET_PROTOCOL > ); > if (EFI_ERROR (Status)) { > - FreePool (Handle); > - return Status; > + goto ON_ERROR; > } >=20 > // > - // Search for the proper REST EX instance. > + // Get the information of REST service provided by this EFI REST EX > + driver > // > - while (NoBuffer !=3D 0) { > - ChildHandle =3D NULL; > - Status =3D NetLibCreateServiceChild ( > - *(Handle + (NoBuffer - 1)), > - Image, > - &gEfiRestExServiceBindingProtocolGuid, > - &ChildHandle > - ); > - if (!EFI_ERROR (Status)) { > - Status =3D gBS->OpenProtocol ( > - ChildHandle, > - &gEfiRestExProtocolGuid, > - (VOID **)&RestEx, > - Image, > - NULL, > - EFI_OPEN_PROTOCOL_GET_PROTOCOL > - ); > - if (EFI_ERROR (Status)) { > - goto ON_ERROR; > - } > - > - // > - // Get the information of REST service provided by this EFI REST E= X driver > - // > - Status =3D RestEx->GetService ( > - RestEx, > - &RestExServiceInfo > - ); > - if (EFI_ERROR (Status)) { > - goto ON_ERROR; > - } > - > - // > - // Check REST EX property. > - // > - switch (ConfigType) { > - case EfiRestExConfigHttp: > - LenOfConfig =3D sizeof (EFI_REST_EX_HTTP_CONFIG_DATA); > - break; > - > - case EfiRestExConfigUnspecific: > - LenOfConfig =3D REST_EX_CONFIG_DATA_LEN_UNKNOWN; > - break; > + Status =3D RestEx->GetService ( > + RestEx, > + &RestExServiceInfo > + ); > + if (EFI_ERROR (Status)) { > + goto ON_ERROR; > + } > + // > + // Check REST EX property. > + // > + switch (ConfigType) { > + case EfiRestExConfigHttp: > + LenOfConfig =3D sizeof (EFI_REST_EX_HTTP_CONFIG_DATA); > + break; >=20 > - default: > - goto ON_ERROR; > - } > + case EfiRestExConfigUnspecific: > + LenOfConfig =3D REST_EX_CONFIG_DATA_LEN_UNKNOWN; > + break; >=20 > - if ((RestExServiceInfo- > >EfiRestExServiceInfoV10.RestServiceAccessMode !=3D AccessMode) || > - (RestExServiceInfo->EfiRestExServiceInfoV10.RestServiceType != =3D > ServiceType) || > - (RestExServiceInfo->EfiRestExServiceInfoV10.RestExConfigType != =3D > ConfigType) || > - ((LenOfConfig !=3D REST_EX_CONFIG_DATA_LEN_UNKNOWN) && > (RestExServiceInfo->EfiRestExServiceInfoV10.RestExConfigDataLength !=3D > LenOfConfig))) > - { > - goto ON_ERROR; > - } > - } > + default: > + goto ON_ERROR; > + } > + if (RestExServiceInfo->EfiRestExServiceInfoV10.RestServiceAccessMode != =3D > AccessMode || > + RestExServiceInfo->EfiRestExServiceInfoV10.RestServiceType !=3D > ServiceType || > + RestExServiceInfo->EfiRestExServiceInfoV10.RestExConfigType !=3D > ConfigType || > + ((LenOfConfig !=3D REST_EX_CONFIG_DATA_LEN_UNKNOWN) && > (RestExServiceInfo->EfiRestExServiceInfoV10.RestExConfigDataLength !=3D > LenOfConfig))) { > + goto ON_ERROR; > + } >=20 > - // > - // This is proper REST EX instance. > - // > - *ChildInstanceHandle =3D ChildHandle; > - FreePool (Handle); > - return EFI_SUCCESS; > + // > + // This is proper REST EX instance. > + // > + *ChildInstanceHandle =3D ChildHandle; > + return EFI_SUCCESS; >=20 > ON_ERROR:; > NetLibDestroyServiceChild ( > - *(Handle + (NoBuffer - 1)), > + Controller, > Image, > &gEfiRestExServiceBindingProtocolGuid, > ChildHandle > ); > - NoBuffer--; > - } > - > - FreePool (Handle); > return EFI_NOT_FOUND; > } > diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c > b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c > index 29e7b0624ebf..86ec88ddafc4 100644 > --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c > +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c > @@ -87,6 +87,7 @@ CreateRestExInstance ( > EFI_STATUS Status; >=20 > Status =3D RestExLibCreateChild ( > + Instance->NetworkInterface->OpenDriverControllerHandle, > Instance->Owner, > FixedPcdGetBool (PcdRedfishDiscoverAccessModeInBand) ? > EfiRestExServiceInBandAccess : EfiRestExServiceOutOfBandAccess, > EfiRestExConfigHttp, > -- > 2.39.0