From: Andrew Lunn <andrew@lunn.ch>
To: Ziyou Xu <xuziyougm@gmail.com>
Cc: Gaoyang Wei <yhyxwgy@gmail.com>,
netdev@vger.kernel.org,
Matheus Sampaio Queiroga <srherobrine20@gmail.com>,
Benjamin Larsson <benjamin.larsson@genexis.eu>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Russell King <linux@armlinux.org.uk>
Subject: Re: [RFC] net: towards a generic PON framework
Date: Mon, 28 Sep 2026 00:30:04 +0200 [thread overview]
Message-ID: <84a27a94-4e9b-43dc-a178-542ae5cee961@lunn.ch> (raw)
In-Reply-To: <7a469037-1266-4ca3-904b-9e8117cce5e9@gmail.com>
> ITU-T G.984.3 defines it roughly as:
>
> bit
> 0 11 12 23 24 26 27 39
> +-------------+-------------+------+--------------+
> | PLI (12) | Port-ID (12)| PTI | HEC (13) |
> +-------------+-------------+------+--------------+
> |<---------------- 5 octets --------------------->|
>
> PLI Payload Length Indicator
> Port-ID GEM logical connection identifier
> PTI Payload Type Indicator
> HEC Header Error Control
>
> and the frame is:
>
> +-----------------------+--------------------------+
> | GEM header, 5 octets | GEM payload |
> +-----------------------+--------------------------+
>
> The field relevant here is the Port-ID.
> > How can you tell apart a OMCI PDU from a user data PDU?
>
> That distinction is normally made using the GEM/XGEM Port-ID before the OMCI
> implementation sees the packet.
> Depending on the hardware, some information from the PON side may still be
> available after de-encapsulation.
So in general, the hardware is doing some level of demux?
I would of put everything as it is into the skbuf, and pass it to the
network stack, telling it what the first header is. It can then look
into the header and demux it, same as it does for any other protocol
the Linux stack handles. You can also hand this off via pcap for
tcpdump/wireshark.
If the hardware is doing the demux, try to feed the skbuf in one level
higher in the stack?
> If the immediate userspace requirement is simply transporting
> already-demultiplexed OMCI PDUs, AF_PACKET already provides a packet
> transport abstraction.
Throwing out another idea, which maybe completely wrong...
An interface is just a device which receives frames from the media. It
can have multiple protocols running on top of that interface:
6: eth42: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 500
link/none
inet 10.20.0.82 peer 10.20.0.1/32 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::61ae:d150:2724:7d6f/64 scope link stable-privacy proto kernel_ll
valid_lft forever preferred_lft forever
Here there is AF_INT and AF_INT6 address families on top of the
interface.
Would it make sense to add an AF_OMCI?
> So the part I am still trying to understand is whether a minimal
> non-Ethernet net_device, used only as an AF_PACKET endpoint for these
> already-decapsulated OMCI PDUs, would itself be considered the wrong
> abstraction.
An interface which is not an interface causes a lot of confusion. The
DSA model for switches has shown that. You really want to avoid this.
Andrew
next prev parent reply other threads:[~2026-09-27 22:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-26 17:46 [RFC] net: towards a generic PON framework Gaoyang Wei
2026-09-26 19:28 ` Matheus Sampaio Queiroga
2026-09-26 20:21 ` Gaoyang Wei
2026-09-26 21:55 ` Matheus Sampaio Queiroga
2026-09-26 22:15 ` Gaoyang Wei
2026-09-27 0:05 ` Matheus Sampaio Queiroga
2026-09-27 4:38 ` Gaoyang Wei
2026-09-27 17:47 ` Matheus Sampaio Queiroga
2026-09-27 18:27 ` Gaoyang Wei
2026-09-27 16:57 ` Andrew Lunn
2026-09-27 17:22 ` Gaoyang Wei
2026-09-27 19:24 ` Ziyou Xu
2026-09-27 19:47 ` Andrew Lunn
2026-09-27 20:29 ` Ziyou Xu
2026-09-27 22:30 ` Andrew Lunn [this message]
2026-09-27 22:49 ` Andrew Lunn
2026-09-27 23:11 ` Gaoyang Wei
2026-09-28 1:25 ` Andrew Lunn
2026-09-28 8:37 ` John Crispin
2026-09-28 10:54 ` Benjamin Larsson
2026-09-28 14:10 ` Andrew Lunn
2026-10-01 12:25 ` Benjamin Larsson
2026-09-28 11:23 ` Gaoyang Wei
2026-09-28 14:05 ` Andrew Lunn
2026-09-27 20:47 ` Benjamin Larsson
2026-09-27 20:58 ` Gaoyang Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84a27a94-4e9b-43dc-a178-542ae5cee961@lunn.ch \
--to=andrew@lunn.ch \
--cc=andrew+netdev@lunn.ch \
--cc=benjamin.larsson@genexis.eu \
--cc=linux@armlinux.org.uk \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=srherobrine20@gmail.com \
--cc=xuziyougm@gmail.com \
--cc=yhyxwgy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox