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 253BC941514 for ; Thu, 29 Feb 2024 08:55:06 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=dY2rcn/GWlYtGiL613Z0/60ipX2y+0CUej8jaUoJXgU=; 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=1709196904; v=1; b=m8/xahHlMquVjYUoq9Cy5amRLqBtzLBhbLm8H5w1uDF5jiIWGf6lCTfJ4/Ra3W/qx3n/VsUk SmOUVoIrUm63Y9z/XWrzMeJk1zzA1tp2j+p0jPWkIwi70dpe8lffKugm6AnPJlE009D154coBzo udxYWWbagcQwhIPK517U+/R0= X-Received: by 127.0.0.2 with SMTP id mrUVYY7687511xng0UMzsFbe; Thu, 29 Feb 2024 00:55:04 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.76]) by mx.groups.io with SMTP id smtpd.web11.19933.1709196904314116303 for ; Thu, 29 Feb 2024 00:55:04 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QlqqyG4F2LS4BALSvXjE3tvkH3lYz08Fu585Kg7nnwSZLeHMatUacZvE+3aNy7nYDiWAdC6FpZQUH4WUy6LWZtrSl1RedKEYi77dhtXxTEmbZDj9HoiUNtz5iw1iETTW1xUr02wwAv76lEcPVPa36/TVGiyhs9hO7tTSWPAGe5L37I33uhXBsUZPrBQgiKyA0WunsdL+hc50mcNyNCNzwjre2rjKIEsVEpaGw2bKi/6ofD+xtrD0Dm9ny2USnOJp+0bqNgwugydAMtWb0Y0DaaDSkYBOQNZIzVF8eVFKlhwhO0g1nPuonmCyw/u0oOtMLGDzX2FbYswbioyFzcISzA== 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=/UqzO3dCJxs7rSwyqCiyj1fSxU3OkoxnvRnpmFaLwvM=; b=Asebu8vmFS1ozd8MiM1NlWhocwpiL1xZcqnZdP3j1vyBBu6vj3iwPBIw9BdhWeYgL4WW+FC/VuMt1TDVH+WOHIIqO/dYkJWQGhO+581rslyYz57UypUoBy3KZnVrNnEysVu5exZE5gWwJx/tR+D7jvKJhlGQQZ5n9Y8DmJZu7uHz1V3BTCO4Rpq5Gd+ASJL0GmhFA1tixk7hnnJt182kM0zFalUF/qbER6FRHKuOmuDxshsYz3wjpiRiUZn8JV0j27/Ny7cUPWXeT+49bWvROtyc89GbeSWv6qkIJaSq17wdVUXmFYkNw6whGiGoOtrQpBhLp9PXjWwpCTOUP5p3Ug== 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 MW4P220CA0025.NAMP220.PROD.OUTLOOK.COM (2603:10b6:303:115::30) by SA1PR12MB5669.namprd12.prod.outlook.com (2603:10b6:806:237::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.39; Thu, 29 Feb 2024 08:54:59 +0000 X-Received: from MWH0EPF000989E9.namprd02.prod.outlook.com (2603:10b6:303:115:cafe::12) by MW4P220CA0025.outlook.office365.com (2603:10b6:303:115::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.27 via Frontend Transport; Thu, 29 Feb 2024 08:54:58 +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 MWH0EPF000989E9.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Thu, 29 Feb 2024 08:54:58 +0000 X-Received: from drhqmail202.nvidia.com (10.126.190.181) 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; Thu, 29 Feb 2024 00:54:50 -0800 X-Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Thu, 29 Feb 2024 00:54:50 -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.1258.12 via Frontend Transport; Thu, 29 Feb 2024 00:54:49 -0800 From: "Nickle Wang via groups.io" To: CC: Abner Chang , Igor Kulchytskyy Subject: [edk2-devel] [edk2-redfish-client][PATCH 09/13] RedfishClientPkg/BootOptionCollectionDxe: ues RedfishHttpLib Date: Thu, 29 Feb 2024 16:54:48 +0800 Message-ID: <20240229085448.112591-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: MWH0EPF000989E9:EE_|SA1PR12MB5669:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e8f4d12-94f9-4f59-c1cf-08dc39041bbf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 45z87sMJ7jyhJgogotSKdlny1ZfssDr8Eo5L0Hi0t2HUum2pFDCe89dwI3c0KeyTEU2O3P1jGFyjA3XrJoy4A9ZvHGOWTEyLI5vwhaZqR6LyRzID5FgJcp0l67dJcFf+U8JQK7xdfHnLFI8E26EYouBKAUKUlxwU7KX3xoorBFxdAO+mwN5tnfBYMCew2l1chFm1vWeXnDbddZLmi5V5TBUON0N90OWaCUjXAeM658znqlf9VriOqx5O8lTJAV9mxdTHCOZHFuNUAICfOhizkYtE1gQbFkl3Ni1aZfl1ultGmm20obpA3y6mMNSbmmfSJ2by4tM7TV1gJ0vCQNTZs2bOtKr3kidyAXDPGsJJi5mB0fNfwm+6/cQCp93NhhxzP0uM/x2GBDqbTRQ1qn0SjaEX4T3aCDxRHTgAE2NquJa/8Tok1rwM/BxPV23jWc6iw/EVnKxvQ/RVaYkFnIkGEChFla552zLFOawJPfUXKVyh3ssX+QQiZJQqaZw1BmOz/QgOp226NF4yv0g6NAgEx1jpuy2Ikc2jB/Sgn6BhPSxBN428mzJsHpDAS5DZPQuOZYMYfbcB57qPVRWn5+SyIURLfZDOxOit4lAilvHnqjQFyfI38+nEY9AIKltQj7dUFSAPMGF1o9mkVQf7MY6ylmUuF/joukwrDZc6m7YuSe8i5NuAnMLk3z/fFBcRqnnEQa3p860m3QKcNvqWCtZoH2t1Y7D6E38+ahgUYBzbCVM4qLxHge5EjAQXlGldkD6g X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Feb 2024 08:54:58.7034 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2e8f4d12-94f9-4f59-c1cf-08dc39041bbf 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: MWH0EPF000989E9.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB5669 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: Jj0QDj1SqZNLKTlHeJGdr26ox7686176AA= 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="m8/xahHl"; 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 Use EDK2 RedfishHttpLib to replace RedfishHttpCacheLib and RedfishLib Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- .../BootOptionCollectionDxe.inf | 5 ++-- .../BootOptionCollectionDxe.c | 26 ++++--------------- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/RedfishClientPkg/Features/BootOptionCollection/BootOptionColle= ctionDxe.inf b/RedfishClientPkg/Features/BootOptionCollection/BootOptionCol= lectionDxe.inf index 7977fa461..90aae8e9e 100644 --- a/RedfishClientPkg/Features/BootOptionCollection/BootOptionCollectionDx= e.inf +++ b/RedfishClientPkg/Features/BootOptionCollection/BootOptionCollectionDx= e.inf @@ -3,7 +3,7 @@ # Redfish BootOptionCollection collection driver. # # (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP
-# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserve= d. +# Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights re= served. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -35,13 +35,12 @@ ConverterCommonLib MemoryAllocationLib RedfishFeatureUtilityLib - RedfishLib + RedfishHttpLib UefiLib UefiDriverEntryPoint UefiBootServicesTableLib EdkIIRedfishResourceConfigLib RedfishVersionLib - RedfishHttpCacheLib UefiBootManagerLib DevicePathLib =20 diff --git a/RedfishClientPkg/Features/BootOptionCollection/BootOptionColle= ctionDxe.c b/RedfishClientPkg/Features/BootOptionCollection/BootOptionColle= ctionDxe.c index 54cabcbe8..4f94a4495 100644 --- a/RedfishClientPkg/Features/BootOptionCollection/BootOptionCollectionDx= e.c +++ b/RedfishClientPkg/Features/BootOptionCollection/BootOptionCollectionDx= e.c @@ -3,7 +3,7 @@ Redfish feature driver implementation - BootOptionCollection =20 (C) Copyright 2020-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 @@ -169,7 +169,7 @@ MarkBootOptionProcessed ( // Get boot option reference attribute // ZeroMem (&Response, sizeof (REDFISH_RESPONSE)); - Status =3D RedfishHttpGetResource (RedfishService, Uri, &Response, TRUE)= ; + Status =3D RedfishHttpGetResource (RedfishService, Uri, NULL, &Response,= TRUE); if (EFI_ERROR (Status) || (Response.Payload =3D=3D NULL)) { DEBUG ((DEBUG_ERROR, "%a: failed to get resource from %s: %r", __func_= _, Uri, Status)); return Status; @@ -212,12 +212,7 @@ MarkBootOptionProcessed ( =20 ON_RELEASE: =20 - RedfishFreeResponse ( - Response.StatusCode, - Response.HeaderCount, - Response.Headers, - Response.Payload - ); + RedfishHttpFreeResponse (&Response); =20 return Status; } @@ -436,18 +431,7 @@ ReleaseCollectionResource ( // // Release resource // - if (Private->Response.Payload !=3D NULL) { - RedfishFreeResponse ( - Private->Response.StatusCode, - Private->Response.HeaderCount, - Private->Response.Headers, - Private->Response.Payload - ); - Private->Response.StatusCode =3D NULL; - Private->Response.HeaderCount =3D 0; - Private->Response.Headers =3D NULL; - Private->Response.Payload =3D NULL; - } + RedfishHttpFreeResponse (&Private->Response); =20 if (Private->CollectionJson !=3D NULL) { FreePool (Private->CollectionJson); @@ -478,7 +462,7 @@ CollectionHandler ( // // Query collection from Redfish service. // - Status =3D RedfishHttpGetResource (Private->RedfishService, Private->Col= lectionUri, &Private->Response, TRUE); + Status =3D RedfishHttpGetResource (Private->RedfishService, Private->Col= lectionUri, NULL, &Private->Response, TRUE); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a: unable to get resource from: %s :%r\n", __fu= nc__, Private->CollectionUri, Status)); goto ON_RELEASE; --=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 (#116148): https://edk2.groups.io/g/devel/message/116148 Mute This Topic: https://groups.io/mt/104640231/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-