Re: [PATCH net-next v6 2/4] net: qrtr: Assign unique node id for MHI endpoints

From: Youssef Samir

Date: Mon Nov 16 2026 - 09:59:57 EST


On Sat, 14 Nov 2026 06:26:14 -0800, Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx> wrote:
> Now that the QRTR driver allows using the unique node id for each device,
> which is different from the node id received from the remote node, compute
> a unique node id using a new API, qrtr_host_node_id().
>
> This API takes the 'index' parameter and adds it to QRTR_NODE_HOST_BASE.
> The index comes from an allocator, so the host assigned ids are unique
> among themselves. The base is chosen just above the 16-bit range a v2
> header can express, so an endpoint using v2 can never claim an id in the
> host range. An endpoint using v1 can claim any 32-bit id, so a collision
> is possible, but unlikely as the firmware assigned node ids are either
> smaller than this base or in the range of 0x08e5ff85. Such a collision is
> caught when the id is added to the node lookup table.
>
> [...]

Reviewed-by: Youssef Samir <youssef.abdulrahman@xxxxxxxxxxxxxxxx>
Tested-by: Youssef Samir <youssef.abdulrahman@xxxxxxxxxxxxxxxx>

--
Youssef Samir <youssef.abdulrahman@xxxxxxxxxxxxxxxx>