From: Paolo Abeni <pabeni@redhat.com>
To: Qingfang Deng <qingfang.deng@linux.dev>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Jiri Kosina <jikos@kernel.org>,
David Sterba <dsterba@suse.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Mitchell Blank Jr <mitch@sfgoth.com>,
Chas Williams <3chas3@gmail.com>, Simon Horman <horms@kernel.org>,
James Chapman <jchapman@katalix.com>, Kees Cook <kees@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Taegu Ha <hataegu0826@gmail.com>,
Guillaume Nault <gnault@redhat.com>,
Eric Woudstra <ericwouds@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Dawid Osuchowski <dawid.osuchowski@linux.intel.com>,
Breno Leitao <leitao@debian.org>,
linux-ppp@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
linux-atm-general@lists.sourceforge.net
Subject: Re: [PATCH net-next 2/3] ppp: unify two channel structs
Date: Thu, 7 May 2026 09:32:01 +0200 [thread overview]
Message-ID: <11416095-4393-4a28-a7ac-db090960c9a7@redhat.com> (raw)
In-Reply-To: <c9993ee6-4023-4331-a1c1-4e30952146fe@linux.dev>
On 5/7/26 7:53 AM, Qingfang Deng wrote:
> On 2026/5/5 19:16, Paolo Abeni wrote:
>> On 4/30/26 11:05 AM, Qingfang Deng wrote:
>>> Historically, PPP maintained two separate structures for a channel:
>>> 'struct channel' was internal to ppp_generic.c, while 'struct ppp_channel'
>>> was the public interface that drivers were required to embed. This
>>> duplication was redundant and forced drivers to manage the lifecycle of
>>> the public structure.
>>>
>>> Unify these two structures into a single 'struct ppp_channel', which is
>>> now internal to ppp_generic.c. Drivers now use a 'ppp_channel_conf'
>>> structure to specify registration parameters and receive an opaque
>>> pointer to the allocated channel.
>>>
>>> Key changes:
>>> - ppp_register_channel() and ppp_register_net_channel() now return
>>> a 'struct ppp_channel *' instead of taking a pointer to a driver-
>>> embedded structure.
>>> - 'struct ppp_channel_ops' methods now take the driver's 'private'
>>> pointer directly as their first argument, simplifying driver logic.
>>> - ppp_unregister_channel() now takes the opaque pointer.
>>> - Multilink-specific fields are unified and handled via the new
>>> configuration structure.
>>>
>>> This cleanup simplifies the driver interface and makes the channel
>>> lifecycle management more robust by centralizing allocation in the PPP
>>> generic layer.
>>>
>>> Assisted-by: Gemini:gemini-3-flash
>>> Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
>>> ---
>>> drivers/net/ppp/ppp_async.c | 51 +++++-----
>>> drivers/net/ppp/ppp_generic.c | 161 +++++++++++++++----------------
>>> drivers/net/ppp/ppp_synctty.c | 51 +++++-----
>>> drivers/net/ppp/pppoe.c | 34 ++++---
>>> drivers/net/ppp/pppox.c | 4 +-
>>> drivers/net/ppp/pptp.c | 40 ++++----
>>> drivers/tty/ipwireless/network.c | 30 +++---
>>> include/linux/if_pppox.h | 2 +-
>>> include/linux/ppp_channel.h | 49 ++++++----
>>> net/atm/pppoatm.c | 61 ++++++------
>>> net/l2tp/l2tp_ppp.c | 34 ++++---
>>> 11 files changed, 271 insertions(+), 246 deletions(-)
>> This patch is IMHO a bit too big and should be split. Also this kind of
>> refactor looks very invasive and potentially regression prone. I think
>> it should include a signficant self-test coverage increase.
> This is indeed too big. But how do I split it without breaking the build?
This is indeed a good question, but I'm really unable to give you a good
answer without allocating to this topic much more time than I have
available.
I think that the (indeed smallish) mtu changes could easily go in a
separate patch.
You could try introducing the struct and/or variables renaming
separately, with no actual functional change, i.e.
- one patch to rename ppp_channel -> ppp_channel_conf
- one patch to rename channel -> ppp_channel
(possibly adjust accordingly the variables name if can done mechanically)
no idea if the end result would be more palatable, but possibly worth a try.
/P
next prev parent reply other threads:[~2026-05-07 7:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260430090532.244758-1-qingfang.deng@linux.dev>
2026-04-30 9:05 ` [PATCH net-next 2/3] ppp: unify two channel structs Qingfang Deng
2026-05-05 11:16 ` Paolo Abeni
2026-05-07 5:53 ` Qingfang Deng
2026-05-07 7:32 ` Paolo Abeni [this message]
2026-05-07 7:40 ` Sebastian Andrzej Siewior
2026-05-07 8:33 ` Qingfang Deng
2026-05-07 8:46 ` Sebastian Andrzej Siewior
2026-05-07 8:59 ` Qingfang Deng
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=11416095-4393-4a28-a7ac-db090960c9a7@redhat.com \
--to=pabeni@redhat.com \
--cc=3chas3@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=arnd@arndb.de \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=dawid.osuchowski@linux.intel.com \
--cc=dsterba@suse.com \
--cc=edumazet@google.com \
--cc=ericwouds@gmail.com \
--cc=gnault@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=hataegu0826@gmail.com \
--cc=horms@kernel.org \
--cc=jchapman@katalix.com \
--cc=jikos@kernel.org \
--cc=jirislaby@kernel.org \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-atm-general@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ppp@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mitch@sfgoth.com \
--cc=netdev@vger.kernel.org \
--cc=qingfang.deng@linux.dev \
/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