Thread (16 messages) 16 messages, 3 authors, 2d ago

[RFC net-next 02/12] net: add a PON device pointer to struct net_device

flat view

From: John Crispin <john@phrozen.org>
Date: 2026-10-08 14:33:20
Also in: lkml
Subsystem: networking drivers, networking [general], the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

A PON device attaches to three kinds of network device: the ethernet
device whose rings carry its frames (the conduit), its data network
device and the GEM network devices that stack on the data network
device. Give struct net_device the pointer, beside the other subsystem
pointers, as an RCU pointer under CONFIG_PON.

Nothing sets the pointer yet. The PON core and its accessor,
netdev_uses_pon(), follow.

Assisted-by: LLM
Signed-off-by: John Crispin <john@phrozen.org>
---
 include/linux/netdevice.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 8cae9b00211e..1b4ed6ae7e87 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -72,6 +72,7 @@ struct wireless_dev;
 /* 802.15.4 specific */
 struct wpan_dev;
 struct mpls_dev;
+struct pon_dev;
 /* UDP Tunnel offloads */
 struct udp_tunnel_info;
 struct udp_tunnel_nic_info;
@@ -1974,6 +1975,8 @@ enum netdev_reg_state {
  *	@mpls_ptr:	mpls_dev struct pointer
  *	@mctp_ptr:	MCTP specific data
  *	@psp_dev:	PSP crypto device registered for this netdev
+ *	@pon_dev:	PON device that uses this netdev as conduit, data
+ *			interface or GEM network device
  *
  *	@dev_addr:	Hw address (before bcast,
  *			because most packets are unicast)
@@ -2390,6 +2393,9 @@ struct net_device {
 #if IS_ENABLED(CONFIG_INET_PSP)
 	struct psp_dev __rcu	*psp_dev;
 #endif
+#if IS_ENABLED(CONFIG_PON)
+	struct pon_dev __rcu	*pon_dev;
+#endif
 
 /*
  * Cache lines mostly used on receive path (including eth_type_trans())
-- 
2.34.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help