Messages in this thread | ![/](/images/icornerl.gif) | | Date | Fri, 7 Nov 2003 17:40:33 +0100 (CET) | From | francois donzet <> | Subject | checksum offloading |
| |
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |