-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dbus interface redesign #40
Comments
I prefer
I used About |
Hi @ThuBaNguyen , Thanks for taking a look. Some responses:
OK, cool. Let's take that approach then.
OK, I'll think about that one a bit more. The
Yeah, it's necessary to prevent future API breakage (so we don't need a repeat of what we're doing now!). It's fairly well-documented:
(https://dbus.freedesktop.org/doc/dbus-specification.html)
(https://dbus.freedesktop.org/doc/dbus-api-design.html#api-versioning) and all of: http://0pointer.de/blog/projects/versioning-dbus.html
The names are certainly neater, but we do need the versioning for future compat. |
However, |
although, we are standardising on the lower-case format for prefix component of the interfaces, so that probably warrants changing to stay uniform. |
This change implements the dbus interface rework specified in #40. Essentially: this uses more standard bus, object and path names, and moves away from the xyz.openbmc_project namespace, and use au.com.codeconstruct (all lowercase) there instead, as we're not specificially an OpenBMC project. We also put collections of things (networks and endpoints) under a specifically-named object path, so we can introduce new collections alongside (interfaces) without compatibility issues This means: - the bus owner name is now au.com.codeconstruct.MCTP1 - interfaces are namespaced and versioned: - au.com.codeconstruct.MCTP.Endpoint1 - au.com.codeconstruct.MCTP.BusOwner1 - the top-level entrypoint path is versioned, as `/au/com/codeconstruct/mctp1` - the endpoint object tree is structured as `/au/com/codeconstruct/mctp1/networks/<n>/endpoints/<e>` Signed-off-by: Jeremy Kerr <[email protected]>
Have just pushed a proposed (ie., draft) implementation up at main...dev/dbus-rework. This uses the configuration branch as a base, as I intend to merge that beforehand. |
The plan from there would be:
|
I'm planing to update the mctp:
For #39, I will
Let me know your idea. |
Not sure I totally understand there, but:
The rename to
Also already done in my branch, but may need updating in your changes too
This is done too.
Just rebase on top of my proposed branch for these.
Sounds good!
I'll handle this as a change (ie, moving the dbus interface implementation) after #39 is merged. |
I don't know that you already update the mctp code as your proposal in branch |
Ah, and maybe |
I'm in trouble with verifying branch As commit
After flash the OpenBMC image, I tried to cat /etc/mctpd.conf to confirm about the correctness of step 1. Check the journal log I saw below message
I don't change the mctpd.service
|
If I roll back to commit There is no error regardless I don't add |
OK, sounds like I have a bug in the conf changes. I'll try with your config shortly. |
Any update @jk-ozlabs ? |
nope, it was the weekend! I'll check it out today. |
oh, looks like it isn't related to the config changes. You have:
You'll need to update I assume this is coming from the example in |
This change implements the dbus interface rework specified in #40. Essentially: this uses more standard bus, object and path names, and moves away from the xyz.openbmc_project namespace, and use au.com.codeconstruct (all lowercase) there instead, as we're not specificially an OpenBMC project. We also put collections of things (networks and endpoints) under a specifically-named object path, so we can introduce new collections alongside (interfaces) without compatibility issues This means: - the bus owner name is now au.com.codeconstruct.MCTP1 - interfaces are namespaced and versioned: - au.com.codeconstruct.MCTP.Endpoint1 - au.com.codeconstruct.MCTP.BusOwner1 - the top-level entrypoint path is versioned, as `/au/com/codeconstruct/mctp1` - the endpoint object tree is structured as `/au/com/codeconstruct/mctp1/networks/<n>/endpoints/<e>` Signed-off-by: Jeremy Kerr <[email protected]>
ok, done. |
This change implements the dbus interface rework specified in #40. Essentially: this uses more standard bus, object and path names, and moves away from the xyz.openbmc_project namespace, and use au.com.codeconstruct (all lowercase) there instead, as we're not specificially an OpenBMC project. We also put collections of things (networks and endpoints) under a specifically-named object path, so we can introduce new collections alongside (interfaces) without compatibility issues This means: - the bus owner name is now au.com.codeconstruct.MCTP1 - interfaces are namespaced and versioned: - au.com.codeconstruct.MCTP.Endpoint1 - au.com.codeconstruct.MCTP.BusOwner1 - the top-level entrypoint path is versioned, as `/au/com/codeconstruct/mctp1` - the endpoint object tree is structured as `/au/com/codeconstruct/mctp1/networks/<n>/endpoints/<e>` Signed-off-by: Jeremy Kerr <[email protected]>
New code fix the issue. Thanks. |
This change implements the dbus interface rework specified in #40. Essentially: this uses more standard bus, object and path names, and moves away from the xyz.openbmc_project namespace, and use au.com.codeconstruct (all lowercase) there instead, as we're not specificially an OpenBMC project. We also put collections of things (networks and endpoints) under a specifically-named object path, so we can introduce new collections alongside (interfaces) without compatibility issues This means: - the bus owner name is now au.com.codeconstruct.MCTP1 - interfaces are namespaced and versioned: - au.com.codeconstruct.MCTP.Endpoint1 - au.com.codeconstruct.MCTP.BusOwner1 - the top-level entrypoint path is versioned, as `/au/com/codeconstruct/mctp1` - the endpoint object tree is structured as `/au/com/codeconstruct/mctp1/networks/<n>/endpoints/<e>` Signed-off-by: Jeremy Kerr <[email protected]>
This change implements the dbus interface rework specified in #40. Essentially: this uses more standard bus, object and path names, and moves away from the xyz.openbmc_project namespace, and use au.com.codeconstruct (all lowercase) there instead, as we're not specificially an OpenBMC project. We also put collections of things (networks and endpoints) under a specifically-named object path, so we can introduce new collections alongside (interfaces) without compatibility issues This means: - the bus owner name is now au.com.codeconstruct.MCTP1 - interfaces are namespaced and versioned: - au.com.codeconstruct.MCTP.Endpoint1 - au.com.codeconstruct.MCTP.BusOwner1 - the top-level entrypoint path is versioned, as `/au/com/codeconstruct/mctp1` - the endpoint object tree is structured as `/au/com/codeconstruct/mctp1/networks/<n>/endpoints/<e>` Signed-off-by: Jeremy Kerr <[email protected]>
The PR #39 is precipitating a few other dbus interface changes that would need to happen at the same time. Just documenting some of my plans here.
The introduction of the
links
object directly in the/xyz/openbmc_project/mctp
level breaks the existing convention that this object only hosts the tree of<net>/<eid>
endpoint objects. Since we're doing that, we should probably only do this with a proper API revision, which then triggers some other changes. Those changes then come full-circle and may influence #39 too, so some discussion & planning here is definitely warranted.The progression of those changes is approximately:
MCTP.Endpoint
interface though, so that is suitable). So we should shift those toau.com.codeconstruct
to avoid that. This is something that has been on the backburner for a while, so a revised API is the right time to introduce this change.au.com.codeconstruct.MCTP
interface is also up for redesign. Currently, it hosts theSetupEndpoint
(and similar) methods. However, it's possible that those methods aren't appropriate for the a mctpd configuration, in the case where we're not a bus owner for anything (conditional on: would we still be running mctpd on that node? My assumption that there is still value in running some control protocol interactions there)au.com.codeconstruct.MCTP
toau.com.codeconstruct.MCTP.BusOwner1
, and only have it present on objects that are appropriate representations of a bus owner...links/<name>
objects that we're introducing in mctpd: Addmctp/links/<linkName>
D-Bus object #39 !So, my proposal for a best-practices dbus layout would be:
/au/com/codeconstruct/mctp1
"entry point" object for the mctp tree. Currently hosts the top-level
.MCTP
interface, but that would be moved. So, no interfaces planned at present, but would be suitable for future top-level configuration/au/com/codeconstruct/mctp1/networks/<net>
Top-level for each MCTP network. No interfaces at present.
/au/com/codeconstruct/mctp1/networks/<net>/endpoints/<eid>
Endpoint object. Would host:
xyz.openbmc_project.MCTP.Endpoint
: as exists currently, for our generic endpoint properties: EID, Supported Message Types etcxyz.openbmc_project.Common.UUID
: as exists currently, for UUIDsau.com.codeconstruct.MCTP.Endpoint1
: as exists currently, for mctpd control of endpoints (Remove, Recover, etc)/au/com/codeconstruct/mctp1/links/<name>
Link object, as proposed by #39 (but see my bikeshed suggestion below). Would host:
au.com.codeconstruct.MCTP.Link1
(as proposed by Thu): generic link configuration, including Role propertyau.com.codeconstruct.MCTP.BusOwner1
: our new interface that replacesau.com.codeconstruct.MCTP
, for control-protocol bus-owner functions (SetupEndpoint etc). Only present if Role == BusOwner.Some of my open design points:
BusOwner
interface should be on the link object or somewhere else under the netAnd some options for bikeshed aficionados - there probably needs to be some tweaking of various names:
/mctp1/networks/<net-id>/endpoints/<eid>
or/mctp1/network/x/endpoint/y
?/mctp1/links/x
or/mctp/interfaces/x
?The text was updated successfully, but these errors were encountered: