This is a note to let you know that I've just added the patch titled

    ipv6: GRO should be ECN friendly

to the 3.6-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ipv6-gro-should-be-ecn-friendly.patch
and it can be found in the queue-3.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From f16e08225fe7ae2d52b3e12cd9e6256d82de4f0b Mon Sep 17 00:00:00 2001
From: Eric Dumazet <[email protected]>
Date: Fri, 5 Oct 2012 20:43:30 +0000
Subject: ipv6: GRO should be ECN friendly


From: Eric Dumazet <[email protected]>

[ Upstream commit 51ec04038c113a811b177baa85d293feff9ce995 ]

IPv4 side of the problem was addressed in commit a9e050f4e7f9d
(net: tcp: GRO should be ECN friendly)

This patch does the same, but for IPv6 : A Traffic Class mismatch
doesnt mean flows are different, but instead should force a flush
of previous packets.

This patch removes artificial packet reordering problem.

Signed-off-by: Eric Dumazet <[email protected]>
Cc: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 net/ipv6/af_inet6.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -880,22 +880,25 @@ static struct sk_buff **ipv6_gro_receive
        nlen = skb_network_header_len(skb);
 
        for (p = *head; p; p = p->next) {
-               struct ipv6hdr *iph2;
+               const struct ipv6hdr *iph2;
+               __be32 first_word; /* 
<Version:4><Traffic_Class:8><Flow_Label:20> */
 
                if (!NAPI_GRO_CB(p)->same_flow)
                        continue;
 
                iph2 = ipv6_hdr(p);
+               first_word = *(__be32 *)iph ^ *(__be32 *)iph2 ;
 
-               /* All fields must match except length. */
+               /* All fields must match except length and Traffic Class. */
                if (nlen != skb_network_header_len(p) ||
-                   memcmp(iph, iph2, offsetof(struct ipv6hdr, payload_len)) ||
+                   (first_word & htonl(0xF00FFFFF)) ||
                    memcmp(&iph->nexthdr, &iph2->nexthdr,
                           nlen - offsetof(struct ipv6hdr, nexthdr))) {
                        NAPI_GRO_CB(p)->same_flow = 0;
                        continue;
                }
-
+               /* flush if Traffic Class fields are different */
+               NAPI_GRO_CB(p)->flush |= !!(first_word & htonl(0x0FF00000));
                NAPI_GRO_CB(p)->flush |= flush;
        }
 


Patches currently in stable-queue which might be from [email protected] are

queue-3.6/net-remove-skb-recycling.patch
queue-3.6/ipv6-gro-should-be-ecn-friendly.patch
queue-3.6/ipv6-addrconf-fix-proc-net-if_inet6.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to