Pldm: Requester: Manage multiple device and the sensors of those devices

Gilbert Chen Gilbert.Chen at arm.com
Wed Jan 19 07:43:59 AEDT 2022


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> On Behalf Of Thu Nguyen OS
Sent: Monday, January 17, 2022 1:18 PM
To: openbmc at lists.ozlabs.org
Cc: Tung Nguyen OS <tungnguyen at os.amperecomputing.com>; Thang Nguyen OS <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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20220118/719b0b94/attachment-0001.htm>


More information about the openbmc mailing list