From: Andrew Lunn <andrew@lunn.ch>
To: Gaoyang Wei <yhyxwgy@gmail.com>
Cc: Ziyou Xu <xuziyougm@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 03:25:45 +0200 [thread overview]
Message-ID: <372bc103-e98f-486d-8dd2-f013b1dbbdcb@lunn.ch> (raw)
In-Reply-To: <86e368cd-9f5a-49cb-a798-0f26a661fc30@gmail.com>
On Mon, Sep 28, 2026 at 07:11:19AM +0800, Gaoyang Wei wrote:
> Hi Andrew,
>
> > Another question which might affect the architecture. From what you
> > have described, an ONU might be assigned multiple Port-IDs so it can
> > carry multiple, separated, service traffic streams? You would want to
> > represent each stream as a Linux netdev, with its own IP addresses
> > etc.
>
> An ONU can indeed have multiple GEM Port-IDs, but I think there is one
> important distinction here: a GEM Port-ID is not necessarily equivalent
> to one Linux service interface.
>
> G.988 has an interworking layer between the GEM connections and the
> Ethernet-facing service.
>
> For example, one Ethernet UNI can use an IEEE 802.1p mapper which sends
> different priority classes to different GEM ports. Bridge and VLAN
> configuration can also make the relationship between Ethernet services
> and GEM connections non-1:1.
>
> Very roughly:
>
> Ethernet UNI
> |
> bridge / mapper /
> VLAN handling
> / | \
> / | \
> GEM port GEM port GEM port
> 100 101 102
I think that is too roughly, because that is not how Linux actually
works.
A normal setup would be
br0
|
Bridge
| |
eth0 eth1
and
vlan0:42
|
eth0
What it sounds like it should be is
br0
|
Bridge
| |
eth0 eth1
|
------mapper------
/ | \
GEM port GEM port GEM port
100 101 102
You get your 802.1p tagged frames flowing down from user space and at
the bottom you map them to GEM ports.
How you classify frames above to tag them for 802.1p should be out of
scope at this level, it is a TC problem, or done via the VLAN
interfaces stacked on top of the base interface. It is a solved
problem Linux can already do. It is the mapper which is new.
But i assume this is also possible:
eth0 eth1
| |
------mapper------ ------mapper------
/ | \ / | \
GEM port GEM port GEM port GEM port GEM port GEM port
100 101 102 103 104 105
> Putting your two suggestions together seems to lead to a cleaner model:
>
> +------------------+
> | PON device |
> | (wiphy-like) |
> +--------+---------+
> |
> +-------------+-------------+
> | |
> AF_OMCI service interfaces
> | |
> OMCI userspace Linux net_device(s)
> |
> VLAN / TC / bridge
> |
> GEM mapping
You might want to talk to the wifi developers. Do they actually like
the wiphy model, does it work for them, or do they wish they could
throw it away and start again? What would they do differently?
> That also seems to answer part of the question raised by your AF_OMCI
> idea.
>
> If OMCI is a protocol associated with this lower-level PON object,
> then there is no need for a synthetic omci0 merely to obtain
> AF_PACKET semantics.
So as you say, one question is, how do you associate an AF_OMCI socket
to the lower level PON object? A typically home router probably has a
single SFP cage, but maybe somebody will build a box with two SFP
cages, you can connect to two independent providers so you have
redundancy, and load balancing, etc.
How does addressing work at this level? BSD Sockets can use bind(1) to
set the local address. Or you have SO_BINDTODEVICE socket option, if
there is a name which can be used. I don't think it needs an ifindex.
Andrew
next prev parent reply other threads:[~2026-09-28 1:25 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
2026-09-27 22:49 ` Andrew Lunn
2026-09-27 23:11 ` Gaoyang Wei
2026-09-28 1:25 ` Andrew Lunn [this message]
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=372bc103-e98f-486d-8dd2-f013b1dbbdcb@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