Commit 074ea612 authored by David S. Miller's avatar David S. Miller

[NET]: Delete skb_shared() checks from loopback driver transmit.

This code is from ancient history when TCP did not used SKB cloning.
parent bfb506ec
...@@ -125,19 +125,7 @@ static int loopback_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -125,19 +125,7 @@ static int loopback_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct net_device_stats *stats = (struct net_device_stats *)dev->priv; struct net_device_stats *stats = (struct net_device_stats *)dev->priv;
/* skb_orphan(skb);
* Optimise so buffers with skb->free=1 are not copied but
* instead are lobbed from tx queue to rx queue
*/
if (skb_shared(skb)) {
struct sk_buff *skb2=skb;
skb=skb_clone(skb, GFP_ATOMIC); /* Clone the buffer */
kfree_skb(skb2);
if (unlikely(skb==NULL))
return 0;
} else
skb_orphan(skb);
skb->protocol=eth_type_trans(skb,dev); skb->protocol=eth_type_trans(skb,dev);
skb->dev=dev; skb->dev=dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment