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

Thu Nguyen OS thu at os.amperecomputing.com
Tue Jan 18 00:17:59 AEDT 2022


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20220117/83ccb544/attachment-0001.htm>


More information about the openbmc mailing list