tuntap: remove unnecessary sk_receive_queue length check during xmit
authorJason Wang <jasowang@redhat.com>
Wed, 23 Nov 2016 02:26:49 +0000 (10:26 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Nov 2016 21:06:56 +0000 (16:06 -0500)
After commit 1576d9860599 ("tun: switch to use skb array for tx"),
sk_receive_queue was not used any more. So remove the uncessary
sk_receive_queue length check during xmit.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c

index 64e694c68d99a86932c5383a2332be3548e6756c..e2af2dd544f0f72441d9e04bc6065c0f4babf213 100644 (file)
@@ -878,13 +878,6 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
            sk_filter(tfile->socket.sk, skb))
                goto drop;
 
-       /* Limit the number of packets queued by dividing txq length with the
-        * number of queues.
-        */
-       if (skb_queue_len(&tfile->socket.sk->sk_receive_queue) * numqueues
-                         >= dev->tx_queue_len)
-               goto drop;
-
        if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC)))
                goto drop;