Skip to content
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

Expose Interface Name As D-Bus Property? #60

Open
santoshpuranik opened this issue Jan 9, 2025 · 1 comment
Open

Expose Interface Name As D-Bus Property? #60

santoshpuranik opened this issue Jan 9, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@santoshpuranik
Copy link

Is it reasonable for mctpd to expose the MCTP interface name (Ex: mctpi2c14) as a D-Bus property (say "Name") under the interface D-Bus object, interface au.com.CodeConstruct.MCTP.Interface1 D-Bus interface?

Our use case here is that we need to write an EM configuration to setup an MCTP interface, but we have nothing to Probe on (No FRU EEPROMs/device tree "eeprom"). I was thinking we could use the MCTP interface itself to probe on, something like:

"Probe": "au.com.CodeConstruct.MCTP.Interface1({'Role': 'BusOwner'})"

And then expose the interface name directly:

    "Exposes": [
        {
            "Address": "0x1d",
            "Interface": $Name,
            "Name": "Blah",
            "Type": "MCTPDevice"
        }
@jk-ozlabs
Copy link
Member

Don't you already know the name, as it is present in the object path?

(I'd prefer not to have to extract it from the object path, but didn't the caller know what the interface name was when it initially constructed the object path?)

If it's because the Interface1 object was returned as some sort of enumeration, that sounds like a reasonable addition. We may as well add the ifindex at the same time.

@jk-ozlabs jk-ozlabs added the enhancement New feature or request label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants