Skip to content

RedfishClientPkg: Redfish task service support#98

Open
nicklela wants to merge 8 commits into
tianocore:mainfrom
nicklela:redfish-task-support
Open

RedfishClientPkg: Redfish task service support#98
nicklela wants to merge 8 commits into
tianocore:mainfrom
nicklela:redfish-task-support

Conversation

@nicklela

Copy link
Copy Markdown
Contributor

Description

Introduce driver and library to support Redfish task service.

How This Was Tested

Build pass on RedfishClientPkg.

@nicklela nicklela self-assigned this Oct 24, 2024
@nicklela nicklela force-pushed the redfish-task-support branch 4 times, most recently from 62a3d74 to 5881f20 Compare October 24, 2024 13:25
while (!IsNull (&Private->RegisteredList, Node)) {
Entry = REDFISH_TASK_REGISTERED_ENTRY_FROM_LIST (Node);

if ((StrCmp (Entry->ListenUri, Uri) == 0) && (Entry->Context == Context)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to check Context value at first?

JsonValueFree (TaskCollection);
}

return Status;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicklela, there is a compilation warning:

RedfishClientPkg/RedfishTaskServiceDxe/RedfishTaskServiceDxe.c:496:10: error: 'Status' may be used uninitialized in this function [-Werror=maybe-uninitialized]
return Status;
^~~~~~
cc1: all warnings being treated as errors.

@nicklela nicklela marked this pull request as draft January 22, 2025 23:49
@nicklela

Copy link
Copy Markdown
Contributor Author

I need more time to create flow diagram and explain how Redfish task works. So I convert this pull request to draft for now.

@achhetry

achhetry commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

@nicklela Can we move this draft for review?

Please review the attached files for Redfish Task Service flow.

Redfish_Client_Driver_Stack_Task_Service_Flow_Chart_with_markings Redfish_Client_Driver_Stack_Task_Service_Flow_Chart redfish-feature-driver-call-flow_with_markings redfish-feature-driver-call-flow RedfishTaskService_Interaction_Diagram

///
/// Definition of _EDKII_REDFISH_TASK_PROTOCOL.
///
struct _EDKII_REDFISH_TASK_PROTOCOL {
UINT32 Version;
REDFISH_TASK_REGISTER Register;
REDFISH_TASK_UNREGISTER Unregister;
REDFISH_TASK_REPORT_MESSAGE ReportMessage;
REDFISH_TASK_GET_PAYLOAD GetPayload;
REDFISH_TASK_FREE_PAYLOAD FreePayload;
};
The RedfishTaskServiceDxe registers with RedfishFeatureCoreDxe for the management of TaskService URI. RedfishFeatureCoreDxe
invokes registered callback for the task service management during Edk2RedfishFeatureDriverStartupEvent[11].
RedfishTaskService's callback invokes RedfishTaskServiceDispatcher to fetch the TaskCollection from the BMC.

The dispatcher will iterate through all the tasks available in the collection and will try to identify the associated
callback registered by the Redfish client feature driver. Later, once the associated callback is invoked the feature driver
requests the task payload through the RedfishTaskProtocol and performs the action required. Once completed or failed,
TaskStatus and TaskState is communicated back to the RedfishTaskServiceDxe which will eventually notify the BMC.

TaskService.md

@nicklela nicklela marked this pull request as ready for review April 25, 2026 15:54
@achhetry

achhetry commented May 15, 2026

Copy link
Copy Markdown
Contributor

Hi @nicklela , @changab , @igorkulchytskyy - Are we good with the Redfish TaskService flow, Can we merge this change?

@nicklela

Copy link
Copy Markdown
Contributor Author

Hi @nicklela , @changab , @igorkulchytskyy - Are we good with the Redfish TaskService flow, Can we merge this change?

I remember last time Igor had question about the design. @igorkulchytskyy if you have chance, could you check the flow diagram that @achhetry update above?

@igorkulchytskyy igorkulchytskyy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for me now. Thank you

@achhetry

Copy link
Copy Markdown
Contributor

Hi @nicklela , This branch has conflicts, can you please help to resolve

@changab

changab commented Jun 18, 2026

Copy link
Copy Markdown
Member

@nicklela, just a reminder for this PR.

nicklela added 5 commits June 23, 2026 20:40
Introduce new library to handle Redfish message. This library associate
Redfish message to corresponding Redfish URI. When Redfish resource is
ready for provisioning, driver can get all Redfish messages associated
with this Redfish URI and add them into provision data.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
…tate

Introduce new library of updating Redfish task state to BMC. The interface
between host and BMC for updating Redfish task state is not defined in
industrial specification. Since this depends on platform BMC
implementation, this library is created for platform owner to handle this
part.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Add new library to read Redfish protocol feature attribute. Redfish
feature driver calls this library to get protocol feature support
on BMC.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
… task

Introduce new driver to handle Redfish task service. This driver reads
Redfish task service and dispatch task to registered Redfish driver. When
Redfish driver is done with his job, this driver helps to return task
result back to BMC.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Add special handing for Redfish task service because task needs
to be called before Redfish feature driver. The request from Redfish
task may change the BIOS configuration so it has to be handled first.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
@nicklela nicklela force-pushed the redfish-task-support branch 3 times, most recently from 30bf20a to e234d82 Compare June 23, 2026 14:09
nicklela and others added 3 commits June 23, 2026 22:12
Enable Redfish task support by adding RedfishTaskDxe driver,
Redfish message library and Redfish task library to
RedfishClientPkg.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Add Redfish Task service driver and its design diagram to
Readme file.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Co-authored-by: Aman Chhetry <achhetry@qti.qualcomm.com>
Do not run patch checks to svg image files

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
@nicklela nicklela force-pushed the redfish-task-support branch from e234d82 to 52cdf91 Compare June 23, 2026 14:13
@nicklela

Copy link
Copy Markdown
Contributor Author

@nicklela, just a reminder for this PR.

Hi @changab @achhetry I have rebased this pull request to the top of tree.

@achhetry I add your diagram and description of task service in #98 (comment) to Readme.md file. Thanks for your great help!

Please help me to review this pull request and see if I missed anything, thanks!


**/

#ifndef REDFISH_MESSAGE_LIB_H_

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this repo keeping #ifndef or moving to #pragma once ?

DESTRUCTOR = RedfishMessageDestructor

#
# VALID_ARCHITECTURES = IA32 X64 EBC

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AARCH64

gEfiRedfishClientPkgTokenSpaceGuid.PcdRedfishCoreExecuteOnce|TRUE|BOOLEAN|0x10000007
# This is used to disable Redfish HTTP query by using "$expand" parameter even when
# Redfish service supports this query parameter.
gEfiRedfishClientPkgTokenSpaceGuid.PcdHttpExpandQueryDisabled|FALSE|BOOLEAN|0x2000000A

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some reason to change to 0x2* instead of incrementing previous one ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants