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 ACD52AC05F9 for ; Thu, 4 Jan 2024 02:32:45 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=040THIdOr+Fl6Xa/JxK0Df2qa4Kk78qsa+uk260Hg1k=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1704335564; v=1; b=SxMGJpGKzMQjEMEKKJeWLkNyaS0D0BwT/K/Qxrh2ynna/XwzVaVMrOYtUAsK05jTCuZyjTJd ZY6r3AzS/ND2gCdjrkh2L/EpdVFmiL/ii1+OsHReGBRQ+P1GMb1uhCtdczQn+HpPVU/17X8+JsW +jC79Jg0L8DHK1MEcwF4Rpmg= X-Received: by 127.0.0.2 with SMTP id kQFCYY7687511xpOQnLrHlWD; Wed, 03 Jan 2024 18:32:44 -0800 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.84]) by mx.groups.io with SMTP id smtpd.web10.46014.1704335563880897430 for ; Wed, 03 Jan 2024 18:32:44 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DyEdanfUuCXUtWk8kut+aLmUvgFWh383cjL6BDn/mavj+a0MXkR96rauaG7GvMhzUAkTscfkLCxcGkZB7RkFfXXoTR8OJgMYH8Y7ax3NiLiJbQGKCTHycYOae4OwZkISZN/4oz49lvSg2k0EQquWoBAea2sX5fbQabfAzS21WGn1aJMO0jw2+ZtrDThZkDQ5q5xXGWGooomJ9mhon7Yzf3z1FH6BpWDuxIMqa0yboxKwZkvNYJdUN4K31Dbo57CyLDndhZEN43sAk2NayRoZn5Zm0kk/drEWgriPQdEN1MMrUWs3RQjrhCM/b71kC1q4metyq1+4EU1SG4JMxQTVBw== 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=F7IZhQb/P55r3/Ir3+EU47JpE906+EWjdF70P8rpv1A=; b=WS+0ASxK+l/p9GEor9febiJ4qsCnX+I78luMbZZBRV7h+JX7CoTg2BJSIE6LR4bsplL03WtE6Fh/jahZW3kddSvHE0BV/o+KY5BYk6+Jp5PYBEVuJjFEVIXtKBMiolkEWnMW00m1G4CqbMBska+n4EKGwwCtUV9Qt3nI5KjaZiV8oTpKf7xeWHAIi41/BWhfAkV/bnFU/6xmlEKy7ok9BSBAtq8mR0BuU0IUgOY0GBnToR31NM82X02RMapT98x2RY8xmGo5kjBSDcSKflHsUxDqpQJrkXb+cHdT25uJLKQ/58FVdh01XhiwOlx2Ft4o49suL1CuNGKs6lqOw8Gaqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) X-Received: from MW4PR04CA0205.namprd04.prod.outlook.com (2603:10b6:303:86::30) by SA0PR12MB7076.namprd12.prod.outlook.com (2603:10b6:806:2d5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.13; Thu, 4 Jan 2024 02:32:39 +0000 X-Received: from CO1PEPF000044FB.namprd21.prod.outlook.com (2603:10b6:303:86:cafe::d7) by MW4PR04CA0205.outlook.office365.com (2603:10b6:303:86::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.13 via Frontend Transport; Thu, 4 Jan 2024 02:32:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.118.232) by CO1PEPF000044FB.mail.protection.outlook.com (10.167.241.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.1 via Frontend Transport; Thu, 4 Jan 2024 02:32:39 +0000 X-Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 18:32:29 -0800 X-Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 18:32:29 -0800 X-Received: from NV-CL38DL3.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Wed, 3 Jan 2024 18:32:28 -0800 From: "Nickle Wang via groups.io" To: CC: Abner Chang , Igor Kulchytskyy , "Nick Ramirez" Subject: [edk2-devel] [edk2-redfish-client][PATCH v2 08/10] RedfishClientPkg/EdkIIRedfishResourceConfigLib: use HTTP cache lib Date: Thu, 4 Jan 2024 10:32:27 +0800 Message-ID: <20240104023227.11302-1-nicklew@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044FB:EE_|SA0PR12MB7076:EE_ X-MS-Office365-Filtering-Correlation-Id: be65821b-ac50-40ad-5bbf-08dc0ccd6b9e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 4mNr4XglnN2N9H9OWnmjhu0xN6+/WH34L4BI0gS1aZ4IqAT04ToWBn5ZTyYeetOT3mdK5hjWHfVUdLjCsDOSJCaCYCkMsZQT29WtgT0AmBcXgt+tkSkm9tSdghy1Dcnjj7+TSXb1ToUpuvzTjFW/QFTCc/uZiUYpiuTilzOoJlEAAyknjBrKzVrdiMsowgK3ljz2P0wEWB/tbbknNX7o2g9JeuQYvsLZo6XIxF/s/xNmsnsRvR0tc1Q/8IOdKMYfpMwyyIhJJioKUd2suO6y4kyd0lE1h5Zfx6oHeEUPJCSnOFUcmx5U53F8HaZUdm6LC6xGjsIY+3c5K36ofeT8T0Ss+k/XxJU0aOMMVxfL0DzhrXnvLYPSAcim1AeF2660nonTIajqgLjlXTBF/HD67gwQve7WpjtN2gLOq4hZMk27AXZnZxhR2q58jrzQrz0hNSmeNoQQsmI3d351yhp2XIvdPMZI23B/cLIDSK4ugcx56mW/X4cWL8DBcg8TdAjUrTaoE8Uf9HvpnsHdL47nqsU1OKOpMi/ah0S6cctLvJZAW6ZVJrZn05Q9Qy6wjRtCPJtb8MgitT8zKbO1NRCn8+bKJuev0WeLgsOnml2FyOAYtY1EjVXlFlsGh0kwOxnFYoGxMoQg2vptTj7ZO/x/o5ECE2Bhl5F7LO8ZwG3XnALYQZ+246b25BpNwtRf0hQPbEf3LwkhJLW57GF6EOOprCyME43tCcMPg9pvdawfyZ8wIlf7XNg2z/Tq9Lgi/1z0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2024 02:32:39.2355 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: be65821b-ac50-40ad-5bbf-08dc0ccd6b9e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044FB.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB7076 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: VCIfLzw053d8TVbRELuJCFRbx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=SxMGJpGK; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Use Redfish Http cache library to query Redfish service. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy Cc: Nick Ramirez --- .../EdkIIRedfishResourceConfigLib.inf | 2 ++ .../EdkIIRedfishResourceConfigLib.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRe= dfishResourceConfigLib.inf b/RedfishClientPkg/Library/EdkIIRedfishResourceC= onfigLib/EdkIIRedfishResourceConfigLib.inf index 0da3423d..a5a81e9a 100644 --- a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishRe= sourceConfigLib.inf +++ b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishRe= sourceConfigLib.inf @@ -1,6 +1,7 @@ ## @file # # (C) Copyright 2022 Hewlett Packard Enterprise Development LP
+# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserve= d. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -38,6 +39,7 @@ MemoryAllocationLib RedfishFeatureUtilityLib RedfishPlatformConfigLib + RedfishHttpCacheLib =20 [Protocols] gEdkIIRedfishResourceConfigProtocolGuid ## CONSUMES ## diff --git a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRe= dfishResourceConfigLib.c b/RedfishClientPkg/Library/EdkIIRedfishResourceCon= figLib/EdkIIRedfishResourceConfigLib.c index 09ae3921..ed225a23 100644 --- a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishRe= sourceConfigLib.c +++ b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishRe= sourceConfigLib.c @@ -2,7 +2,7 @@ Redfish resource config library implementation =20 (C) Copyright 2022 Hewlett Packard Enterprise Development LP
- Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights res= erved. + Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights res= erved. =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -16,6 +16,7 @@ #include #include #include +#include =20 EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *mRedfishResourceConfigPr= otocol =3D NULL; EFI_HANDLE mCachedHandle; @@ -56,7 +57,8 @@ GetRedfishSchemaInfo ( return EFI_INVALID_PARAMETER; } =20 - Status =3D GetResourceByUri (RedfishService, Uri, &Response); + ZeroMem (&Response, sizeof (Response)); + Status =3D RedfishHttpGetResource (RedfishService, Uri, &Response, TRUE)= ; if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a, failed to get resource from %s: %r", __func_= _, Uri, Status)); return Status; --=20 2.34.1 -=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 (#113122): https://edk2.groups.io/g/devel/message/113122 Mute This Topic: https://groups.io/mt/103516020/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-