<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=us-ascii">
<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;}
@font-face
{font-family:"Abadi Extra Light";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
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.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@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:819734257;
mso-list-type:hybrid;
mso-list-template-ids:-1779634242 -2075639068 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Calibri",sans-serif;
mso-fareast-font-family:Calibri;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
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-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hello Team, <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">This email is to discuss the implementation details regarding
<u>state sensors</u> association with <u>inventory objects</u> when multiple applications are involved.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">On our platform, we have a service that populates different inventory objects like CPU, GPU, Power Supply, Memory, etc.
<o:p></o:p></p>
<p class="MsoNormal">For example, let’s say there is a CPU instance that is represented over dbus like below
<o:p></o:p></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">/xyz/openbmc_project/inventory/system/processors/CPU0<o:p></o:p></li></ul>
<p class="MsoListParagraph"><o:p> </o:p></p>
<p class="MsoNormal">Then we have another application that hosts state sensor information related to this CPU0 instance.
<o:p></o:p></p>
<p class="MsoNormal">To be more specific the second application is the pldm daemon which reads all the state sensor information related to this CPU.
<o:p></o:p></p>
<p class="MsoNormal">These are discrete sensors that are represented using unique dbus interfaces.
<o:p></o:p></p>
<p class="MsoNormal">Example (dbus interface)<o:p></o:p></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">CPU throttle state (xyz.openbmc_project.State.ProcessorPerformance)
<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">CPU power supply reg state (xyz.openbmc_project.State.Decorator.PowerSystemInputs) <o:p></o:p></li></ul>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Now in the above case if I must associate the state sensor (from Pldm) with the inventory object (from a different app) then what would be a preferred way?
<o:p></o:p></p>
<p class="MsoNormal">My end goal is to get these state sensors over redfish and association will help me identify the relation between the entities and the sensor data.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Few thoughts which are in my mind <o:p></o:p></p>
<p class="MsoNormal" style="text-indent:.5in"><b>Option 1: Both applications use the exact same dbus object path </b><span style="font-family:"Abadi Extra Light",sans-serif">
</span><b><o:p></o:p></b></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-family:"Abadi Extra Light",sans-serif">App1 :<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Abadi Extra Light",sans-serif"> - /xyz/openbmc_project/inventory/system/processors/CPU0<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Abadi Extra Light",sans-serif"> - xyz.openbmc_project.Inventory.Item.Cpu<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Abadi Extra Light",sans-serif"> App2 (pldmd) :<o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-family:"Abadi Extra Light",sans-serif"> - /xyz/openbmc_project/inventory/system/processors/CPU0<o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-family:"Abadi Extra Light",sans-serif"> - xyz.openbmc_project.State.ProcessorPerformance<o:p></o:p></span></p>
<p class="MsoNormal"> Bmcweb uses the object mapper to get the object path which implements the required dbus interface and then will identity the CPU0 instance from the object path. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <b>Option 2</b>: <b>There will be an explicit association defined between the inventory object and the state sensor object</b><span style="font-family:"Abadi Extra Light",sans-serif">
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-family:"Abadi Extra Light",sans-serif">App1 :<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Abadi Extra Light",sans-serif"> - /xyz/openbmc_project/inventory/system/processors/CPU0<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Abadi Extra Light",sans-serif"> - xyz.openbmc_project.Inventory.Item.Cpu<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Abadi Extra Light",sans-serif"> - .Associations<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Abadi Extra Light",sans-serif"> - all_states<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-family:"Abadi Extra Light",sans-serif"> - /xyz/openbmc_project/State/CPU0_Performance<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Abadi Extra Light",sans-serif"> App2 (pldmd) :<o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-family:"Abadi Extra Light",sans-serif"> - /xyz/openbmc_project/State/CPU0_Performance<o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-family:"Abadi Extra Light",sans-serif"> - xyz.openbmc_project.State.ProcessorPerformance<o:p></o:p></span></p>
<p class="MsoNormal"> New keyword ‘all_states’ is used as an association string.
<o:p></o:p></p>
<p class="MsoNormal"> Bmcweb will use this association to find the object path of the state sensor which implements the state sensor which belongs to the CPU0 instance.
<o:p></o:p></p>
<p class="MsoNormal"> This pattern is very similar to how the numeric sensor code is working today.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Please provide your thoughts/preferences regarding the options.
<o:p></o:p></p>
<p class="MsoNormal">Comment If there are other ways to solve the same problem. <o:p>
</o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks and Regards,<o:p></o:p></p>
<p class="MsoNormal">Rohit PAI <o:p></o:p></p>
</div>
</body>
</html>