All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Qingfang Deng <dqfext@gmail.com>
Cc: Paolo Abeni <pabeni@redhat.com>, Felix Fietkau <nbd@nbd.name>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	David Ahern <dsahern@kernel.org>, Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-ppp@vger.kernel.org
Subject: Re: [RFC PATCH net-next v6 1/2] net: pppoe: implement GRO/GSO support
Date: Thu, 30 Apr 2026 17:57:50 +0200	[thread overview]
Message-ID: <afN7_oBICMZ_45Zh@chamomile> (raw)
In-Reply-To: <CALW65jYB1jWS5LnSxRCrEeCpPfhA8saqbYYfU-LkPh_25gWfsw@mail.gmail.com>

Hi Paolo,

On Thu, Apr 30, 2026 at 11:47:57PM +0800, Qingfang Deng wrote:
> On Thu, Apr 30, 2026 at 5:34 PM Paolo Abeni <pabeni@redhat.com> wrote:
> >
> > AFAICS, when the computed len is >= 64K, and the above min() will
> > truncate it, later pppoe_rcv() will drop the packet.
> 
> pppoe_rcv() does _not_ drop such packets.
> The drop condition is "skb->len < ntohs(ph->length)", not the other way around.
> 
> > > +     skb = segs;
> > > +     do {
> > > +             phdr = (struct pppoe_hdr *)(skb_mac_header(skb) + nhoff);
> > > +             len = skb->len - (nhoff + sizeof(*phdr));
> > > +             phdr->length = cpu_to_be16(len);
> > > +             skb->network_header = (u8 *)phdr - skb->head;
> >
> > I understand is quite late for the following question, but...
> > The network headers points to the pppoe hdr. Should it point to the
> > actual IP hdr?

This is the same with double-tagged-vlan, the network header also
points to the inner vlan in the skb payload. Changing this would
require to revisit all users in the tree that are already assuming
this.

> > Why not? A comment in the code or in the commit message would be
> > appreciated.
> 
> I'm not sure about the GSO stuff. This code is carried over from
> Felix's v3 patch unmodified and I haven't noticed any issues. Maybe he
> has the answer.
> 
> FYI, Pablo Neira Ayuso is adding the "inline PPPoE GSO" to Netfilter
> flowtable: https://lore.kernel.org/netfilter-devel/20260430055836.223494-2-pablo@netfilter.org/
> to work around missing GSO support in PPPoE driver, prior to this
> patch.

  reply	other threads:[~2026-04-30 15:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26  8:11 [RFC PATCH net-next v6 1/2] net: pppoe: implement GRO/GSO support Qingfang Deng
2026-03-26  8:11 ` [RFC PATCH net-next v6 2/2] selftests: net: test PPPoE packets in gro.sh Qingfang Deng
2026-03-26 16:29   ` Willem de Bruijn
2026-04-30  9:34 ` [RFC PATCH net-next v6 1/2] net: pppoe: implement GRO/GSO support Paolo Abeni
2026-04-30 15:47   ` Qingfang Deng
2026-04-30 15:57     ` Pablo Neira Ayuso [this message]
2026-04-30 16:22       ` Paolo Abeni

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=afN7_oBICMZ_45Zh@chamomile \
    --to=pablo@netfilter.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ppp@vger.kernel.org \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.