mctpd: Support MCTP Discovery Notify command - #165
Conversation
9274ea2 to
f6fbc3b
Compare
|
I see there's been a few updates; let me know when this is stable and you'd like a review. |
The code is ready for review, please take a look at this. Thanks. |
jk-ozlabs
left a comment
There was a problem hiding this comment.
Thanks for the contribution. I have a few comments.
On the commit message: it reads like a marketing pitch rather than an explanation of the design, or rationale for the implementation. While you don't need to describe the individual changes, I would appreciate some background on the approach, and non-obvious parts of the implementation (like, why the new NLM_F flags?)
In MCTP networks, endpoints broadcast or send a Discovery Notify control
request (0x0D) to inform the Bus Owner when they boot up, reset, or are
hot-plugged. Currently, mctpd relies on active bus scanning or static
configurations,
or primarily: hot-plug events, where the transport provides them
leaving newly online endpoints undiscovered until the next poll cycle.
What poll cycle?
193bacb to
b554b2f
Compare
- Defer EID assignment/discovery to event loop to keep D-Bus unblocked (ack immediately). - Tear down existing peer state to allow clean re-enumeration on re-registration. - Add per-link 32-entry LRU rate limiter (5 req/sec per physical address) to prevent memory exhaustion attacks. - Add unit tests validating Discovery Notify workflows. Assisted-by: Antigravity:Gemini-Next Signed-off-by: Jasmine Cha <chajasmine@google.com>
b554b2f to
71201d5
Compare
|
Hi Jeremy, thanks for catching the issues from the previous code and I've learned a lot from your feedback. I’ve made the updates, so please take a look when you have a chance. |
Implement support for the MCTP Discovery Notify control command in mctpd. When an MCTP endpoint issues a Discovery Notify control request to the Bus Owner, mctpd immediately acknowledges the request over the physical socket and defers EID assignment to the main systemd event loop.
This avoids blocking the event thread during control message processing and safely handles EID re-assignments via change_peer_eid(), keeping D-Bus object paths and netlink kernel routing tables synchronized. Also include unit test coverage for Discovery Notify in the test suite.
Assisted-by: Antigravity:Gemini-Next