netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3]  net: stmmac: add physical port identification support
@ 2025-12-04 16:40 John Madieu
  2025-12-04 16:40 ` [PATCH net-next 1/3] " John Madieu
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: John Madieu @ 2025-12-04 16:40 UTC (permalink / raw)
  To: prabhakar.mahadev-lad.rj, andrew+netdev, davem, edumazet, kuba,
	pabeni, robh, krzk+dt, conor+dt, geert+renesas
  Cc: biju.das.jz, claudiu.beznea, linux, magnus.damm, mcoquelin.stm32,
	alexandre.torgue, netdev, linux-renesas-soc, devicetree,
	John Madieu

This series adds physical port identification support to the stmmac driver,
enabling userspace to query hardware-stable identifiers for network interfaces
via ndo_get_phys_port_id() and ndo_get_phys_port_name().

On systems with multiple ethernet controllers sharing the same driver,
physical port identification provides stable identifiers that persist
across reboots and are independent of interface enumeration order.
This is particularly useful for predictable network interface naming
and for correlating interfaces with physical connectors.

The implementation follows a two-tier approach:

1. Generic stmmac support: Default implementations use the permanent MAC
   address as port ID and bus_id for port naming. This provides immediate
   benefit for all stmmac-based platforms.

2. Glue driver override: Platform drivers can provide custom callbacks
   for hardware-specific identification schemes. The Renesas GBETH driver
   implements this to support device tree-based port identification,
   addressing cases where hardware lacks unique identification registers.

The Renesas implementation constructs an 8-byte port identifier from:
- Permanent MAC address (if available) or Renesas OUI (74:90:50) as fallback
- Port index from device tree property or ethernet alias


John Madieu (3):
  net: stmmac: add physical port identification support
  dt-bindings: net: renesas-gbeth: Add port-id property
  net: stmmac: dwmac-renesas-gbeth: add physical port identification

 .../bindings/net/renesas,rzv2h-gbeth.yaml     | 19 +++++++
 .../stmicro/stmmac/dwmac-renesas-gbeth.c      | 56 +++++++++++++++++++
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 54 ++++++++++++++++++
 include/linux/stmmac.h                        |  5 ++
 4 files changed, 134 insertions(+)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH net-next 0/3]  net: stmmac: add physical port identification support
@ 2025-12-04 16:37 John Madieu
  2025-12-04 17:07 ` Russell King (Oracle)
  2025-12-04 21:07 ` Andrew Lunn
  0 siblings, 2 replies; 13+ messages in thread
From: John Madieu @ 2025-12-04 16:37 UTC (permalink / raw)
  To: prabhakar.mahadev-lad.rj, andrew+netdev, davem, edumazet, kuba,
	pabeni, robh, krzk+dt, conor+dt, geert+renesas
  Cc: biju.das.jz, claudiu.beznea, linux, magnus.damm, mcoquelin.stm32,
	alexandre.torgue, netdev, linux-renesas-soc, devicetree,
	John Madieu

This series adds physical port identification support to the stmmac driver,
enabling userspace to query hardware-stable identifiers for network interfaces
via ndo_get_phys_port_id() and ndo_get_phys_port_name().

On systems with multiple ethernet controllers sharing the same driver,
physical port identification provides stable identifiers that persist
across reboots and are independent of interface enumeration order.
This is particularly useful for predictable network interface naming
and for correlating interfaces with physical connectors.

The implementation follows a two-tier approach:

1. Generic stmmac support: Default implementations use the permanent MAC
   address as port ID and bus_id for port naming. This provides immediate
   benefit for all stmmac-based platforms.

2. Glue driver override: Platform drivers can provide custom callbacks
   for hardware-specific identification schemes. The Renesas GBETH driver
   implements this to support device tree-based port identification,
   addressing cases where hardware lacks unique identification registers.

The Renesas implementation constructs an 8-byte port identifier from:
- Permanent MAC address (if available) or Renesas OUI (74:90:50) as fallback
- Port index from device tree property or ethernet alias


John Madieu (3):
  net: stmmac: add physical port identification support
  dt-bindings: net: renesas-gbeth: Add port-id property
  net: stmmac: dwmac-renesas-gbeth: add physical port identification

 .../bindings/net/renesas,rzv2h-gbeth.yaml     | 19 +++++++
 .../stmicro/stmmac/dwmac-renesas-gbeth.c      | 56 +++++++++++++++++++
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 54 ++++++++++++++++++
 include/linux/stmmac.h                        |  5 ++
 4 files changed, 134 insertions(+)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH net-next 0/3]  net: stmmac: add physical port identification support
@ 2025-12-04 16:31 John Madieu
  0 siblings, 0 replies; 13+ messages in thread
From: John Madieu @ 2025-12-04 16:31 UTC (permalink / raw)
  To: prabhakar.mahadev-lad.rj, andrew+netdev, davem, edumazet, kuba,
	pabeni, robh, krzk+dt, conor+dt, geert+renesas
  Cc: biju.das.jz, claudiu.beznea, linux, magnus.damm, mcoquelin.stm32,
	alexandre.torgue, netdev, linux-renesas-soc, devicetree,
	John Madieu

This series adds physical port identification support to the stmmac driver,
enabling userspace to query hardware-stable identifiers for network interfaces
via ndo_get_phys_port_id() and ndo_get_phys_port_name().

On systems with multiple ethernet controllers sharing the same driver,
physical port identification provides stable identifiers that persist
across reboots and are independent of interface enumeration order.
This is particularly useful for predictable network interface naming
and for correlating interfaces with physical connectors.

The implementation follows a two-tier approach:

1. Generic stmmac support: Default implementations use the permanent MAC
   address as port ID and bus_id for port naming. This provides immediate
   benefit for all stmmac-based platforms.

2. Glue driver override: Platform drivers can provide custom callbacks
   for hardware-specific identification schemes. The Renesas GBETH driver
   implements this to support device tree-based port identification,
   addressing cases where hardware lacks unique identification registers.

The Renesas implementation constructs an 8-byte port identifier from:
- Permanent MAC address (if available) or Renesas OUI (74:90:50) as fallback
- Port index from device tree property or ethernet alias


John Madieu (3):
  net: stmmac: add physical port identification support
  dt-bindings: net: renesas-gbeth: Add port-id property
  net: stmmac: dwmac-renesas-gbeth: add physical port identification

 .../bindings/net/renesas,rzv2h-gbeth.yaml     | 19 +++++++
 .../stmicro/stmmac/dwmac-renesas-gbeth.c      | 56 +++++++++++++++++++
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 54 ++++++++++++++++++
 include/linux/stmmac.h                        |  5 ++
 4 files changed, 134 insertions(+)

-- 
2.25.1


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

end of thread, other threads:[~2025-12-09 20:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-04 16:40 [PATCH net-next 0/3] net: stmmac: add physical port identification support John Madieu
2025-12-04 16:40 ` [PATCH net-next 1/3] " John Madieu
2025-12-04 16:40 ` [PATCH net-next 2/3] dt-bindings: net: renesas-gbeth: Add port-id property John Madieu
2025-12-09 20:34   ` Rob Herring
2025-12-04 16:40 ` [PATCH net-next 3/3] net: stmmac: dwmac-renesas-gbeth: add physical port identification John Madieu
2025-12-04 16:55 ` [PATCH net-next 0/3] net: stmmac: add physical port identification support Krzysztof Kozlowski
2025-12-04 17:02   ` John Madieu
2025-12-04 17:09 ` Russell King (Oracle)
  -- strict thread matches above, loose matches on Subject: below --
2025-12-04 16:37 John Madieu
2025-12-04 17:07 ` Russell King (Oracle)
2025-12-04 17:09   ` John Madieu
2025-12-04 21:07 ` Andrew Lunn
2025-12-04 16:31 John Madieu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).