[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+FuTSeSouL4pFFo8kAcU4yZ7m6C2v_6OcGHXHWeEXXNFofzXA@mail.gmail.com>
Date: Wed, 19 Feb 2020 14:59:16 -0800
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Grygorii Strashko <grygorii.strashko@...com>
Cc: netdev <netdev@...r.kernel.org>,
"David S . Miller" <davem@...emloft.net>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
Eric Dumazet <edumazet@...gle.com>,
John Fastabend <john.fastabend@...il.com>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>
Subject: Re: CHECKSUM_COMPLETE question
On Wed, Feb 19, 2020 at 9:04 AM Grygorii Strashko
<grygorii.strashko@...com> wrote:
>
> Hi All,
>
> On 12/02/2020 11:52, Grygorii Strashko wrote:
> > Hi All,
> >
> > I'd like to ask expert opinion and clarify few points about HW RX checksum offload.
> >
> > 1) CHECKSUM_COMPLETE - from description in <linux/skbuff.h>
> > * CHECKSUM_COMPLETE:
> > *
> > * This is the most generic way. The device supplied checksum of the _whole_
> > * packet as seen by netif_rx() and fills out in skb->csum. Meaning, the
> > * hardware doesn't need to parse L3/L4 headers to implement this.
> >
> > My understanding from above is that HW, to be fully compatible with Linux, should produce CSUM
> > starting from first byte after EtherType field:
> > (6 DST_MAC) (6 SRC_MAC) (2 EtherType) (... ...)
> > ^ ^
> > | start csum | end csum
> > and ending at the last byte of Ethernet frame data.
> > - if packet is VLAN tagged then VLAN TCI and real EtherType included in CSUM,
> > but first VLAN TPID doesn't
> > - pad bytes may/may not be included in csum
Based on commit 88078d98d1bb ("net: pskb_trim_rcsum() and
CHECKSUM_COMPLETE are friends") these bytes are expected to be covered
by skb->csum.
Not sure about that ipv4 header pull without csum adjust.
Powered by blists - more mailing lists