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>
44 lines
1.1 KiB
C
44 lines
1.1 KiB
C
/** @file
|
|
This header file defines Redfish service and Redfish data structures that
|
|
are used to communicate with Redfish Ex Protocol.
|
|
|
|
Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
|
(C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
|
|
Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#ifndef REDFISH_SERVICE_DATA_H_
|
|
#define REDFISH_SERVICE_DATA_H_
|
|
|
|
#include <Uefi.h>
|
|
#include <Protocol/Http.h>
|
|
|
|
typedef VOID *REDFISH_SERVICE;
|
|
typedef VOID *REDFISH_PAYLOAD;
|
|
|
|
///
|
|
/// REDFISH_REQUEST definition.
|
|
///
|
|
typedef struct {
|
|
UINTN HeaderCount;
|
|
EFI_HTTP_HEADER *Headers;
|
|
CHAR8 *Content;
|
|
CHAR8 *ContentType;
|
|
UINTN ContentLength;
|
|
} REDFISH_REQUEST;
|
|
|
|
///
|
|
/// REDFISH_REQUEST definition.
|
|
///
|
|
typedef struct {
|
|
EFI_HTTP_STATUS_CODE *StatusCode;
|
|
UINTN HeaderCount;
|
|
EFI_HTTP_HEADER *Headers;
|
|
REDFISH_PAYLOAD Payload;
|
|
} REDFISH_RESPONSE;
|
|
|
|
#endif
|