[PATCH v3 2/4] net: qrtr: Assign unique node id for MHI endpoints

Manivannan Sadhasivam mani at kernel.org
Thu Oct 1 13:05:15 PDT 2026


On Thu, Oct 01, 2026 at 05:39:47PM +0200, Marcel Holtmann wrote:
> Hi Juha-Matti,
> 
> >>> Well, in defense of Manivannan's patchset it currently works for PCI+AHB
> >>> setups better than the last version of that by Denis/Mihai/me (although 
> >>> I could easily fix that), and it may be simpler for userspace to
> >>> continue using nid than having to bind to an endpoint, which requires
> >>> more changes in userspace code.
> >>> 
> >>> The userspace just needs to know the nid.
> >> 
> >> and existing userspace? You can _NOT_ break existing userspace.
> >> 
> >> Don’t you need to re-write all existing QRTRIPC packets to actually even make this work?
> > 
> > Well, from what I understand this rewriting is the plan.
> > 
> > It is true that if someone has a single card, the nid changes, thus
> > maybe breaking userspace if the userspace has hardcoded nid.
> > 
> > But if someone has multiple cards, the breakage to userspace is less
> > with this patch, since userspace can keep on using the same code and
> > just change the nid, whereas with the endpoint_id patch, the userspace
> > needs code changes to bind to an endpoint.
> 
> the general rule for Linux is to _not_ break existing userspace.
> 

The rule is that the kernel must not break ABI and the node id is not ABI.

Node ids are assigned dynamically and discovered at runtime through qrtr lookup.
They are not a fixed property of a device. For an AUTO endpoint, the id is
simply whatever the firmware advertised and nothing guarantees it stays
constant.

I internally checked with the other uses of QRTR, ModemManager and QAIC teams:

- ModemManager never computes or hardcodes node ids. It discovers them live over
AF_QIPCRTR (via libqrtr-glib) and groups ports into modems by physdev_uid, not
by node id. It is not affected by this series.

- The QAIC userspace queries the device's serial number over its own control
channel and then assumes that BHI serial number is same as node id. That
assumption is what breaks. The kernel never guaranteed it. QAIC devices just
happened to advertise the serial as the node id, so only QAIC userspace had this
assumption.

So I don't agree this is an ABI break.

To give QAIC a proper interface to migrate to, I will expose the assigned node
id via sysfs entry in next version, and the QAIC team has agreed to update their
userspace to read it from there. That sysfs attribute will become the documented
stable ABI, the specific node id value never was.

- Mani

-- 
மணிவண்ணன் சதாசிவம்



More information about the ath12k mailing list