Skip to content

Commit

Permalink
net: release dst entry while cache-hot for GSO case too
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
krkumar authored and davem330 committed Dec 23, 2009
1 parent def87cf commit 068a2de
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1853,6 +1853,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)) {
if (rc & ~NETDEV_TX_MASK)
Expand Down

0 comments on commit 068a2de

Please sign in to comment.