<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle22
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:287467524;
mso-list-template-ids:-2102617498;}
@list l0:level1
{mso-level-start-at:3;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1
{mso-list-id:537400562;
mso-list-type:hybrid;
mso-list-template-ids:-1662761406 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:1.0in;
text-indent:-.25in;
font-family:Symbol;}
@list l1:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:1.5in;
text-indent:-.25in;
font-family:"Courier New";}
@list l1:level3
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:2.0in;
text-indent:-.25in;
font-family:Wingdings;}
@list l1:level4
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:2.5in;
text-indent:-.25in;
font-family:Symbol;}
@list l1:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:3.0in;
text-indent:-.25in;
font-family:"Courier New";}
@list l1:level6
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:3.5in;
text-indent:-.25in;
font-family:Wingdings;}
@list l1:level7
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:4.0in;
text-indent:-.25in;
font-family:Symbol;}
@list l1:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:4.5in;
text-indent:-.25in;
font-family:"Courier New";}
@list l1:level9
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:5.0in;
text-indent:-.25in;
font-family:Wingdings;}
@list l2
{mso-list-id:667440576;
mso-list-template-ids:36093508;}
@list l3
{mso-list-id:1066879316;
mso-list-template-ids:-1704933564;}
@list l3:level1
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l3:level2
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l3:level3
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l3:level4
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l3:level5
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l3:level6
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l3:level7
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l3:level8
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l3:level9
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l4
{mso-list-id:1324550137;
mso-list-template-ids:1000626870;}
@list l4:level1
{mso-level-start-at:2;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5
{mso-list-id:1956404610;
mso-list-type:hybrid;
mso-list-template-ids:-235140876 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l5:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l5:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l5:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">It is because that there are already some helper functions for PDR( e.g., parseStateSensorPDR <a href="https://github.com/openbmc/pldm/blob/master/libpldmresponder/pdr_utils.cpp#L144">https://github.com/openbmc/pldm/blob/master/libpldmresponder/pdr_utils.cpp#L144</a>
)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">The implementation of platform-mc will fetch PDR from terminus.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Gilbert<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Thu Nguyen OS <thu@os.amperecomputing.com>
<br>
<b>Sent:</b> Wednesday, January 19, 2022 3:41 PM<br>
<b>To:</b> Gilbert Chen <Gilbert.Chen@arm.com>; openbmc@lists.ozlabs.org<br>
<b>Cc:</b> Tung Nguyen OS <tungnguyen@os.amperecomputing.com>; Thang Nguyen OS <thang@os.amperecomputing.com><br>
<b>Subject:</b> Re: Pldm: Requester: Manage multiple device and the sensors of those devices<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">Hi Gilbert,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I wonder why do you use pdr_utils.cpp at step 4.1. Because it is belong to libresponder.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">This lib will implement the features which BMC will role as slave.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">It seem you are use static PDRs in the json file, right?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Regards.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thu Nguyen.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Gilbert Chen <</span><a href="mailto:Gilbert.Chen@arm.com"><span style="font-size:12.0pt">Gilbert.Chen@arm.com</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Date: </b>Wednesday, 19 January 2022 at 03:44<br>
<b>To: </b>Thu Nguyen OS <</span><a href="mailto:thu@os.amperecomputing.com"><span style="font-size:12.0pt">thu@os.amperecomputing.com</span></a><span style="font-size:12.0pt;color:black">>, "</span><a href="mailto:openbmc@lists.ozlabs.org"><span style="font-size:12.0pt">openbmc@lists.ozlabs.org</span></a><span style="font-size:12.0pt;color:black">"
<</span><a href="mailto:openbmc@lists.ozlabs.org"><span style="font-size:12.0pt">openbmc@lists.ozlabs.org</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Cc: </b>Tung Nguyen OS <</span><a href="mailto:tungnguyen@os.amperecomputing.com"><span style="font-size:12.0pt">tungnguyen@os.amperecomputing.com</span></a><span style="font-size:12.0pt;color:black">>, Thang Nguyen OS <</span><a href="mailto:thang@os.amperecomputing.com"><span style="font-size:12.0pt">thang@os.amperecomputing.com</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Subject: </b>RE: Pldm: Requester: Manage multiple device and the sensors of those devices<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Hi Thu Nguyen,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am working on the implementation of the proposal design and the implementation will be like what you describe.<o:p></o:p></p>
<p class="MsoNormal">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)<o:p></o:p></p>
<p class="MsoNormal">2. create new folder platform-mc to hold the files related to platform-mc manager<o:p></o:p></p>
<p class="MsoNormal">3. platfom-mc manager identifies if the EIDs reported by mctp_endpoint_discovery.cpp are PLDM terminus or not.<o:p></o:p></p>
<p class="MsoNormal">4. platform-mc manager fetches/parses PDRs from every PLDM terminuses and then exports the status of discovered sensor to D-bus<o:p></o:p></p>
<p class="MsoNormal">4.1. modify pdr_utils.cpp to support to parse numeric sensor PDR and sensor auxiliary names PDR.<o:p></o:p></p>
<p class="MsoNormal">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)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Gilbert<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> openbmc <</span><a href="mailto:openbmc-bounces+gilbert.chen=arm.com@lists.ozlabs.org"><span lang="EN-US">openbmc-bounces+gilbert.chen=arm.com@lists.ozlabs.org</span></a><span lang="EN-US">>
<b>On Behalf Of </b>Thu Nguyen OS<br>
<b>Sent:</b> Monday, January 17, 2022 1:18 PM<br>
<b>To:</b> </span><a href="mailto:openbmc@lists.ozlabs.org"><span lang="EN-US">openbmc@lists.ozlabs.org</span></a><span lang="EN-US"><br>
<b>Cc:</b> Tung Nguyen OS <</span><a href="mailto:tungnguyen@os.amperecomputing.com"><span lang="EN-US">tungnguyen@os.amperecomputing.com</span></a><span lang="EN-US">>; Thang Nguyen OS <</span><a href="mailto:thang@os.amperecomputing.com"><span lang="EN-US">thang@os.amperecomputing.com</span></a><span lang="EN-US">><br>
<b>Subject:</b> Pldm: Requester: Manage multiple device and the sensors of those devices<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">Hi All,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">In the commit </span><a href="https://github.com/openbmc/pldm/commit/fb3bc06f607d87da2588aefa116d75b2127d255a"><span lang="EN-US">https://github.com/openbmc/pldm/commit/fb3bc06f607d87da2588aefa116d75b2127d255a</span></a><span lang="EN-US">,
Tom Joseph supported the MCTP device discovery mechanism in PLDM requester. This also detailed in proposal design:
</span><a href="https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/47252"><span lang="EN-US">https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/47252</span></a><span lang="EN-US">.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I think we should check all device</span><span lang="VI">s</span><span lang="EN-US"> and support manage them if they are PLDM devices.
</span><span lang="VI">In that </span><span lang="EN-US">way we can support multiple PLDM devices.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I propose below design to support multiple PLDM devices in PLDM requester. Currently I’m implementing our host sensors in this way.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l5 level1 lfo3"><span lang="EN-US">Add Device manager.<o:p></o:p></span></li></ol>
<p class="MsoListParagraph"><span lang="EN-US">This class will manager all PLDM devices. Add/update/remove the discovered devices in MCTP D-Bus interfaces.<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-US">When there are new device, the manager will construct new device_pdr_handler as host_pdr_handler.<o:p></o:p></span></p>
<ol style="margin-top:0in" start="2" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l5 level1 lfo3"><span lang="EN-US">Add device_pdr_handler, I would like to call it as device handler
</span><span lang="VI">but not only device pdr handler</span><span lang="EN-US">.<o:p></o:p></span></li></ol>
<p class="MsoListParagraph"><span lang="VI">Th</span><span lang="EN-US">is class is similar as host_pdr_handler. But it is generic for all of device types.<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-US">The device handler will<o:p></o:p></span></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph" style="mso-list:l1 level1 lfo7"><span lang="EN-US">Verify the PLDM version, device status.<o:p></o:p></span></li><li class="MsoListParagraph" style="mso-list:l1 level1 lfo7"><span lang="EN-US">Supported PLDM commands</span><span lang="VI">.</span><span lang="EN-US"><o:p></o:p></span></li><li class="MsoListParagraph" style="mso-list:l1 level1 lfo7"><span lang="EN-US">Get PDR</span><span lang="VI">.</span><span lang="EN-US"><o:p></o:p></span></li><li class="MsoListParagraph" style="mso-list:l1 level1 lfo7"><span lang="EN-US">Call sensor handler.<o:p></o:p></span></li></ul>
<ol style="margin-top:0in" start="3" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l5 level1 lfo3"><span lang="EN-US">Add sensor handler to add/manage/monitor the sensors of that devices.<o:p></o:p></span></li></ol>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I would like to get your feedback about this design.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="VI">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="VI">Thu Nguyen.<o:p></o:p></span></p>
<p class="MsoNormal">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.
<o:p></o:p></p>
</div>
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.
</body>
</html>