diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-12-06 19:30:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-08 13:39:54 -0500 |
commit | 15c2d75f49189e1769c5e8f5f099d03d055c4910 (patch) | |
tree | ba8ba52d99f81bf988cb83cfb57ab234b8215276 /net/core/dev.c | |
parent | 62ab0812137ec4f9884dd7de346238841ac03283 (diff) |
net: call dev_queue_xmit_nit() after skb_dst_drop()
Avoid some atomic ops on dst refcount, calling dev_queue_xmit_nit()
after skb_dst_drop() in dev_hard_start_xmit().
When queueing a packet into af_packet socket, we drop dst anyway.
Signed-off-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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 822b15b8d11c..d28b3a023bb2 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2022,9 +2022,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, | |||
2022 | int rc = NETDEV_TX_OK; | 2022 | int rc = NETDEV_TX_OK; |
2023 | 2023 | ||
2024 | if (likely(!skb->next)) { | 2024 | if (likely(!skb->next)) { |
2025 | if (!list_empty(&ptype_all)) | ||
2026 | dev_queue_xmit_nit(skb, dev); | ||
2027 | |||
2028 | /* | 2025 | /* |
2029 | * If device doesnt need skb->dst, release it right now while | 2026 | * If device doesnt need skb->dst, release it right now while |
2030 | * its hot in this cpu cache | 2027 | * its hot in this cpu cache |
@@ -2032,6 +2029,9 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, | |||
2032 | if (dev->priv_flags & IFF_XMIT_DST_RELEASE) | 2029 | if (dev->priv_flags & IFF_XMIT_DST_RELEASE) |
2033 | skb_dst_drop(skb); | 2030 | skb_dst_drop(skb); |
2034 | 2031 | ||
2032 | if (!list_empty(&ptype_all)) | ||
2033 | dev_queue_xmit_nit(skb, dev); | ||
2034 | |||
2035 | skb_orphan_try(skb); | 2035 | skb_orphan_try(skb); |
2036 | 2036 | ||
2037 | if (vlan_tx_tag_present(skb) && | 2037 | if (vlan_tx_tag_present(skb) && |