All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Eric Dumazet <edumazet@google.com>,
	Alexander Duyck <alexander.h.duyck@linux.intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Question related to GSO6 checksum magic
Date: Tue, 11 Feb 2020 20:48:52 +0100	[thread overview]
Message-ID: <29eb3035-1777-8b9a-c744-f2996fc5fae1@gmail.com> (raw)

Few network drivers like Intel e1000e or r8169 have the following in the
GSO6 tx path:

ipv6_hdr(skb)->payload_len = 0;
tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
				       &ipv6_hdr(skb)->daddr,
				       0, IPPROTO_TCP, 0);
(partially also w/o the payload_len assignment)

This sounds like we should factor it out to a helper.
The code however leaves few questions to me, but I'm not familiar enough
with the net core low-level details to answer them:

- This code is used in a number of drivers, so is it something that
  should be moved to the core? If yes, where would it belong to?

- Is clearing payload_len needed? IOW, can it be a problem if drivers
  miss this?

Thanks, Heiner

             reply	other threads:[~2020-02-11 19:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 19:48 Heiner Kallweit [this message]
2020-02-11 21:01 ` Question related to GSO6 checksum magic Alexander Duyck
2020-02-12 20:13   ` Heiner Kallweit
2020-02-18 18:13   ` Heiner Kallweit

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=29eb3035-1777-8b9a-c744-f2996fc5fae1@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    /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.