From: Mark McLoughlin <markmc@redhat.com>
To: kvm@vger.kernel.org
Cc: Mark McLoughlin <markmc@redhat.com>,
Herbert Xu <herbert@gondor.apana.org.au>
Subject: [PATCH 2/3] Fix partial csum tx handling
Date: Tue, 27 May 2008 12:36:07 +0100 [thread overview]
Message-ID: <1211888168-3814-3-git-send-email-markmc@redhat.com> (raw)
In-Reply-To: <1211888168-3814-2-git-send-email-markmc@redhat.com>
Older kernels didn't have the csum_start/csum_offset
skb members, but skb->csum did contain the offset into
the transport header of the csum field and csum->h
contained a pointer to the transport layer header.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
---
hack-module.awk | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/hack-module.awk b/hack-module.awk
index b687951..d04c3b6 100644
--- a/hack-module.awk
+++ b/hack-module.awk
@@ -124,10 +124,17 @@
/ip_summed == CHECKSUM_PARTIAL\)/ {
print "#ifdef COMPAT_csum_offset";
- print "\thdr->flags = 0;"
- print "\thdr->csum_offset = hdr->csum_start = 0;"
+ print "\tif (skb->ip_summed == CHECKSUM_HW) {"
print "#else"
- need_endif_indent_brace = 1;
+ need_endif = 1;
+}
+
+/hdr->csum_start = skb->csum_start/ {
+ print "#ifdef COMPAT_csum_offset";
+ print "\t\thdr->csum_start = skb->h.raw - skb->data;";
+ print "\t\thdr->csum_offset = skb->csum;";
+ print "#else"
+ need_endif = 1;
}
/skb_transport_header/ {
--
1.5.5.1
next prev parent reply other threads:[~2008-05-27 11:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-27 11:36 [PATCH 0/3] kvm-guest-drivers-linux: Fix GSO/partial csum support on older kernels Mark McLoughlin
2008-05-27 11:36 ` [PATCH 1/3] Fix partial csum rx handling Mark McLoughlin
2008-05-27 11:36 ` Mark McLoughlin [this message]
2008-05-27 11:36 ` [PATCH 3/3] Fix GSO tx handling Mark McLoughlin
2008-05-29 6:50 ` [PATCH 1/3] Fix partial csum rx handling Herbert Xu
2008-05-29 7:58 ` Mark McLoughlin
2008-05-29 10:01 ` Herbert Xu
2008-06-20 18:43 ` [PATCH 0/3] kvm-guest-drivers-linux: Fix GSO/partial csum support on older kernels Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1211888168-3814-3-git-send-email-markmc@redhat.com \
--to=markmc@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox