net: release dst entry while cache-hot for GSO case too
Subsystems (2)
PATCH 1/1 net: release dst entry while cache-hot for GSO case too
From: Krishna Kumar <[email protected]>
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.
---
net/core/dev.c +8 -0
@@ -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 )
Quoted 17 lines · Krishna Kumar
From: Krishna Kumar <[email protected]>
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]>---
diff -ruNp
org/net/core/dev.cnew/net/core/dev.cnet/core/dev.c +1
-0@@ -1853,6 +1853,14 @@ gso: skb->next = nskb->next; nskb->next =NULL ; +
net/core/dev.c gso: · line 1866
Quoted 10 lines
net/core/dev.c +7
-0+/* +* 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 )
From: Eric Dumazet <[email protected]>
Date: Thu, 10 Dec 2009 09:21:00 +0100
Quoted 8 lines · Krishna Kumar
Quoted 7 lines
From: Krishna Kumar <[email protected]>
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]>
...
Quoted 1 line
Acked-by Eric Dumazet <[email protected]>
Applied.