mctpd: support discovery requests#16
Conversation
|
All look great, thanks. We should probably include some top-level configuration on whether mctpd is running as an endpoint vs bus owner (and/or do we need to distingush a TMBO?). Even a command-line argument would be sufficient there. For example, this would affect the Set Endpoint ID handling; in bus-owner mode, we would reject all Set Endpoint ID commands; rather than being conditional on whether an EID is already assigned. In endpoint mode, it should be totally fine for the bus owner to reassign EIDs. Is that something you'd like to do? If not, I can implement as a base change. |
|
@jk-ozlabs Sorry for the late reply. I made a MR to add the BO configuration at #14, if that is what you meant. |
Ah! Thank you. I should have started there. |
a228e9c to
36a346c
Compare
36a346c to
9445cac
Compare
|
I figured it might be a good time to refresh those patches :) Added a basic test case to exercise the new path, and check for Bus Owner as discussed above. |
|
How does this relate to #16? should I check that one out first, or this one? |
@jk-ozlabs Do you mean #96 (set endpoint ID)? This one is based on top of Set Endpoint ID so you should review that one first. Discovery process contains setting EID, so I think basing this on Set Endpoint ID makes more sense. Set Endpoint ID also works standalone, and not every transport requires discovery |
|
Sorry, yes, #96. OK, will start there. |
9445cac to
ac5a06b
Compare
|
The DSP0236 implies that we should only support discovery on certain link types:
any thoughts on making this selective? |
I think one option is to make |
ac5a06b to
7af643d
Compare
|
I suppose it would look something like this. There is still no link medium check, but at least bus owner mode should not be impacted |
|
I think that looks reasonable; we would just set up the unsupported/undiscovered state depending on link type. My main concern is not breaking things when we (eventually) use the medium type to detect this as some transports will no longer support discovery at that point. A couple of options:
|
I think I should just support the transport detection now, since I will have to do that sooner or later anyway. Let me update the PR |
7af643d to
4e4db2c
Compare
|
I added support for the physical binding attribute, please have a look. Thanks! |
jk-ozlabs
left a comment
There was a problem hiding this comment.
Couple of minor things inline, but looks good!
Newer Linux kernel supports reporting interface physical binding attribute via IFLA_MCTP_PHYS_BINDING [1]. The value of this attributes is defined in DSP0239 [2]. Add support for this attribute. [1] torvalds/linux@580db51 [2] https://www.dmtf.org/sites/default/files/standards/documents/DSP0239_1.11.1.pdf Signed-off-by: Khang D Nguyen <khangng@os.amperecomputing.com>
4e4db2c to
0b7d5f3
Compare
| async def sysnet(): | ||
| system = System() | ||
| iface = System.Interface("mctp0", 1, 1, bytes([0x1D]), 68, 254, True) | ||
| iface = System.Interface("mctp0", 1, 1, bytes([0x1D]), 68, 254, True, PhysicalBinding.PCIE_VDM) |
There was a problem hiding this comment.
I'm a little wary of making this the default, as there is no upstream support for the PCIe binding type - we want to make sure that if there are any cases we might hit with common scenarios, that we are likely to cover those in tests.
Is it possible to set this in the test cases where required?
There was a problem hiding this comment.
That is reasonable yeah. I scoped those test in classes and used pytest fixtures to override the interface binding types
0b7d5f3 to
b61a43f
Compare
This adds support for the Discovered flag and discovery requests, as described in DSP0236 12.14 Prepare for Endpoint Discovery and 12.15 Endpoint Discovery. Signed-off-by: Khang D Nguyen <khangng@os.amperecomputing.com>
b61a43f to
67f8f16
Compare
|
Thanks! |
This PR adds support for replying to discovery messages, when
mctpdruns on an endpoint: