mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC net-next 00/12] net: add the PON subsystem
@ 2026-10-08 14:32 John Crispin
  2026-10-08 14:32 ` [RFC net-next 01/12] net: pon: add the netlink specification of the pon family John Crispin
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: John Crispin @ 2026-10-08 14:32 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Donald Hunter, Simon Horman, netdev, linux-kernel, Andrew Lunn,
	Christian Marangi, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	linux-doc

This series adds net/pon, a subsystem for the ONU side of an ITU-T
passive optical network. It follows the thread "[RFC] net: towards a
generic PON framework" [1], which converged on a wiphy-like PON object
that is not a netdev, PLOAM in the MAC driver, service traffic on
ordinary netdevs and OMCI in userspace. This is that design as working
code.

The model is cfg80211 with a fullmac driver:

- struct pon_dev is the PON object. It is not a netdev. Userspace
  addresses it by a device id, as nl80211 addresses a wiphy.
- The MAC driver runs PLOAM activation and the key hierarchy. It
  reports the activation state through pon_dev_state_report(). The
  core validates the edge against ITU-T G.9807.1 Table C.12.4,
  publishes it and sets the carrier from it.
- The core owns the T-CONTs, the GEM ports and the upstream classifier
  rules (the 802.1p mapper of the thread). It stores them and dumps
  them. The driver offloads them.
- The core lends the driver a serialized context: an ordered workqueue
  per instance and the instance lock that the netlink handlers take.
- Service traffic uses a data netdev plus GEM netdevs (rtnetlink link
  kind "gem") where a GEM port needs a bridge port of its own. Frames
  ride the rings of an ethernet controller, the conduit, with the per
  frame information passed as arguments.
- OMCI travels over the pon genl family the way nl80211 carries
  management frames. One socket registers for the OMCI PDUs of a
  device, receives them as notifications and sends with omci-tx. No
  OMCI netdev and no new address family.
- Control is one generic netlink family with a YAML spec. The uapi
  header and the policy are generated.

This posting is the minimal core. The counters, alarms, events, the
ETS scheduler offload, a PON mode for the generic PHY framework, the PON
PCS object and the flow offload are further commits on top of it that
come in later series.

The scope is XGS-PON. The mode enum keeps gpon and xg-pon so that the
uapi order stays clean for later drivers. The core refuses a mode that
the device does not list.

The first driver is for the Airoha AN7581 PON MAC, with its PON PHY, an
optics driver and the conduit in airoha_eth. It is not part of this
posting, because it depends on the Airoha PCS series that is not
upstream yet. pon-tool [2] consumes the family through the libpon
library. It has a verb for every attribute of the family and runs in
OpenWrt today. The stack reaches O5, passes traffic and recovers from
fiber pulls against a production OLT with HGU, SFU and IP host services
at the same time.

[1] https://lore.kernel.org/netdev/20260926174601.1675-1-yhyxwgy@gmail.com/
[2] https://github.com/blogic/pon-tool

John Crispin (12):
  net: pon: add the netlink specification of the pon family
  net: add a PON device pointer to struct net_device
  net: pon: add the PLOAM vocabulary and message codec
  net: pon: add the device state and the lent context
  net: pon: add the conduit contract
  net: pon: add the GEM network devices
  net: pon: add the OMCI channel
  net: pon: add netlink support
  net: pon: add the device registration
  net: pon: build the PON subsystem
  Documentation: networking: describe the PON subsystem
  MAINTAINERS: add the PON subsystem

 Documentation/netlink/specs/pon.yaml     |  604 ++++++++
 Documentation/netlink/specs/rt-link.yaml |   14 +
 Documentation/networking/index.rst       |    1 +
 Documentation/networking/pon.rst         |  302 ++++
 MAINTAINERS                              |   11 +
 include/linux/netdevice.h                |    6 +
 include/net/pon.h                        |   14 +
 include/net/pon/functions.h              |  129 ++
 include/net/pon/ploam.h                  |  266 ++++
 include/net/pon/ploam_msg.h              |  306 ++++
 include/net/pon/types.h                  |  443 ++++++
 include/uapi/linux/if_link.h             |   10 +
 include/uapi/linux/pon.h                 |  166 +++
 net/Kconfig                              |    1 +
 net/Makefile                             |    1 +
 net/pon/Kconfig                          |   17 +
 net/pon/Makefile                         |    6 +
 net/pon/pon-nl-gen.c                     |  286 ++++
 net/pon/pon-nl-gen.h                     |   45 +
 net/pon/pon.h                            |  162 +++
 net/pon/pon_conduit.c                    |  614 ++++++++
 net/pon/pon_gem.c                        |  537 +++++++
 net/pon/pon_main.c                       |  454 ++++++
 net/pon/pon_nl.c                         | 1671 ++++++++++++++++++++++
 net/pon/pon_omci.c                       |  326 +++++
 net/pon/pon_ploam_msg.c                  |  312 ++++
 net/pon/pon_state.c                      |  408 ++++++
 net/pon/pon_work.c                       |  106 ++
 tools/net/ynl/Makefile.deps              |    1 +
 29 files changed, 7219 insertions(+)
 create mode 100644 Documentation/netlink/specs/pon.yaml
 create mode 100644 Documentation/networking/pon.rst
 create mode 100644 include/net/pon.h
 create mode 100644 include/net/pon/functions.h
 create mode 100644 include/net/pon/ploam.h
 create mode 100644 include/net/pon/ploam_msg.h
 create mode 100644 include/net/pon/types.h
 create mode 100644 include/uapi/linux/pon.h
 create mode 100644 net/pon/Kconfig
 create mode 100644 net/pon/Makefile
 create mode 100644 net/pon/pon-nl-gen.c
 create mode 100644 net/pon/pon-nl-gen.h
 create mode 100644 net/pon/pon.h
 create mode 100644 net/pon/pon_conduit.c
 create mode 100644 net/pon/pon_gem.c
 create mode 100644 net/pon/pon_main.c
 create mode 100644 net/pon/pon_nl.c
 create mode 100644 net/pon/pon_omci.c
 create mode 100644 net/pon/pon_ploam_msg.c
 create mode 100644 net/pon/pon_state.c
 create mode 100644 net/pon/pon_work.c


base-commit: 8df0638138d3e0344fd1fb36cf2d1ca1cf5028f0
-- 
2.34.1


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

end of thread, other threads:[~2026-10-08 14:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 14:32 [RFC net-next 00/12] net: add the PON subsystem John Crispin
2026-10-08 14:32 ` [RFC net-next 01/12] net: pon: add the netlink specification of the pon family John Crispin
2026-10-08 14:32 ` [RFC net-next 02/12] net: add a PON device pointer to struct net_device John Crispin
2026-10-08 14:32 ` [RFC net-next 03/12] net: pon: add the PLOAM vocabulary and message codec John Crispin
2026-10-08 14:32 ` [RFC net-next 04/12] net: pon: add the device state and the lent context John Crispin
2026-10-08 14:32 ` [RFC net-next 05/12] net: pon: add the conduit contract John Crispin
2026-10-08 14:32 ` [RFC net-next 06/12] net: pon: add the GEM network devices John Crispin
2026-10-08 14:32 ` [RFC net-next 07/12] net: pon: add the OMCI channel John Crispin
2026-10-08 14:32 ` [RFC net-next 08/12] net: pon: add netlink support John Crispin
2026-10-08 14:32 ` [RFC net-next 09/12] net: pon: add the device registration John Crispin
2026-10-08 14:32 ` [RFC net-next 10/12] net: pon: build the PON subsystem John Crispin
2026-10-08 14:32 ` [RFC net-next 11/12] Documentation: networking: describe " John Crispin
2026-10-08 14:32 ` [RFC net-next 12/12] MAINTAINERS: add " John Crispin

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®