Re: TCP checksum offloading (complete)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The intuition here is to think about exactly what needs to be subtracted from the whole-packet checksum to get the TCP checksum: the IP header checksum. And the IP header checksum, since we know that it must be correct, must be zero. Subtracting zero from a checksum leaves it unchanged. Thus, the subtraction is implicit.

Nick Patavalis wrote:

On Thu, Nov 13, 2003 at 12:21:35PM +0100, francois donzet wrote:


But by having a look at the tcp_v4_recv() function,
and more precisely inside tcp_v4_checksum_init() code,
skb->csum is used 'as is' when skb->ip_summed is set
to CHECKSUM_HW. There is no substraction at all.
That's the problem :/




That was my conclusion too, after browsing through the kernel code. Do we miss something, or does the "substraction" of the extra fields is a responsibility of the driver?

/npat





--
Casey Carter
Casey@Carter.net
ccarter@cs.uiuc.edu
AIM: cartec69


- : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux