dpaa2-eth: use the DPMAC id as the devlink physical port number

dpaa2-eth registers every DPNI as a devlink port of flavour physical
without setting a port number. All DPAA2 interfaces report the same
phys_port_name, p0 (see devlink port show).

The DPNI endpoint can change at runtime while the attributes of a
registered devlink port cannot, so log a warning when it happens.

Another benefit: udev rules can match ATTR{phys_port_name} to name an
interface based on its DPMAC.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260928-for-upstream-dpaa2_ports-v2-1-1cda148530bf@free.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Vincent Jardin 2026-09-28 13:22:45 +02:00 • committed by Jakub Kicinski
commit 526025d552
3 changed files with 44 additions and 1 deletions