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 81B5EAC0F90 for ; Wed, 3 Jan 2024 12:01:22 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Yhqrq4EJLB/nBuQbPQ6WLpKw+hkmTWh3xILFN8KGe74=; 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=1704283281; v=1; b=ZUBeSmnsUDSNNBAQOl/ylFXUa71hNv5pDrx1Uy6Cl7gVtHTIVsXkrIDH2svYP5SUGlERXTxk 3/Z08CfLk6kdpTGxq1xLKqaSFuRo/pMLS96Qb5ONZ7p/g2/hzTUAs8TqukSapWYU0+nvVNADPtC ZBV2b5uSdefiRqRdWEu3XlRw= X-Received: by 127.0.0.2 with SMTP id 2FpEYY7687511xeM0mJh7C0P; Wed, 03 Jan 2024 04:01:21 -0800 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.85]) by mx.groups.io with SMTP id smtpd.web11.15925.1704283280485018710 for ; Wed, 03 Jan 2024 04:01:20 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hsjdyH9TVJx0M3hju2suhh51Qp01XRqqXDLIZfLyHs+ScKi+XHNZAROl7fclsEWSpGle5x0TLAcffTp2QhCWXDe/ml6CGtPFUZ6I56CKSAcZS6g8Le7A//KRuXzd2iFTGpnGkbS0o3ggrN80InOJ1DMyM7kt6ZbBarN1t31JH61Uq6u5tCjiyUg81zvLZLMtIQ0HVC2W5n8leIVm/0dX3gtj5qVrsc2moZJBokSgc3iPtZtU5ElytW03ARVSHgZMNiazBpitoKmdCIIG/G4h+BtyWVxZsNzjbA6t5Q7TBLn9k9ygd8m2SAknY5JwCv0MSrOLhUYJJDgfnYRgTOlKHw== 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=fLpsOvDWZuJT35Ir15I397/DpWYz38pg9CP4lrMe2lMA1MkZXOVqq+zKp/kjDwZB9oy5/fD9xQItyL/Bv4mWBc4hTijFeq2Yqb4ktl6fwm230hyNby47bQj6Wu595WZk7PvaXCbdzTcVPqrOcxoniV0DPnP5xITTfsR8KEciisOpbztE6erPht2giCg6HkiP5xEeq7MlsBKd2YDVcIdJ6OVF1pwN0KwV11tAAYiacuWNs6PRXfUIX42BfMrUgeao0ioPy5DURQVWBUFXV8V0Ja8GCef0DXL+xSd4MX+VBsGKN4RbgCia1apPDmyuOha0mIy2dnnaurnfDH5lkESSIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) 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 MW4PR04CA0073.namprd04.prod.outlook.com (2603:10b6:303:6b::18) by CH0PR12MB5284.namprd12.prod.outlook.com (2603:10b6:610:d7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.13; Wed, 3 Jan 2024 12:01:17 +0000 X-Received: from CO1PEPF000042AC.namprd03.prod.outlook.com (2603:10b6:303:6b:cafe::bb) by MW4PR04CA0073.outlook.office365.com (2603:10b6:303:6b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.13 via Frontend Transport; Wed, 3 Jan 2024 12:01:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.118.233) by CO1PEPF000042AC.mail.protection.outlook.com (10.167.243.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Wed, 3 Jan 2024 12:01:16 +0000 X-Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.6) 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 04:01:05 -0800 X-Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail203.nvidia.com (10.126.190.182) 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 04:01:05 -0800 X-Received: from NV-CL38DL3.nvidia.com (10.127.8.13) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Wed, 3 Jan 2024 04:01:04 -0800 From: "Nickle Wang via groups.io" To: CC: Abner Chang , Igor Kulchytskyy , "Nick Ramirez" Subject: [edk2-devel] [edk2-redfish-client][PATCH 08/10] RedfishClientPkg/EdkIIRedfishResourceConfigLib: use HTTP cache lib Date: Wed, 3 Jan 2024 20:01:03 +0800 Message-ID: <20240103120103.62260-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: CO1PEPF000042AC:EE_|CH0PR12MB5284:EE_ X-MS-Office365-Filtering-Correlation-Id: 21237806-75f5-41ad-880b-08dc0c53b0ee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: sjMWxV5iz2Ph+asMgjX/tcxDPrMuJtI5AscPWvazesErHroRVVUSWGA7YQDW24mOLHNCi7HSvk38/QyBHvmTKdLEz9Rc22VJppJwd8OOkxE85XQgd5kNDoDthARIFydGSjLEHbJr9MIwQMftgOV5jua03y67pOXFVwlVrXvhmtOBEeVuob2J+Kh2KmmFQKT/BozZITmPYniVnf8H9HD0gnTlM6Gd+cfYRatVnh6Vo2riXlJ8Q6uM1CfT81i4Pm2bkHlxldBZrQEa+m6x1K+tNW04bODF94XaDeWG8NjglFRPOBz9nLscHoZO83knTTspfvljvl6bOvjMhlhzEWqAZf4CLPaUQ8VyoPOyGgRE/VhPqc9GQNKGUSKjxWoRG4NeFhMd5haptXHbdzWQ1nkLA9FIQCyl8pMCk0Mt+qcRPKHHOLe5WJTYKUzXnRlhnmqZJKc96rwueBF9VI6nYBuFmNQkhxhutYF3yG2Ake/FNSYQgElnE6WJyiGcbBDMqlGhmxXIanP+P0GGAhb99Y4CaP/j/4VA5NDun8yyO2JQgRS0vrb2G9iODV3XwLGgaW9Oh6eA/zFDyetrO+nrLKySiQCPkczsHw8T4xXufcvvF7yZFKXb+TZiyPt2KYRTdTpeNbaxhkP+wH7Es82c5a30iSBXgfWHjSE02Fyw0biJTI2BX8JA9yZp/6pBLsZZdQYrGWwRLMxHsP7IYiQe8g/Gb1W1X/sogoKcZA68nxxBV/QxHaPU4qKIDcW5SvyDdYQ/ X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 12:01:16.9071 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 21237806-75f5-41ad-880b-08dc0c53b0ee 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.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042AC.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5284 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: SwAsfRsj5g0DbAjdvsTD5VsJx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-Spam-Flag: yes X-Spam-Level: ************ X-GND-Spam-Score: 190 X-GND-Status: SPAM Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=ZUBeSmns; 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 (#113078): https://edk2.groups.io/g/devel/message/113078 Mute This Topic: https://groups.io/mt/103500389/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-