[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [NET]: Add net-tso.patch



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID f147efaa24adf9f369c3483c651eb23fb60cd65e
# Parent  88dc1ae16d2b3a4141f1feb14885cdb4fefb6392
[NET]: Add net-tso.patch

This patch has been submitted upstream for review.  It resets gso_segs for
TSO.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
---
 patches/linux-2.6.16.13/net-tso.patch |   17 +++++++++++++++++
 1 files changed, 17 insertions(+)

diff -r 88dc1ae16d2b -r f147efaa24ad patches/linux-2.6.16.13/net-tso.patch
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/linux-2.6.16.13/net-tso.patch     Fri Jun 30 09:52:04 2006 +0100
@@ -0,0 +1,28 @@
+diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
+index 0336422..0bb0ac9 100644
+--- a/net/ipv4/tcp.c
++++ b/net/ipv4/tcp.c
+@@ -2166,13 +2166,19 @@ struct sk_buff *tcp_tso_segment(struct s
+       if (!pskb_may_pull(skb, thlen))
+               goto out;
+ 
+-      segs = NULL;
+-      if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST))
+-              goto out;
+-
+       oldlen = (u16)~skb->len;
+       __skb_pull(skb, thlen);
+ 
++      if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) {
++              /* Packet is from an untrusted source, reset gso_segs. */
++              int mss = skb_shinfo(skb)->gso_size;
++
++              skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss;
++
++              segs = NULL;
++              goto out;
++      }
++
+       segs = skb_segment(skb, features);
+       if (IS_ERR(segs))
+               goto out;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.