Pldm: Requester: Manage multiple device and the sensors of those devices
Gilbert Chen
Gilbert.Chen at arm.com
Thu Jan 20 03:41:14 AEDT 2022
It is because that there are already some helper functions for PDR( e.g., parseStateSensorPDR https://github.com/openbmc/pldm/blob/master/libpldmresponder/pdr_utils.cpp#L144 )
So, it might be a good place to collect related functions. But as you pointed out that it is part of libpldmresponder. The platform-mc should not have dependency to this lib.
The implementation of platform-mc will fetch PDR from terminus.
Thanks,
Gilbert
From: Thu Nguyen OS <thu at os.amperecomputing.com>
Sent: Wednesday, January 19, 2022 3:41 PM
To: Gilbert Chen <Gilbert.Chen at arm.com>; openbmc at lists.ozlabs.org
Cc: Tung Nguyen OS <tungnguyen at os.amperecomputing.com>; Thang Nguyen OS <thang at os.amperecomputing.com>
Subject: Re: Pldm: Requester: Manage multiple device and the sensors of those devices
Hi Gilbert,
I wonder why do you use pdr_utils.cpp at step 4.1. Because it is belong to libresponder.
This lib will implement the features which BMC will role as slave.
It seem you are use static PDRs in the json file, right?
Regards.
Thu Nguyen.
From: Gilbert Chen <Gilbert.Chen at arm.com<mailto:Gilbert.Chen at arm.com>>
Date: Wednesday, 19 January 2022 at 03:44
To: Thu Nguyen OS <thu at os.amperecomputing.com<mailto:thu at os.amperecomputing.com>>, "openbmc at lists.ozlabs.org<mailto:openbmc at lists.ozlabs.org>" <openbmc at lists.ozlabs.org<mailto:openbmc at lists.ozlabs.org>>
Cc: Tung Nguyen OS <tungnguyen at os.amperecomputing.com<mailto:tungnguyen at os.amperecomputing.com>>, Thang Nguyen OS <thang at os.amperecomputing.com<mailto:thang at os.amperecomputing.com>>
Subject: RE: Pldm: Requester: Manage multiple device and the sensors of those devices
Hi Thu Nguyen,
I am working on the implementation of the proposal design and the implementation will be like what you describe.
1. modify mctp_endpoint_discovery.cpp slightly to be able to invoke not only fw-manager’s handleMCTPEndpoints() callback function but also other new added manager class(e.g., platform-mc manager)
2. create new folder platform-mc to hold the files related to platform-mc manager
3. platfom-mc manager identifies if the EIDs reported by mctp_endpoint_discovery.cpp are PLDM terminus or not.
4. platform-mc manager fetches/parses PDRs from every PLDM terminuses and then exports the status of discovered sensor to D-bus
4.1. modify pdr_utils.cpp to support to parse numeric sensor PDR and sensor auxiliary names PDR.
4.2. add numeric_sensor.cpp to export the status of numeric sensor to dbus-interfaces (xyz.openbmc_project.Sensor.Value, xyz.openbmc_project.State.Decorator.Availability, xyz.openbmc_project.State.Decorator.OperationalStatus)
Gilbert
From: openbmc <openbmc-bounces+gilbert.chen=arm.com at lists.ozlabs.org<mailto:openbmc-bounces+gilbert.chen=arm.com at lists.ozlabs.org>> On Behalf Of Thu Nguyen OS
Sent: Monday, January 17, 2022 1:18 PM
To: openbmc at lists.ozlabs.org<mailto:openbmc at lists.ozlabs.org>
Cc: Tung Nguyen OS <tungnguyen at os.amperecomputing.com<mailto:tungnguyen at os.amperecomputing.com>>; Thang Nguyen OS <thang at os.amperecomputing.com<mailto:thang at os.amperecomputing.com>>
Subject: Pldm: Requester: Manage multiple device and the sensors of those devices
Hi All,
In the current PLDM repo code, PLDM supported host_pdr_handler to manage the host PDRs. PLDM daemon will call this handler to check the host state and retrieve the host PDRs. The EID of the host is configured in host_eid. This limits the number PLDM device which PLDM daemon can manage simultaneously.
When role as the requester, BMC should support manage multiple PLDM devices and monitoring their sensors independently. To support this PLDM daemon should support handle multiple devices but not only host_eid.
In the commit https://github.com/openbmc/pldm/commit/fb3bc06f607d87da2588aefa116d75b2127d255a, Tom Joseph supported the MCTP device discovery mechanism in PLDM requester. This also detailed in proposal design: https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/47252.
I think we should check all devices and support manage them if they are PLDM devices. In that way we can support multiple PLDM devices.
I propose below design to support multiple PLDM devices in PLDM requester. Currently I’m implementing our host sensors in this way.
1. Add Device manager.
This class will manager all PLDM devices. Add/update/remove the discovered devices in MCTP D-Bus interfaces.
When there are new device, the manager will construct new device_pdr_handler as host_pdr_handler.
1. Add device_pdr_handler, I would like to call it as device handler but not only device pdr handler.
This class is similar as host_pdr_handler. But it is generic for all of device types.
The device handler will
* Verify the PLDM version, device status.
* Supported PLDM commands.
* Get PDR.
* Call sensor handler.
1. Add sensor handler to add/manage/monitor the sensors of that devices.
I would like to get your feedback about this design.
Regards,
Thu Nguyen.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20220119/a2487f1e/attachment-0001.htm>
More information about the openbmc
mailing list