Re: TCP checksum offloading (complete)

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

 



> The checksum of the whole packet minus the ethernet
> header is quite useful.
> 
> It is easy to use this to verify the TCP checksum:
> calculate the
> checksum of most parts of the IP header (not the
> source or destination
> addres) in software (fast), subtract that from the
> hardware-calculated
> whole packet checksum, and add other fields of the
> TCP pseudo header.

In fact, as pseudo header used in checksum computation
has similar fields with the ip header, a substraction
seems fine.

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 :/

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
-
: 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