Re: [PATCH 2.6] POWER5 Virtual Ethernet Checkum offload

From: Jeff Garzik
Date: Fri Aug 27 2004 - 14:50:06 EST


Santiago Leon wrote:
Andrew,

The following patch adds checksum offloading for the POWER5 Virtual Ethernet driver. In the case where the OS in the partitions communicating support this feature (i.e. both partition have this patch applied), no checksum will be created because the link is reliable. However, in the case where one of the OS in a partition does support this feature and the other doesn't (i.e. linux with patch applied talking to AIX), then the hypervisor will generate the checksum.

Some levels of firmware will not support this feature but the code will figure it out and not enable it.

Applies against the latest mainline and -mm trees. Please apply.

First, please always CC net driver patches to me and netdev@xxxxxxxxxxxx

Second, this patch is incorrect. Read the top of include/linux/skbuff.h for the various levels of checksum offloading, and how to use them.

Specifically,

a) you should not be using CHECKSUM_HW unless your hardware provides a valid csum (ipv4 or ipv6) that you store in skb->csum.

b) you should not be using NETIF_F_HW_CSUM for reasons similar to (a): your hardware must be able to csum the packet whether its ipv4 or ipv6 or whatever, given the information in the skb.

c) use of NETIF_F_xxx_CSUM is pointless without NETIF_F_SG and code in the transmit path to handle page-based fragments (a scatter-gather list).

Jeff





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/