Re: [PATCH net-next] net: mctp: add MCTP_OPT_ROUTE_SRCADDR getsockopt
From: Jeremy Kerr
Date: Mon Sep 21 2026 - 21:23:46 EST
Hi Faizan,
> Add a new socket option MCTP_OPT_ROUTE_SRCADDR that allows applications
> to query which local EID the kernel would use as the source address
> when sending to a given destination EID.
>
> Applications such as PLDM need to advertise a local EID as the event
> receiver address to remote endpoints. Previously this required a manual
> multi-step lookup via the mctp tool (route show + addr show).
> The kernel routing table is the authoritative
> source for this mapping, so expose it directly via a socket option.
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.
Cheers,
Jeremy