Skip to contentSkip to conversation

tuntap: remove unnecessary sk_receive_queue length check during xmit

PATCH In review Jason Wang 2 participants 2 messages Nov 23, 2016 – Nov 24, 2016

Subsystems (3)
lore
Share & tools
lore

Jason Wang

author
#0 lore raw

PATCH 1/1 tuntap: remove unnecessary sk_receive_queue length check during xmit

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.

---
 drivers/net/tun.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/net/tun.c +0 -7
index 64e694c..e2af2dd 100644
@@ -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;
 
Signature · 1 line
2.7.4
maintainer
#1 lore raw

From: Jason Wang <[email protected]>
Date: Wed, 23 Nov 2016 10:26:49 +0800

Quoted 5 lines

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.

Good catch, applied, thanks Jason.