Re: [RFC PATCH net-next v6 1/2] net: pppoe: implement GRO/GSO support

Qingfang Deng <[email protected]> Thu, 30 Apr 2026 23:47:57 +0800
Newsgroups org.kernel.vger.linux-ppp,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <CALW65jYB1jWS5LnSxRCrEeCpPfhA8saqbYYfU-LkPh_25gWfsw@mail.gmail.com>
On Thu, Apr 30, 2026 at 5:34=E2=80=AFPM Paolo Abeni <[email protected]> wro=
te:
>
> AFAICS, when the computed len is >=3D 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 aro=
und.

> > +     skb =3D segs;
> > +     do {
> > +             phdr =3D (struct pppoe_hdr *)(skb_mac_header(skb) + nhoff=
);
> > +             len =3D skb->len - (nhoff + sizeof(*phdr));
> > +             phdr->length =3D cpu_to_be16(len);
> > +             skb->network_header =3D (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?
>
> 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-=
[email protected]/
to work around missing GSO support in PPPoE driver, prior to this
patch.