|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] PV-on-HVM: Conditionally disable checksum
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Node ID 36d020268c6c099c7e70c0070ee76f07dedd547d
# Parent f3fbe9549f5f146ace8b93dbe16043bf4d71938e
PV-on-HVM: Conditionally disable checksum offload for receive on some
older kernels.
On some older kernels the CHECKSUM_UNNECESSARY flag on received
skbuffs is not honoured by all subsystems, specifically netfilter
under 2.6.9-42.EL
To work around this we need to ensure that the correct checksum is
calculated at some point. We can cause the backend to do this for us
by advertising to the backend that we cannot support checksum offload.
The correlation of this issue with the presence of NETIF_F_TSO is not
100% but it is a good first approximation.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
---
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+)
diff -r f3fbe9549f5f -r 36d020268c6c
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Thu Nov 02
11:56:26 2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Thu Nov 02
11:56:26 2006 +0000
@@ -101,6 +101,14 @@ static inline void dev_disable_gso_featu
}
#elif defined(NETIF_F_TSO)
#define HAVE_TSO 1
+
+/* Some older kernels cannot cope with incorrect checksums,
+ * particularly in netfilter. I'm not sure there is 100% correlation
+ * with the presence of NETIF_F_TSO but it appears to be a good first
+ * approximiation.
+ */
+#define HAVE_NO_CSUM_OFFLOAD 1
+
#define gso_size tso_size
#define gso_segs tso_segs
static inline void dev_disable_gso_features(struct net_device *dev)
@@ -393,6 +401,14 @@ again:
message = "writing feature-rx-notify";
goto abort_transaction;
}
+
+#ifdef HAVE_NO_CSUM_OFFLOAD
+ err = xenbus_printf(xbt, dev->nodename, "feature-no-csum-offload",
"%d", 1);
+ if (err) {
+ message = "writing feature-no-csum-offload";
+ goto abort_transaction;
+ }
+#endif
err = xenbus_printf(xbt, dev->nodename, "feature-sg", "%d", 1);
if (err) {
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] PV-on-HVM: Conditionally disable checksum offload for receive on some,
Xen patchbot-unstable <=
|
|
|
|
|