aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-04-22 04:02:07 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-22 04:02:07 -0400
commit9ccb8975940c4ee51161152e37058e3d9e06c62f (patch)
tree2893117519551b3f42944e066ab0aeb2c12b6aa7 /net/core/dev.c
parente326bed2f47d0365da5a8faaf8ee93ed2d86325b (diff)
net: Orphan and de-dst skbs earlier in xmit path.
This way GSO packets don't get handled differently. With help from Eric Dumazet. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 3ba774b6091c..a4a7c36917d1 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1902,13 +1902,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
1902 if (!list_empty(&ptype_all)) 1902 if (!list_empty(&ptype_all))
1903 dev_queue_xmit_nit(skb, dev); 1903 dev_queue_xmit_nit(skb, dev);
1904 1904
1905 if (netif_needs_gso(dev, skb)) {
1906 if (unlikely(dev_gso_segment(skb)))
1907 goto out_kfree_skb;
1908 if (skb->next)
1909 goto gso;
1910 }
1911
1912 /* 1905 /*
1913 * If device doesnt need skb->dst, release it right now while 1906 * If device doesnt need skb->dst, release it right now while
1914 * its hot in this cpu cache 1907 * its hot in this cpu cache
@@ -1917,6 +1910,14 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
1917 skb_dst_drop(skb); 1910 skb_dst_drop(skb);
1918 1911
1919 skb_orphan_try(skb); 1912 skb_orphan_try(skb);
1913
1914 if (netif_needs_gso(dev, skb)) {
1915 if (unlikely(dev_gso_segment(skb)))
1916 goto out_kfree_skb;
1917 if (skb->next)
1918 goto gso;
1919 }
1920
1920 rc = ops->ndo_start_xmit(skb, dev); 1921 rc = ops->ndo_start_xmit(skb, dev);
1921 if (rc == NETDEV_TX_OK) 1922 if (rc == NETDEV_TX_OK)
1922 txq_trans_update(txq); 1923 txq_trans_update(txq);