netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Definition and usage of NETIF_F_HW_SUM?
@ 2007-05-29 20:58 Stephen Hemminger
  2007-05-29 21:36 ` Herbert Xu
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Hemminger @ 2007-05-29 20:58 UTC (permalink / raw)
  To: Herbert Xu; +Cc: netdev

The flag NETIF_F_HW_SUM is being misused. The definition says that the device
is capable of checksumming any packet. When in fact from usage it seems to
imply that the device is capable of doing IPV6 as well as IPV4.

Some devices like 8139too do "fake checksum offloading" because they always have to copy
the packet.

Some devices like via-rhine, don't really checksum but if they see CHECKSUM_PARTIAL then they
copy. This is bogus, they should just let higher layer do checksum/copy.

Devices like e1000, and bnx2 are broken because they assume only TCP/UDP and IPV4/IPV6. 
The definition of the flag says other protocols should work, but they probably send the
hardware into a state of confusion.

A few devices take a offset, starting point, and insertion point. This looks like
the correct model. But no upper layer protocols other than IPV4/IPV6 can do checksum
offload at present, so it seems moot.

IMHO the correct solution would be to get rid if NETIF_F_HW_SUM and make a new flag
NETIF_F_IPV6_SUM. Devices that can checksum both could do NETIF_F_IPV4_SUM|NETI_F_IPV6_SUM.


-- 
Stephen Hemminger <shemminger@linux-foundation.org>

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

end of thread, other threads:[~2007-06-27  7:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-29 20:58 Definition and usage of NETIF_F_HW_SUM? Stephen Hemminger
2007-05-29 21:36 ` Herbert Xu
2007-05-29 21:58   ` Stephen Hemminger
2007-05-30  0:10   ` Michael Chan
2007-05-29 23:45     ` Stephen Hemminger
2007-06-04 15:35       ` Ron Mercer
2007-05-30 15:53   ` [RFC] IPV6 checksum offloading in network devices Stephen Hemminger
2007-05-30 16:13     ` Patrick McHardy
2007-05-30 21:00       ` Stephen Hemminger
2007-06-27  7:44         ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).