From 747a08eae26bda91c53d232d3bd65946183693d0 Mon Sep 17 00:00:00 2001 From: Nickle Wang Date: Wed, 18 Oct 2023 19:59:20 +0800 Subject: [PATCH] RedfishPkg/RedfishDiscoverDxe: introduce PcdRedfishSendReceiveTimeout Introduce PCD PcdRedfishSendReceiveTimeout to RedfishDiscoverDxe driver. The SendReceiveTimeout is hard-code value in Redfish discover driver. With this PCD, platform owner can configure timeout value easily. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy Reviewed-by: Abner Chang Reviewed-by: Igor Kulchytskyy --- RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 2 +- RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.inf | 2 +- RedfishPkg/RedfishPkg.dec | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c index 17c88ad82d..2f9e604f6c 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -877,7 +877,7 @@ AddAndSignalNewRedfishService ( goto EXIT_FREE_CONFIG_DATA; } - RestExHttpConfigData->SendReceiveTimeout = 5000; + RestExHttpConfigData->SendReceiveTimeout = PcdGet32 (PcdRedfishSendReceiveTimeout); RestExHttpConfigData->HttpConfigData.HttpVersion = HttpVersion11; RestExHttpConfigData->HttpConfigData.LocalAddressIsIPv6 = CheckIsIpVersion6 (NetworkInterface); if (RestExHttpConfigData->HttpConfigData.LocalAddressIsIPv6) { diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.inf b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.inf index 950098bf6a..c982056fd7 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.inf +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.inf @@ -54,4 +54,4 @@ [Pcd] gEfiRedfishPkgTokenSpaceGuid.PcdRedfishDiscoverAccessModeInBand ## CONSUMES - + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishSendReceiveTimeout ## CONSUEMS diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec index cdb1528ced..0f18865cea 100644 --- a/RedfishPkg/RedfishPkg.dec +++ b/RedfishPkg/RedfishPkg.dec @@ -142,3 +142,8 @@ # This PCD indicates that if BMC bootstrap credential service will be disabled by BIOS or not. # gEfiRedfishPkgTokenSpaceGuid.PcdRedfishDisableBootstrapCredentialService|FALSE|BOOLEAN|0x00001007 + # + # The EFI_REST_EX_HTTP_CONFIG_DATA.SendReceiveTimeout value that RedfishDiscoverDxe driver + # set to EFI_REST_EX_PROTOCOL. + # + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishSendReceiveTimeout|5000|UINT32|0x00001008