Commit 60a517ca authored by Krishna Kumar's avatar Krishna Kumar Committed by Greg Kroah-Hartman

net: release dst entry while cache-hot for GSO case too

commit 068a2de5 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: default avatarKrishna Kumar <krkumar2@in.ibm.com>
Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8edb98f3
......@@ -1747,6 +1747,14 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment