]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
net: release dst entry while cache-hot for GSO case too
authorKrishna Kumar <krkumar2@in.ibm.com>
Wed, 9 Dec 2009 20:59:58 +0000 (20:59 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 7 Jan 2011 22:43:14 +0000 (14:43 -0800)
commit 068a2de57ddf4f472e32e7af868613c574ad1d88 upstream.

Non-GSO code drops dst entry for performance reasons, but
the same is missing for GSO code. Drop dst while cache-hot
for GSO case too.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/core/dev.c

index d04cd93f22b5cf262f60fc23ec6400c2f58282b9..fd4c1e78154c65e77b9db32bf94999ec3423d0a8 100644 (file)
@@ -1747,6 +1747,14 @@ gso:
 
                skb->next = nskb->next;
                nskb->next = NULL;
+
+               /*
+                * If device doesnt need nskb->dst, release it right now while
+                * its hot in this cpu cache
+                */
+               if (dev->priv_flags & IFF_XMIT_DST_RELEASE)
+                       skb_dst_drop(nskb);
+
                rc = ops->ndo_start_xmit(nskb, dev);
                if (unlikely(rc != NETDEV_TX_OK)) {
                        nskb->next = skb->next;