Re: Why verify checksum when CHECKSUM_HW is set in receiving path?

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

 



On Fri, 26 Sep 2003 08:43:33 -0700 (PDT)
Bluesea Yreen <big_bluesea@yahoo.com> wrote:

> It seems that setting "skb->ip_summed" to
> "CHECKSUM_HW" makes software do more. If a NIC can
> verify TCP/UDP checksum as well as calculate IP
> payload checksum, is it better to set "skb->ip_summed"
> to "CHECKSUM_UNNECESSARY" instead of "CHECKSUM_HW"
> even it can provide IP payload checksum? I don't think
> the software need to know TCP/UDP checksum if it knows
> the checksum is correct. Is it right?
> 

Wrong, these NICs that indicate CHECKSUM_HW only calculate
a 16-bit raw 2's complement sum of the entire packet data.
Without adjusting this properly we cannot know if the checksum
given by the chip is correct or not.

CHECKSUM_HW is advantageous, in that it means that the card
can support hw checksumming for protocols other than ipv4,
in particular ipv6.
-
: 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