Skip to content

Commit

Permalink
tuntap: remove unnecessary sk_receive_queue length check during xmit
Browse files Browse the repository at this point in the history
After commit 1576d98 ("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>
  • Loading branch information
Jason Wang authored and David S. Miller committed Nov 24, 2016
1 parent db6a71d commit 436acce
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 436acce

Please sign in to comment.