summaryrefslogtreecommitdiffstats
path: root/RedfishPkg/RedfishPkg.dec
diff options
context:
space:
mode:
authorNickle Wang <nicklew@nvidia.com>2024-02-01 12:52:53 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-02-29 03:25:18 +0000
commit1988f2df2960d558c0cde862e2082c45fe534098 (patch)
treed39e8c45f59cb0032d75b0f4e154ed00d8f04519 /RedfishPkg/RedfishPkg.dec
parent3e91e421365027ee3e655feab33c67a4f544c777 (diff)
downloadedk2-1988f2df2960d558c0cde862e2082c45fe534098.tar.gz
edk2-1988f2df2960d558c0cde862e2082c45fe534098.tar.bz2
edk2-1988f2df2960d558c0cde862e2082c45fe534098.zip
RedfishPkg: introduce Redfish HTTP protocol
Introduce Redfish HTTP protocol to improve Redfish performance and communication stability between BIOS and Redfish service. - Feature drivers often query same Redfish resource multiple times for different purpose. Implement HTTP cache mechanism to improve HTTP GET performance. "UseCache" parameter is provided if application likes to send HTTP GET request to Redfish service without using cache data. - This driver will retire stale cache data automatically when application modify Redfish resource at service side. - PCD PcdHttpCacheDisabled is used to disable cache mechanism in this driver for debugging purpose. - PCD PcdRedfishServiceContentEncoding is used to enable content encoding while sending data to Redfish service. - Redfish HTTP protocol also implement retry mechanism to retry HTTP request when BIOS receive unexpected response from Redfish service. This function helps BIOS Redfish to finish its job as much as possible. - PCDs are defined to control how many times BIOS will retry the request and how many time BIOS will wait between retries. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Co-authored-by: Igor Kulchytskyy <igork@ami.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Igor Kulchytskyy <igork@ami.com>
Diffstat (limited to 'RedfishPkg/RedfishPkg.dec')
-rw-r--r--RedfishPkg/RedfishPkg.dec24
1 files changed, 23 insertions, 1 deletions
diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec
index 3ea9ff3ef7..9b424efdf3 100644
--- a/RedfishPkg/RedfishPkg.dec
+++ b/RedfishPkg/RedfishPkg.dec
@@ -4,7 +4,7 @@
# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
# Copyright (c) 2023, American Megatrends International LLC.
-# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+# Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
@@ -93,6 +93,9 @@
# Redfish Host Interface ready notification protocol
gEdkIIRedfishHostInterfaceReadyProtocolGuid = { 0xC3F6D062, 0x3D38, 0x4EA4, { 0x92, 0xB1, 0xE8, 0xF8, 0x02, 0x27, 0x63, 0xDF } }
+ ## Include/Protocol/EdkIIRedfishHttpProtocol.h
+ gEdkIIRedfishHttpProtocolGuid = { 0x58a0f47e, 0xf45f, 0x4d44, { 0x89, 0x5b, 0x2a, 0xfe, 0xb0, 0x80, 0x15, 0xe2 } }
+
[Guids]
gEfiRedfishPkgTokenSpaceGuid = { 0x4fdbccb7, 0xe829, 0x4b4c, { 0x88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }}
@@ -154,3 +157,22 @@
# set to EFI_REST_EX_PROTOCOL.
#
gEfiRedfishPkgTokenSpaceGuid.PcdRedfishSendReceiveTimeout|5000|UINT32|0x00001009
+ ## This is used to enable HTTP content encoding on Redfish communication.
+ gEfiRedfishPkgTokenSpaceGuid.PcdRedfishServiceContentEncoding|TRUE|BOOLEAN|0x0000100A
+ #
+ # Use below PCDs to control Redfhs HTTP protocol.
+ #
+ ## The number of retry when HTTP GET request failed. If the value is 0, there is no retry enabled.
+ gEfiRedfishPkgTokenSpaceGuid.PcdHttpGetRetry|0|UINT16|0x0000100B
+ ## The number of retry when HTTP PUT request failed. If the value is 0, there is no retry enabled.
+ gEfiRedfishPkgTokenSpaceGuid.PcdHttpPutRetry|0|UINT16|0x0000100C
+ ## The number of retry when HTTP PATCH request failed. If the value is 0, there is no retry enabled.
+ gEfiRedfishPkgTokenSpaceGuid.PcdHttpPatchRetry|0|UINT16|0x0000100D
+ ## The number of retry when HTTP POST request failed. If the value is 0, there is no retry enabled.
+ gEfiRedfishPkgTokenSpaceGuid.PcdHttpPostRetry|0|UINT16|0x0000100E
+ ## The number of retry when HTTP DELETE request failed. If the value is 0, there is no retry enabled.
+ gEfiRedfishPkgTokenSpaceGuid.PcdHttpDeleteRetry|0|UINT16|0x0000100F
+ ## The number of second to wait before driver retry HTTP request. If the value is 0, there is no wait before next retry.
+ gEfiRedfishPkgTokenSpaceGuid.PcdHttpRetryWaitInSecond|1|UINT16|0x00001010
+ ## This is used to disable Redfish HTTP cache function and every request will be sent to Redfish service.
+ gEfiRedfishPkgTokenSpaceGuid.PcdHttpCacheDisabled|FALSE|BOOLEAN|0x00001011