All of lore.kernel.org
 help / color / mirror / Atom feed
* Question related to GSO6 checksum magic
@ 2020-02-11 19:48 Heiner Kallweit
  2020-02-11 21:01 ` Alexander Duyck
  0 siblings, 1 reply; 4+ messages in thread
From: Heiner Kallweit @ 2020-02-11 19:48 UTC (permalink / raw)
  To: Eric Dumazet, Alexander Duyck, netdev

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-18 18:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11 19:48 Question related to GSO6 checksum magic Heiner Kallweit
2020-02-11 21:01 ` Alexander Duyck
2020-02-12 20:13   ` Heiner Kallweit
2020-02-18 18:13   ` Heiner Kallweit

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.