Re: [PATCH v2 2/4] net: qrtr: Assign unique node id for MHI endpoints
From: Juha-Matti Tilli
Date: Fri Sep 25 2026 - 10:24:59 EST
On Fri, Sep 25, 2026, at 15:46, Youssef Samir wrote:
> On Thu, Sep 24, 2026 at 4:58 PM Manivannan Sadhasivam <mani@xxxxxxxxxx> wrote:
> > On Wed, Sep 23, 2026 at 04:03:38PM +0100, Youssef Samir wrote:
> > > The chance of collision is slim, but still not impossible.
> >
> > When you mean collision, do you mean node id collision due to bridged nodes?
> > Because, even if the directly connected QAIC devices use 32bit node ids, the
> > collision won't affect the functionality.
>
> As in ep_nid of one device matching the nid of another device. In MHI,
> that shouldn't
> really matter since this patch moves away from using QRTR_EP_NID_AUTO in node
> assignment, but as you mentioned below, it could clash with TUN and SMD EPs that
> are already registered with their ep_nid.
> > Also, there is a collision with SMD and TUN endpoints, but that's out of scope
> > for this series.
>
> I have not worked on a system that simultaneously uses different types of EPs;
> only MHI EPs. But if there is a real case of that, we can move to
> global ID assignment
> that includes SMD and TUN.
Global ID assigment sounds like a good way to solve these possible
collisions. My patchset had xarray based endpoint id allocation, maybe
that could be reused for nid allocation.
One challenge in MHI is that the two sides, ath11k/ath12k and qrtr_mhi,
need to agree on the endpoint id. If storing it inside MHI controller is
out of the question, then the only way really is to use MHI controller
index to derive it. Maybe something similar could be done for SMD. But
for TUN, this sounds harder. Can ath11k/ath12k use TUN at all?
BR, Juha-Matti