mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] dpaa2-eth: devlink port number from the DPMAC
@ 2026-09-28 11:22 Vincent Jardin via B4 Relay
  2026-09-28 11:22 ` [PATCH net-next v2 1/2] dpaa2-eth: use the DPMAC id as the devlink physical port number Vincent Jardin via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Vincent Jardin via B4 Relay @ 2026-09-28 11:22 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Ioana Ciornei, Vladimir Oltean, netdev, linux-kernel, Vincent Jardin

dpaa2-eth registers every DPNI as a physical devlink port without a
port number, so all the DPAA2 interfaces report the same
phys_port_name "p0", including the DPNIs that have no DPMAC behind
them.

Patch 1 uses the DPMAC id as the physical port number. The attributes
of a registered devlink port cannot change, so when the DPNI endpoint
changes at runtime a warning says the number is stale until the DPNI
is rebound.

Patch 2 registers the DPNIs without a DPMAC as virtual ports. They
have no phys_port_name, so "p<dpmac id>" is unique.

With both patches, udev can name an interface using its DPMAC, for
instance:

  SUBSYSTEM=="net", ACTION=="add", DRIVERS=="fsl_dpaa2_eth", \
    ATTR{phys_port_name}=="p3", NAME="dpmac3"

Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
Changes in v2:
- 1/2: shorter warning (Ioana Ciornei)
- 1/2: keep the registered port number in priv under mac_lock, so avoid
  IRQ race with the port registration at probe (Sashiko)
- 1/2: the port check moved to 1/2 from 2/2 (Ioana Ciornei)
- 2/2: new subject, commit log updates (Ioana Ciornei, Sashiko)
- rebased on net-next
- Link to v1: https://lore.kernel.org/r/20260923-for-upstream-dpaa2_ports-v1-0-b59c865edd00@free.fr

---
Vincent Jardin (2):
      dpaa2-eth: use the DPMAC id as the devlink physical port number
      dpaa2-eth: mark DPNIs without a DPMAC as virtual devlink ports

 .../ethernet/freescale/dpaa2/dpaa2-eth-devlink.c   | 45 +++++++++++++++++++++-
 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c   |  2 +
 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h   |  3 ++
 3 files changed, 48 insertions(+), 2 deletions(-)
---
base-commit: 014d795c73837ea2339a4ea8e8f82c6e959b845d
change-id: 20260923-for-upstream-dpaa2_ports-04087b33bb8f

Best regards,
-- 
Vincent Jardin <vjardin@free.fr>



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-02  0:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 11:22 [PATCH net-next v2 0/2] dpaa2-eth: devlink port number from the DPMAC Vincent Jardin via B4 Relay
2026-09-28 11:22 ` [PATCH net-next v2 1/2] dpaa2-eth: use the DPMAC id as the devlink physical port number Vincent Jardin via B4 Relay
2026-10-01 12:53   ` Simon Horman
2026-09-28 11:22 ` [PATCH net-next v2 2/2] dpaa2-eth: mark DPNIs without a DPMAC as virtual devlink ports Vincent Jardin via B4 Relay
2026-10-01 12:54   ` Simon Horman
2026-10-02  0:20 ` [PATCH net-next v2 0/2] dpaa2-eth: devlink port number from the DPMAC patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®