]> git.hungrycats.org Git - linux/commitdiff
[NET]: Delete skb_shared() checks from loopback driver transmit.
authorDavid S. Miller <davem@nuts.ninka.net>
Thu, 9 Oct 2003 17:11:08 +0000 (10:11 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Thu, 9 Oct 2003 17:11:08 +0000 (10:11 -0700)
This code is from ancient history when TCP did not used SKB cloning.

drivers/net/loopback.c

index e0e63486868f910166987c9385d71c7eef99b5ea..11490d0eda19880c3fcfa9d3c1ee115071bd62a3 100644 (file)
@@ -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;
 
-       /*
-        *      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_orphan(skb);
 
        skb->protocol=eth_type_trans(skb,dev);
        skb->dev=dev;