<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10pt" ><div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10pt" ><div dir="ltr" ><p class="p1" >Hi Ed, Rashmi,<br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br>IBM are working on supporting NVMe drive health monitoring for some new system designs and have been posting some patches to dbus-sensors (e.g. [1]).<br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br>[1] <a href="https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/38058/" >https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/38058/</a><br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br>As some background our high level requirements are that we need to:<br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br>1. Monitor NVMe drive health to supply data for fan management and error logging<br>2. Support arbitrary drive configurations in the platform(s), which are plugged into removable IO cards<br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br>As you're no doubt aware, NVMe drive state is exposed via two interfaces:<br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br>3. A Basic Management Command over SMBus<br>4. NVMe-MI over MCTP, via the SMBus MCTP binding<br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br>And in OpenBMC there are two corresponding NVMe monitoring implementations:<br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br>5. phosphor-nvme: Basic Management Command, static configuration<br>6. dbus-sensors: NVMe-MI over MCTP, dynamic configuration<br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br>IBM are migrating our BMC designs towards entity-manager and dbus-sensors, and our newer system designs would benefit from dbus-sensor's dynamic configuration via entity-manager (we have reservations about the drive presence GPIO configuration in the phosphor-nvme with respect to our system designs).<br>Zooming out briefly we're looking to, where possible, use upstream code and avoid the use of forks. However, as dbus-sensors uses NVMe-MI over MCTP via libmctp, we have some concerns:<br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br>7. Upstream libmctp (openbmc/libmctp) currently implements just two bindings<br> a. Serial (DSP0253)<br> b. ASTLPC (Vendor-specific binding)<br>8. Intel have forked libmctp (intel-bmc/libmctp) and implemented a further two bindings<br> a. SMBus (DSP0237)<br> b. PCIe VDM (DSP0238)<br>9. Both the SMBus and PCIe VDM binding implementations in intel-bmc/libmctp require kernel patches that only exist in Intel's OpenBMC tree<br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br>Finally, for the moment, the data provided by the NVMe Basic Management Command meets IBM's current requirements, and we're using drives that support the Basic Management Command.<br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br>So the direction we chose is to use entity-manager and dbus-sensors for NVMe drive monitoring, and<br>implement support for the Basic Management Command over SMBus in the NVMeSensor application. To get there, as far as I have determined, we should do the following:<br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br>10. Make optional the dependency of NVMeSensor on the forked libmctp<br>11. Add a compile-time flag to {en,dis}able the MCTP NVMe-MI backend<br>12. Add a compile-time flag to {en,dis}able the Basic Management Command backend<br>13. Patch intel-bmc/openbmc to configure NVMeSensor with MCTP NVMe-MI enabled<br>14. Change the default build configuration of NVMeSensor use the Basic Management Command<br>15. Enable out-of-tree builds of NVMeSensor by default<br>16. Add NVMeSensor unit tests<br>17. Enable CI for dbus-sensors where we can / is necessary<br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" ><br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" >Regards,<br style="outline: none; color: rgb(18, 18, 18); font-family: "Default Monospace", "Courier New", Courier, monospace; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;" >Jet</p></div></div></div><BR>