Skip to content

RFC net: add the PON subsystem

John Crispin linux-doc lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest12 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12net: pon: add the netlink specification of the pon familyDocumentation/netlink/specs/pon.yaml include/uapi/linux/pon.h tools/net/ynl/Makefile.deps+771 -00 replies
2/12net: add a PON device pointer to struct net_deviceinclude/linux/netdevice.h+6 -00 replies
3/12net: pon: add the PLOAM vocabulary and message codecinclude/net/pon/ploam.h include/net/pon/ploam_msg.h net/pon/pon_ploam_msg.c+884 -00 replies
4/12net: pon: add the device state and the lent contextinclude/net/pon.h include/net/pon/functions.h include/net/pon/types.h +3 more+1262 -00 replies
5/12net: pon: add the conduit contractnet/pon/pon_conduit.c+614 -00 replies
6/12net: pon: add the GEM network devicesDocumentation/netlink/specs/rt-link.yaml include/uapi/linux/if_link.h net/pon/pon_gem.c+561 -00 replies
7/12net: pon: add the OMCI channelnet/pon/pon_omci.c+326 -00 replies
8/12net: pon: add netlink supportnet/pon/pon-nl-gen.c net/pon/pon-nl-gen.h net/pon/pon_nl.c+2002 -00 replies
9/12net: pon: add the device registrationnet/pon/pon_main.c+454 -00 replies
10/12net: pon: build the PON subsystemnet/Kconfig net/Makefile net/pon/Kconfig +1 more+25 -00 replies
11/12Documentation: networking: describe the PON subsystemDocumentation/networking/index.rst Documentation/networking/pon.rst+303 -00 replies
12/12MAINTAINERS: add the PON subsystemMAINTAINERS+11 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC net-next 00/12] net: add the PON subsystem

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/[email protected]/
[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

Signature · 1 line
2.34.1