mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* checksum offloading
@ 2003-11-07 16:40 francois donzet
  0 siblings, 0 replies; 2+ messages in thread
From: francois donzet @ 2003-11-07 16:40 UTC (permalink / raw)
  To: linux-kernel

Hi, please answer to my mail (not subscribed)
 
 i've posted this on netdev, and get no reply. I try
there :

It is about tcp checksum offloading :

in my understanding of the process, if the device
supports checksum offloading :

- an incoming packet is handled by the driver
networking code associated to the ethernet card (for
example)

1) the checksum is hardware computed. But in the case
of e100 for example, skb->csum is filled with a sum
covering the entire packet

2) then the packet passes through ip layer, checksum
is verified (not using skb->csum)

3) the packet comes to tcp layer, skb->csum is
extracted and used to compute (folding with the pseudo
header checksum) the final checksum

4) if the packet is incorrect, drop it.

You see the problem is between 1) and 2). In my
understanding, skb->csum is used by tcp, but as
skb->csum as been filled with a sum on the entire
packet content as seen by netif_rx() (that is what is
indicated in skbuff.h by yourself), there is a problem
because tcp only needs the sum on tcpheader+data no ?
no the entire sum computed by the hardware.

Before reading the code, i thought that the TCP
checksum was computed by hardware. (not a sum on
ipheader+tcpheader+data).

Thanks

please answer to my mail (not subscribed

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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

* checksum offloading
@ 2003-11-10 11:29 francois donzet
  0 siblings, 0 replies; 2+ messages in thread
From: francois donzet @ 2003-11-10 11:29 UTC (permalink / raw)
  To: linux-kernel


Hi,

i have a little question : 

When tcp checksum offloading is enabled, the chip
computes a sum on all words of the packet contents and
stores the result in skb->csum, setting skb->ip_summed
to CHECKSUM_HW. (see for example, e100_main.c)

Then, when packet reaches tcp layer, via
tcp_checksum_init(), tcp checksum is verified (using
together skb->csum and the pseudo header checksum).

How does TCP deal with skb->csum, as it doesn't cover
only the tcpheader+data (but ipheader+tcpheader+data)

Thanks.



___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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

end of thread, other threads:[~2003-11-10 11:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-07 16:40 checksum offloading francois donzet
2003-11-10 11:29 francois donzet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®