Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mctpd: Add
mctp/links/<linkName>
D-Bus object
1. Create the MCTP Link D-Bus objects for the existing MCTP links at `/xyz/openbmc_project/mctp/links/<linkName>`. When the MCTP links is removed from/added to the system, the D-Bus object will also be removed/added. 2. Create the au.com.CodeConstruct.MCTP.Link D-Bus interface for MCTP Link D-Bus objects. The interface includes the `Role` property which reports BMC roles in the link. The possible value of `Role` are `BusOwner`, `Endpoint` and `Unknown`. 3. Because the BMC `Role` in the MCTP link is fixed. The `Role` property is changeable value but it can only be changed when the current configured value is `Unknown`. Ex: ``` ~# busctl tree xyz.openbmc_project.MCTP `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/mctp |- /xyz/openbmc_project/mctp/1 | `- /xyz/openbmc_project/mctp/1/8 `- /xyz/openbmc_project/mctp/links |- /xyz/openbmc_project/mctp/links/lo `- /xyz/openbmc_project/mctp/links/mctpi2c3 ~# busctl introspect xyz.openbmc_project.MCTP /xyz/openbmc_project/mctp/links NAME TYPE SIGNATURE RESULT/VALUE FLAGS org.freedesktop.DBus.Introspectable interface - - - .Introspect method - s - org.freedesktop.DBus.Peer interface - - - .GetMachineId method - s - .Ping method - - - org.freedesktop.DBus.Properties interface - - - .Get method ss v - .GetAll method s a{sv} - .Set method ssv - - .PropertiesChanged signal sa{sv}as - - ~# busctl introspect xyz.openbmc_project.MCTP /xyz/openbmc_project/mctp/links/mctpi2c3 NAME TYPE SIGNATURE RESULT/VALUE FLAGS au.com.CodeConstruct.MCTP.Link interface - - - .Role property s "Unknown" emits-change writable org.freedesktop.DBus.Introspectable interface - - - .Introspect method - s - org.freedesktop.DBus.Peer interface - - - .GetMachineId method - s - .Ping method - - - org.freedesktop.DBus.Properties interface - - - .Get method ss v - .GetAll method s a{sv} - .Set method ssv - - .PropertiesChanged signal sa{sv}as - - ~# busctl set-property xyz.openbmc_project.MCTP /xyz/openbmc_project/mctp/links/mctpi2c3 au.com.CodeConstruct.MCTP.Link Role s BusOwner ~# busctl set-property xyz.openbmc_project.MCTP /xyz/openbmc_project/mctp/links/mctpi2c3 au.com.CodeConstruct.MCTP.Link Role s "BusOwner" ``` Signed-off-by: Thu Nguyen <[email protected]>
- Loading branch information