diff options
author | Krishna Kumar <krkumar2@in.ibm.com> | 2009-12-09 20:59:58 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-23 14:13:30 -0800 |
commit | 068a2de57ddf4f472e32e7af868613c574ad1d88 (patch) | |
tree | 61a54d80679733dde74fbcbe851a5760e20be106 /net/core/dev.c | |
parent | def87cf42069a6d4fd42a2ede8f19c620a292568 (diff) | |
download | lwn-068a2de57ddf4f472e32e7af868613c574ad1d88.tar.gz lwn-068a2de57ddf4f472e32e7af868613c574ad1d88.zip |
net: release dst entry while cache-hot for GSO case too
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>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index be9924f60ec3..a8d68cdedbbe 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1853,6 +1853,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)) { if (rc & ~NETDEV_TX_MASK) |