Commit 403a167
mctpd: add MCTP Interface D-Bus object
Create the MCTP interfaces D-Bus objects for the existing MCTP links at
`/xyz/openbmc_project/mctp1/interfaces/<name>`. When the MCTP links is
removed from/added to the system, the D-Bus object will also be
removed/added.
Then, create an au.com.CodeConstruct.MCTP.Interface1 D-Bus interface for MCTP
interface D-Bus objects. The D-Bus interface includes the `Role`
property which reports BMC roles in the MCTP link. The possible value of
`Role` are `BusOwner`, `Endpoint` and `Unknown`.
Because the BMC `Role` in the MCTP interface is fixed. The `Role`
property is changeable value but it can only be changed when the current
configured value is `Unknown`.
Ex:
```
$ busctl tree au.com.codeconstruct.MCTP1
`- /au
`- /au/com
`- /au/com/codeconstruct
`- /au/com/codeconstruct/mctp1
|- /au/com/codeconstruct/mctp1/interfaces
| |- /au/com/codeconstruct/mctp1/interfaces/lo
| `- /au/com/codeconstruct/mctp1/interfaces/mctpi2c3
`- /au/com/codeconstruct/mctp1/networks
`- /au/com/codeconstruct/mctp1/networks/1
`- /au/com/codeconstruct/mctp1/networks/1/endpoints
`- /au/com/codeconstruct/mctp1/networks/1/endpoints/8
$ busctl introspect au.com.codeconstruct.MCTP1 /au/com/codeconstruct/mctp1/interfaces/mctpi2c3
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
au.com.CodeConstruct.MCTP.Interface1 interface - - -
.Role property s "Endpoint" 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 au.com.codeconstruct.MCTP1 /au/com/codeconstruct/mctp1/interfaces/mctpi2c3 au.com.CodeConstruct.MCTP.Link1 Role s BusOwner
$ busctl get-property au.com.codeconstruct.MCTP1 /au/com/codeconstruct/mctp1/interfaces/mctpi2c3 au.com.CodeConstruct.MCTP.Link1 Role
s "BusOwner"
```
Includes minor changes from Jeremy Kerr <jk@codeconstruct.com.au>.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>1 parent 91cbf59 commit 403a167
File tree
6 files changed
+451
-7
lines changed- conf
- docs
- src
6 files changed
+451
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
952 | 952 | | |
953 | 953 | | |
954 | 954 | | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
955 | 968 | | |
956 | 969 | | |
957 | 970 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| |||
0 commit comments