-
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
mctpd: AllocateEndpoints
implementation
#46
Comments
All sounds good. We'll likely need some configuration to assign these pools of EIDs to the downstream bridges. First impressions for this may involve @amboar 's work on the OpenBMC So, we'll need to define the appropriate place in the dbus hierarchy to represent the EID pool data. |
Although, given that we have the (requested) pool size as part of the Set Endpoint ID response, we can just allocate that directly from the existing dynamic EID pool, and not need any extra configuration. Would that work for you? We could later add limits and pre-defined allocations from the dynamic pool if necessary, but that doesn't seem to be required at the moment. |
Oh, I missed that part. This makes sense now. I think I can start implementing it, and will make a PR when it's done. |
@jk-ozlabs , @PeterHo-wiwynn : At NVIDIA, we are also looking at enabling bridge support with mctpd. Wondering if there is work started on this already? I wanted to get some understanding on how that design/D-Bus API would look like. As previous comments on this issue already point out, an endpoint can tell the TBO that it is a bridge and requires pool EID allocation as a part of the response to SetEndpointID. In case the EID assignments on the platform are dynamic, mctpd can simply call AllocateEndpointIDs with the next available EID (and reserve that EID + pool size). However, there are platforms that desire setting fixed EIDs as the TBO. For such a use case, do you think it is reasonable to modify the Can this EID and pool start parameter be supplied as an entity-manager configuration to the MCTP reactor? Further, after the EID pool is assigned to the bridge, mctpd should query for the routing table from the bridge ( We would be happy to make PRs to add this function if you agree with this design/once we decide on the right design. |
My understanding is |
Almost none of the MCTP control commands are marked "mandatory to generate" in Table 12 of the spec. :) So in that sense, yes, However, the spec. (https://www.dmtf.org/sites/default/files/standards/documents/DSP0236_1.3.1.pdf) does say this in section 12.12: "This command can be used to request an MCTP bridge or bus owner to return data corresponding to its Drawing a logical picture of the MCTP network is a function of the control daemon, I think. As a more concrete use case, one of the fields in a routing table entry is the physical transport binding identifier (byte 4). For scenarios where an endpoint has multiple (possibly redundant) physical paths from a bridge (ex. Serial/I2C/I3C), this field can be used by applications to choose the "fastest" path. |
Mandatory / Optional wasn't what I was referring to, rather the description of the command itself (as you quoted).
Sure, but who's looking at the picture, and why? My understanding of the intent of the description is "not software, but humans".
This can be made with entirely local decisions at each node ("Which of the interfaces is the fastest interface for my local route entries through which the destination is reachable?"). I don't see that there's a reason to fetch another node's route table? However, the other way this is learned is via |
Ack.
The specification does say software specifically. I understand that was the intent. As for why, please see the response below.
Not really? Consider a case where we have an MCTP bridge that connects to the same downstream endpoint via two different PHY buses of different speeds. The bridge's routing table would expose the medium type in the routing table. A TBO above the bridge would then query the bridge for its routing table and determine which of the two EIDs (belonging to the same device) to use. A Another scenario is that of two bus owners for a bridge (Fig. 22, section 12.10 of DSP0236 v1.3.1). How would a bus owner query for EIDs downstream to the bridge without issuing a In the absence of |
The spec does literally contain the word "software", but my interpretation of what's described is that it's a mechanism to query the network topology for the purpose of drawing a picture for people (e.g. via graphviz).
That's "figure out what's wrong, after-the-fact", not "ongoing automated network maintenance", IMO.
In it's own routing table, yes. But the routing table isn't global; each node has its own understanding of the routing table's composition, and the medium type of the interface associated with an EID is only something that represented for local peers. See the route table entry for EIDs 13 and 14 in
I think this is a responsibility that sits at the application layer, above the MCTP transport. Selection of which EID to use as the destination is something the MCTP transport layer needs to be told by the application, not chosen on behalf of the application. We do have to expose enough information for the application to make practical judgements here, but that can only really be done with local information, or (perhaps) information gathered using I think
(emphasis added)
It (
It doesn't need to know, because any hop in a route can choose to drop packets if the destination is not routable. The only thing that needs to be known at the BO of a bridge is the range of EIDs the BO allocated to the bridge. The bridge then drops any unroutable packets.
The spec makes it clear that any static EID allocation in the network must be global knowledge. You cannot statically allocate an EID under a bridge without the entire network being aware of it. The spec also makes it clear that communicating static allocations of EIDs is outside the scope of the spec. |
Thanks for the responses, Andrew.
Yes, it is the responsibility of the application that is above the MCTP layer. As for exposing this information, a
Yes, this works if the EID is the same and can be reached from two buses. We have cases where the same downstream device is accessible to the bridge via two different buses and two different EIDs. The
Referring to the same fig. in the spec. How does Device Z know about the EIDs downstream to Y?
Ack. Not sure I entirely agree when there is facility in the spec. to query the bridge for EIDs and use the information returned to build that knowledge programmatically, but sure, it is outside the scope of the spec. |
"Local information" was referring to the bus type of an interface over which the destination EID is reachable, as will be stored in the current node's route table.
That's not entirely true. The
This is not, in my reading, how the spec intended the route tables to work, as it requires global knowledge of the network topology at the resolution of the physical transports for each link. Certainly IP networks are not managed that way; similarly, IP nodes make routing decisions for packets based on destination constraints and then their local interface priorities. My hunch is your design might have entered "don't do that" territory, much like putting MCTP endpoints behind I2C muxes. The alternative is that you don't assign an EID per interface on your destination device. Rather, use a single EID for all interfaces, and then the upstream bridge is able to use its local knowledge of the relevant link speeds to direct traffic appropriately.
In accordance with the statements around EID allocation races across the buses from
In the second scenario, |
OK, so the local bus to the endpoint.
Agree. On most implementations, though, the MTU size is the same irrespective of the transport due to the underlying packet buffers in small endpoint devices. However, certain transports can be much faster that others even with the same MTU. Like you said, the MTU size is but a heuristic.
Not sure I understand the parallels with the I2C mux here :) The spec does not explicitly prohibit devices from having a distinct EID per physical bus.
Perhaps I should have made this clearer :) On the topologies we deal with, X and Z not connected over an MCTP bus directly, so X has no way to send a Leaving
|
You shouldn't put MCTP-capable devices underneath an I2C mux because the mux state might prevent propagation of messages from the device. So despite the fact that you can design a system with MCTP devices under an I2C mux, my recommendation is that you don't. In much the same way, I'm suggesting that perhaps ...
... you shouldn't assign distinct endpoint IDs to each interface on the device where each interface has vastly different throughputs, as while no-one is stopping you from doing so, it seems you're creating trouble for yourself with the EID selection and routing.
So If not, you have multiple roots in your MCTP network, which (as far as I'm aware) goes outside the spec and thus is in "don't do that" territory.
I think I'm interpreting "there are also requirements..." correctly as "our platform design desires...", is that reasonable? Regardless, "static" has a specific meaning in the context of the spec, which is "pre-configured default assigned non-zero value" (line 1071, Section 8.17.2, DSP0236 v1.3.1). Static endpoint IDs are not EIDs that are handed out by a bus owner. I pushed back a bit against the use of the word "static" in It feels like that confusion might be bearing out here.
mctpd only has immediate visibility of local endpoints, not endpoints underneath a (local) bridge. If there's out-of-band knowledge of the presence of a device below a bridge, something will need to trigger mctpd to query it, if mctpd is to expose an object for it. |
Ah! yeah, the whole I2C mux and PLDM type 5/events not supported. Don't get me started on that :)
Noted, but this is something we do have to deal with right now because we cannot have all devices change their firmware to deal with this change
No,
Yes, "it is desired that" ...
Absolutely! I meant to say deterministic EID assignments across devices that the BMC manages (including those underneath any bridges)
Okay, this confuses me -- When mctpd sends So, we should just use that information to start querying for those EID's properties and publish them on D-Bus (for those that do respond)? Isn't that what @jk-ozlabs suggested earlier in this issue here: #46 (comment)? If I read that wrong, how do you think mctpd would know about the endpoints downstream of the bridge, do you have a flow in mind? It isn't always possible to have out-of-band knowledge of what is dowstream. |
Sorry, on reflection what I wrote was a bit subtle. You're right that But to clarify, I wasn't talking about endpoint IDs, rather the endpoint devices themselves. Unless there are exceptional circumstances, only the bridge is aware of the coming and going of devices on buses for which it is the owner. Thus
Right, short of Is it reasonable for Regarding:
and
and
I have a few thoughts:
|
I see. For starters, I think it would suffice that
To solve this very issue, our downstream MCTP control daemon implementation relies on a
Sure, that is reasonable. As long as we have a solid mechanism to control static EID assignments across MCTP interfaces :)
Understood. It wasn't my intention to impose any of our platform's design choices/quirks on
OK. I do appreciate the discussion on this issue here! I would like to focus on the Do you think the following is a reasonable implementation of
In addition to the above (which handles dynamic EID allocations), I propose that we:
|
So my concern is it's not clear to me that immediately querying the EIDs allocated to the bridge's pool should succeed; there's going to be some level of concurrency there that may not guarantee they've been assigned prior to the query from the bridge's bus owner, which I think gets us back to some level of polling.
From 12.15 Discovery Notify, DSP0236 v1.3.1:
In my reading that description excludes a bridge from notifying its own bus owner about EID assignment events to devices downstream of the bridge. The intent is that it's purely a signal for the device's bus owner to assign an EID to the device.
The only concern I have here is that polling seems necessary, as discussed previously.
I'm going to defer to @jk-ozlabs and @mkj 's thoughts there. I don't have an immediate opposition beyond vague concerns about spreading complexity of the network configuration (but that's already the case for |
Yes, that is a fair point. Could that just be done via giving the bridge a "reasonable" amount of time to have completed all the downstream EID pool assignments? We can follow this up later with a polling implementation.
Agreed. Let us discuss
Ack. Thanks. |
We have a system which has devices at lower bus hierarchy.
As descibed in DSP0236,
Bus owners are responsible for allocating pools of EIDs to MCTP bridges that are lower in the bus hierarchy. This is done using the Allocate Endpoint IDs command.
.The sequence will be like:
The BMC need to send Starting EID and Number of EIDs. I think we can send next available EID as the Starting EID when we call
AssignStaticEndpoint
. (e.g.AssignStaticEndpoint
with 10, and we give 11 as Starting EID) However, the Number of EIDs is hard to define a specific number. Moreover, for the dynamic EID, it's difficult to choose which number we should send as the Starting EID. If EID 8 and 10 is occupied, should we send Starting EID 9 and 1 as the Number of EIDs?We might need to clarify how we implement
AllocateEndpoints
inmctpd
.The text was updated successfully, but these errors were encountered: