From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 2A56DAC0E62 for ; Wed, 21 Feb 2024 07:30:11 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=qPFjsKvffxQiNtZyyjFfxWmWMc9oFAGysbY2zzJGi4k=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20140610; t=1708500609; v=1; b=Lce36FF7+ZshO+Zyr3Glivcriv1sJzVMs64X58BCwlc6QMX8FNmksxYu/gsJczaSmbedoweP y6X+PX+y3AdwW+y3l1u0bYsjIF6eVEOUTObyhTzLIindu3aD3C4qc1VLMDiWhziugJROu8+b6Dv DCWvTGwIIbAJZM2YGrG4tph4= X-Received: by 127.0.0.2 with SMTP id 2KgtYY7687511x5UkmaxLO1a; Tue, 20 Feb 2024 23:30:09 -0800 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.79]) by mx.groups.io with SMTP id smtpd.web10.8196.1708500608687118496 for ; Tue, 20 Feb 2024 23:30:08 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dz1Qgz1IDX5135VRsOloBvzTG4+nZ38q+lYMdFANR0YB5TpuQS42oeYVSQJELZQXZq3RSoMHQdK024z9YWAziTiC0sDYC3AR8eCHicYRKSXiLoPRfQJr5bPycxEC4gK4YTTcxaHhe/w1knR2XWI/ntD2vPKUTcfTdyjImm7h7GqdCmi/c4VoHz6SyVL9VJDYZ12FRr/2gzCkAQgfxyFOoVBQqyc+cJmtwc01taIr1f7nVxTvk0pPVFz1hE21bWEM+EfFrBMMq3AlKrQdS3XyGdmZkSjX6daTp0qMu8ImOdSP9s49try/g00wb5RDU8p4HAnJuyy4h1XwI4mrDROWRQ== 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=cTlOh+HSYfZNmZRjZhF9RxPMCFayW/wNq3UiN1B9yzo=; b=Pr9wjEw5RfNCISqRKuaFe+5t71DrRAJVcscWuFGgxAPYjgzxH2O0ak4A63y5yjFN+7EMN7/L8Rzj2kpKSwyQBAl8WjawKj88uNTWyj3wSB1qRsIe8MncubE7EgQ1Gd+HSV0btlE2KRLY8luvZMLR8Kp5aWzqke7QuvGebVmbEcTgy7v7NShszdLGZ5hhJS3rc5ZFT+8M5zPah3BWszvPiXwl/EASBb3Ox3Fm5uvDVn39GevnoSNwRULlNcDW3A8wU/VXH0ty6ssrArLUdNj0yris7QbsjGNG1wG7oBnAUdzAA8Yn7KZlDhJ+q51ld8Ig7uFLlSGsF5AA2imj19iDBg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com (2603:10b6:303:1ef::6) by PH7PR12MB9150.namprd12.prod.outlook.com (2603:10b6:510:2eb::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.20; Wed, 21 Feb 2024 07:30:05 +0000 X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::aa79:3ab0:fbcd:d61b]) by MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::aa79:3ab0:fbcd:d61b%5]) with mapi id 15.20.7316.018; Wed, 21 Feb 2024 07:30:05 +0000 From: "Nickle Wang via groups.io" To: Mike Maslenkin , "devel@edk2.groups.io" , Abner Chang CC: Igor Kulchytskyy Subject: Re: [edk2-devel] [PATCH 2/4] RedfishClientPkg: refine RedfishExternalResourceResourceFeatureCallback Thread-Topic: [PATCH 2/4] RedfishClientPkg: refine RedfishExternalResourceResourceFeatureCallback Thread-Index: AQHaZFrBIcjuiFWeMkamSgcbkB0rx7EUZPZA Date: Wed, 21 Feb 2024 07:30:05 +0000 Message-ID: References: <20240221001303.57384-1-mike.maslenkin@gmail.com> <20240221001303.57384-3-mike.maslenkin@gmail.com> In-Reply-To: <20240221001303.57384-3-mike.maslenkin@gmail.com> Accept-Language: en-US X-Mentions: abner.chang@amd.com X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR12MB7031:EE_|PH7PR12MB9150:EE_ x-ms-office365-filtering-correlation-id: 60cd92b4-1c5c-41e1-4e21-08dc32aeecb6 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: +ES2m03H7qSgRXgikZzQ2GxUTBzHQavv9h6VQ1N2SazyHwfnutu4Nn2dhNBuC0AB7b758IMl5doRvXh9BznKMV57R8SfIXaXTcVN2Tq1+VcMxh6eCO3IiLdZ7Ptrv2wCy/HdQnbPaawGd+MgwzL/rYqrR8siXUQRSqlmO93xquILx+euvxbDllsKKsB4Dg2xstbbAJz3AYoZ67DD1RuEf0RjuvhGDZi6YT/N1+vwbCU/2o1xzARiuVOBWIoxMUKvY5omjeSQs2ne+k/bsecLv89nFR8KnFswAgaYR29+VQ97gpBLrUSfjkrQArv+jUcABRjnzpDEAEt0MFqfcz96fjtzmGfCo3ZhaLSJWRJaZPaDcONr0GmVFFFZZMSKZtlKFdhdqerOjbP6gGaX3PXLT6Cu/cw+HTkJp+EJSuad+bcT8tF6QpjTbISQEq+xmwsZ/0Kb0IpZqo5hEMdw4cbZnnkekeOO5kstqs9vKG8sjabS4NBniF2XzRCrB2aZQ/DLwDymKgFcaR4RONgSgxE83EiN/Re02/QuF4roYhv1Oz5YyPYwDV0gnvLy7x3MkApZRLlNmz3mffcLnlO89GZltdE6N5TIc8Tg+dxGcQmHE9R75XFiB2cdLEaYzUO2u3ai x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?DHvr3Ub/7Ht8qr89o/Yb/feW4puOP82xVuUEtqljMBr7SkbQsQeqw+SXfR7f?= =?us-ascii?Q?WB6jqz2CLbJg3gNaBDIeeTvVl9U28vzBMsQkPoTefRVJzMlJ4SmQ+oFNRcwr?= =?us-ascii?Q?2s76XInX5Ws7LKPMRy8hrFP64V/f6VXmlSbwKbS2uVxyp8tYY/dxE0phK3HJ?= =?us-ascii?Q?aklWmI0ntG6nEsXaNEznNmE2zm4SNSgg9RydDGRT7x03cBW1TPWTpxa9KLNv?= =?us-ascii?Q?bXiwjAXIz0uWxqZnMCuCKfKpQMNHOUf0DaCJ1BrIgapA3bEjTE92lbAMXVRY?= =?us-ascii?Q?Q0eNG7+OIodZczA70fuCp1U3UA8KeeCSzRdhnU/HflVrtkX6W9Ph6ZfuuPyJ?= =?us-ascii?Q?GkbdDr0ZL7CXUe4/P67kEmwEbluu5B21nhsLeEsaPs9e7x+/UK8CTTcrt7sE?= =?us-ascii?Q?66+lbW1wY0nSNjVIrPn5byWGEErtCrNkotNWaGv2xfbFASfUsqRKB2JxOKlY?= =?us-ascii?Q?kjvEGd89ZV2lPVN9DsBwn+0BkdbniHzp9hKShDA2CGKj0RLgh5V5qyg7ZLTI?= =?us-ascii?Q?F3X1fbse7g879qzduA+lV1kluFZzidzm9lrEK6QJAUIX8qa/8S+9VpA8vlFd?= =?us-ascii?Q?LDZIS6cQWiLOT/My/xWABDKgdC6ImEaUcSzjd6HnjNd/maHe4/PxJSD5W6ni?= =?us-ascii?Q?RdjvMKZappcmgqsIcjC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oHreKamMNcOCy?= =?us-ascii?Q?ToWQzoeb4RkqOMFTecQ=3D?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR12MB7031.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60cd92b4-1c5c-41e1-4e21-08dc32aeecb6 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2024 07:30:05.6244 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: HIKbcC3AJ/VMzxXfin7b10ZBrqvQq+OmTN4zvPqwf2kK/RGXhBvZx9PqPRlFe0xvUixbfkIbluw/zFueGHh0Pw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9150 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,nicklew@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: SHAUq9ffIRtFn8EELd2mmOKHx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MW4PR12MB7031B8751ECEC52A50E40AD3D9572MW4PR12MB7031namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=Lce36FF7; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io --_000_MW4PR12MB7031B8751ECEC52A50E40AD3D9572MW4PR12MB7031namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Mike, Thanks for incorporating my suggestion to address memory issue. For the nam= e "CollectionUri", I know this is from my suggestion, but I think Abner is = right. Could you please change it to "BiosUri" or "ResourceUri" since BIOS = resource is not a Redfish collection? @Abner Chang please comment here if you have ot= her naming preference. Thanks, Nickle > -----Original Message----- > From: Mike Maslenkin > Sent: Wednesday, February 21, 2024 8:13 AM > To: devel@edk2.groups.io > Cc: Mike Maslenkin ; Nickle Wang > ; Abner Chang ; Igor Kulchytskyy > > Subject: [PATCH 2/4] RedfishClientPkg: refine > RedfishExternalResourceResourceFeatureCallback > > External email: Use caution opening links or attachments > > > Use local variable for CollectionUri passed to HandleResource() to avoid = problems > in case of Private->Uri is overriden down the call stack. > > Suggested-by: Nickle Wang > > Cc: Abner Chang > > Cc: Nickle Wang > > Cc: Igor Kulchytskyy > > Signed-off-by: Mike Maslenkin > > --- > RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c > b/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c > index f40f2d85af80..396ec22969b5 100644 > --- a/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c > +++ b/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c > @@ -670,6 +670,7 @@ RedfishExternalResourceResourceFeatureCallback ( > REDFISH_SERVICE RedfishService; > > REDFISH_RESOURCE_COMMON_PRIVATE *Private; > > EFI_STRING ResourceUri; > > + EFI_STRING CollectionUri; > > > > if (FeatureAction !=3D CallbackActionStartOperation) { > > return EFI_UNSUPPORTED; > > @@ -707,19 +708,19 @@ RedfishExternalResourceResourceFeatureCallback ( > // > > // Initialize collection path > > // > > - Private->Uri =3D RedfishGetUri (ResourceUri); > > - if (Private->Uri =3D=3D NULL) { > > + CollectionUri =3D RedfishGetUri (ResourceUri); > > + if (CollectionUri =3D=3D NULL) { > > ASSERT (FALSE); > > FreePool (ResourceUri); > > return EFI_OUT_OF_RESOURCES; > > } > > > > - Status =3D HandleResource (Private, Private->Uri); > > + Status =3D HandleResource (Private, CollectionUri); > > if (EFI_ERROR (Status)) { > > - DEBUG ((DEBUG_ERROR, "%a, process external resource: %a failed: %r\n= ", > __func__, Private->Uri, Status)); > > + DEBUG ((DEBUG_ERROR, "%a, process external resource: %s failed: > + %r\n", __func__, CollectionUri, Status)); > > } > > > > - FreePool (Private->Uri); > > + FreePool (CollectionUri); > > FreePool (ResourceUri); > > return Status; > > } > > -- > 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115716): https://edk2.groups.io/g/devel/message/115716 Mute This Topic: https://groups.io/mt/104479572/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_MW4PR12MB7031B8751ECEC52A50E40AD3D9572MW4PR12MB7031namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Mike,

 

Thanks for incorporating my suggestion to address= memory issue. For the name "CollectionUri", I know this is from = my suggestion, but I think Abner is right. Could you please change it to &q= uot;BiosUri" or "ResourceUri" since BIOS resource is not a Redfish collection?

 

@Abner Chang please comm= ent here if you have other naming preference.

 

Thanks,

Nickle

 

> -----Original Message-----

> From: Mike Maslenkin <mike.maslenkin@gmai= l.com>

> Sent: Wednesday, February 21, 2024 8:13 AM

> To: devel@edk2.groups.io

> Cc: Mike Maslenkin <mike.maslenkin@gmail.= com>; Nickle Wang

> <nicklew@nvidia.com>; Abner Chang <= abner.chang@amd.com>; Igor Kulchytskyy

> <igork@ami.com>

> Subject: [PATCH 2/4] RedfishClientPkg: refin= e

> RedfishExternalResourceResourceFeatureCallba= ck

>

> External email: Use caution opening links or= attachments

>

>

> Use local variable for CollectionUri passed = to HandleResource() to avoid problems

> in case of Private->Uri is overriden down= the call stack.

>

> Suggested-by: Nickle Wang <nicklew@nvidia.com>

> Cc: Abner Chang <abner.= chang@amd.com>

> Cc: Nickle Wang <nicklew= @nvidia.com>

> Cc: Igor Kulchytskyy <igork@a= mi.com>

> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>

> ---

>  RedfishClientPkg/Features/Bios/v1_0_9/= Dxe/BiosDxe.c | 11 ++++++-----

>  1 file changed, 6 insertions(+), 5 del= etions(-)

>

> diff --git a/RedfishClientPkg/Features/Bios/= v1_0_9/Dxe/BiosDxe.c

> b/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/= BiosDxe.c

> index f40f2d85af80..396ec22969b5 100644

> --- a/RedfishClientPkg/Features/Bios/v1_0_9/= Dxe/BiosDxe.c

> +++ b/RedfishClientPkg/Features/Bios/v1_0_9/= Dxe/BiosDxe.c

> @@ -670,6 +670,7 @@ RedfishExternalResourceR= esourceFeatureCallback (

>    REDFISH_SERVICE  = ;            &n= bsp;   RedfishService;

>

>    REDFISH_RESOURCE_COMMON_PR= IVATE  *Private;

>

>    EFI_STRING  &nbs= p;            &= nbsp;       ResourceUri;

>

> +  EFI_STRING    &n= bsp;            = ;      CollectionUri;

>

>

>

>    if (FeatureAction !=3D Cal= lbackActionStartOperation) {

>

>      return EFI_UNS= UPPORTED;

>

> @@ -707,19 +708,19 @@ RedfishExternalResourc= eResourceFeatureCallback (

>    //

>

>    // Initialize collection p= ath

>

>    //

>

> -  Private->Uri =3D RedfishGetUri (R= esourceUri);

>

> -  if (Private->Uri =3D=3D NULL) {

>

> +  CollectionUri =3D RedfishGetUri (Res= ourceUri);

>

> +  if (CollectionUri =3D=3D NULL) {

>

>      ASSERT (FALSE)= ;

>

>      FreePool (Reso= urceUri);

>

>      return EFI_OUT= _OF_RESOURCES;

>

>    }

>

>

>

> -  Status =3D HandleResource (Private, = Private->Uri);

>

> +  Status =3D HandleResource (Private, = CollectionUri);

>

>    if (EFI_ERROR (Status)) {<= /p>

>

> -    DEBUG ((DEBUG_ERROR, &qu= ot;%a, process external resource: %a failed: %r\n",

> __func__, Private->Uri, Status));

>

> +    DEBUG ((DEBUG_ERROR, &qu= ot;%a, process external resource: %s failed:

> + %r\n", __func__, CollectionUri, Statu= s));

>

>    }

>

>

>

> -  FreePool (Private->Uri);

>

> +  FreePool (CollectionUri);

>

>    FreePool (ResourceUri);

>

>    return Status;

>

>  }

>

> --

> 2.32.0 (Apple Git-132)

 

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#115716) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MW4PR12MB7031B8751ECEC52A50E40AD3D9572MW4PR12MB7031namp_--