From: Faizan Ali <faizana@nvidia.com>
To: Jeremy Kerr <jk@codeconstruct.com.au>
Cc: Matt Johnston <matt@codeconstruct.com.au>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
"David S . Miller" <davem@davemloft.net>,
Simon Horman <horms@kernel.org>, Faizan Ali <faizana@nvidia.com>
Subject: Re: [PATCH net-next] net: mctp: add MCTP_OPT_ROUTE_SRCADDR getsockopt
Date: Wed, 23 Sep 2026 13:57:26 +0530 [thread overview]
Message-ID: <20260923082726.2918670-1-faizana@nvidia.com> (raw)
In-Reply-To: <e272f7d7556a59671db7e4c5503eb69efc27759c.camel@codeconstruct.com.au>
Hello Jeremy,
Sorry, I missed following up on this earlier - continuing our
conversation from the earlier thread.
> As I had asked earlier, can you elaborate on why this is needed over
> choosing any local address? Is there a routing topology where this
> would not work?
>
> I'm not against the idea, we just need a fairly solidy justification
> for adding user ABI that cannot be changed in future.
In theory, yes - any incoming message destined to an active local EID
should reach an application bound to that message type. That said, I
still find these problems with simply picking any local EID:
1. It requires a snapshot of all available local EIDs first -
information the kernel already has internally via the routing
table, but which applications can today only get via ad-hoc mctp
route/addr correlation.
2. Not every local EID is reachable from every peer, even on the same
network. Example from our hardware:
BMC --USB(EID 8)--> SMA(EID 20) --I3C--> GPU(EID 30)
BMC also has a separate mctpi2c0 (EID 9), unrelated to the SMA.
Reaching the GPU is a gateway route (30 -> via 20 -> via 8), which
mctp_route_lookup() already resolves correctly today for
sendmsg(). If PLDM instead picks "any" EID and gets 9, the GPU's
event notifications go out via I3C to the SMA - which has no
knowledge of EID 9 at all (it's on an unrelated bus). The packet is
undeliverable at the SMA itself, one hop before it would even reach
the BMC.
I acknowledge this is implementation-specific, and additional
route provisioning on the bridge could help - but that still
requires out-of-band configuration to stay in sync with every
local EID. Separately, how device firmware handles Set Event
Receiver packets carrying an EID different from the one it saw
during Set Endpoint ID discovery is also implementation-defined.
3. A picked EID doesn't stay valid - interface teardown (hot unplug)
removes its local EID from the available routes, and Set Event
Receiver is a one-shot registration with no way to detect that
drift later. Further events would then be silently dropped by the
kernel, since it has no route for the removed EID, and would never
reach the application.
The kernel already walks this resolution (including gateway chains)
correctly for every sendmsg() - this just exposes that same lookup,
rather than requiring applications to parse route/addr output and
re-derive it themselves.
Regards,
Faizan
prev parent reply other threads:[~2026-09-23 8:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 3:51 Faizan Ali
2026-09-22 1:23 ` Jeremy Kerr
2026-09-23 8:27 ` Faizan Ali [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260923082726.2918670-1-faizana@nvidia.com \
--to=faizana@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jk@codeconstruct.com.au \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®