[PATCH 1/3] Fix partial csum rx handling

Mark McLoughlin
2008-05-27T11:36:16Z

When we receive a packet with a partial csum,
just set ip_summed to CHECKSUM_UNNECESSARY.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
---
hack-module.awk | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/hack-module.awk b/hack-module.awk
index 4bad1e7..b687951 100644
--- a/hack-module.awk
+++ b/hack-module.awk
@@ -114,7 +114,11 @@
}

/flags \& VIRTIO_NET_HDR_F_NEEDS_CSUM\)/ {
- print "#ifndef COMPAT_csum_offset";
+ print "#ifdef COMPAT_csum_offset";
+ print "\tif (hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {";
+ print "\t\tskb->ip_summed = CHECKSUM_UNNECESSARY;";
+ print "\t}";
+ print "#else"
need_endif_indent_brace = 1
}

--
1.5.5.1