Skip to content

mctpd: Get Routing Table Entries method implementation #37

@khangng-ampere

Description

@khangng-ampere

#11 already mentioned this, however, a large part of the issue is more of static EIDs management. I'm creating this one for the Get Routing Table implementation.

I would like to discuss some of the side effects that we want this method to do, other than returning the routing table to D-Bus:

  1. Add the routes to kernel: The received table should be added to the kernel routing table (RTM_NEWROUTE).
  2. Add to D-Bus: mctpd should create the D-Bus objects for the peers, set .Degraded to True and request recovery to query the peers' properties.

Those effect might not be desirable for some applications that just want to know the routing table, like the one to only print the whole topology of the network. We might want to add a Publish argument to the method, to toggle the behaviour.

When Publish is true, I think we might only want to wait for the routing table response itself and the result of adding the endpoint to D-Bus. If adding to the kernel routing table or querying the properties fails, the D-Bus object will be removed and the application interested should listen to the remove signal, similar to how the health polling system works.

mctpd will also need to track the origin of the added objects, so as to remove the peers when the origin is removed.

I would like to know what everyone thinks on this, and also if I missed any considerations for the implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions