ibmveth: fix bad UDP checksums
authorSantiago Leon <santil@us.ibm.com>
Wed, 20 Aug 2008 19:09:19 +0000 (13:09 -0600)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 27 Aug 2008 09:36:57 +0000 (05:36 -0400)
This patch fixes a ibmveth bug where bad UDP checksums are being transmitted
when checksum offloading is enabled.
The hypervisor does checksum offloading only on TCP packets, so ibmveth calls
skb_checksum_help() for any other protocol.  The bug happens because
the packet is being modified after the DMA map, so we would need a memory
barrier before making the hypervisor call.  Reordering the code so that the
DMA map happens after skb_checksum_help() has the additional advantage of
fixing a DMA map leak if skb_checksum_help() where to fail.

Signed-off-by: Santiago Leon <santil@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

No differences found