Thread (2 messages) flat view 2 messages, 2 authors, 2016-12-30

Re: [PATCH net-next V2 3/3] tun: rx batching

From: David Miller <davem@davemloft.net>
Date: 2016-12-29 16:35:10
Also in: kvm, lkml, netdev

From: Jason Wang <redacted>
Date: Wed, 28 Dec 2016 16:09:31 +0800
+	spin_lock(&queue->lock);
+	qlen = skb_queue_len(queue);
+	if (qlen > rx_batched)
+		goto drop;
+	__skb_queue_tail(queue, skb);
+	if (!more || qlen + 1 > rx_batched) {
+		__skb_queue_head_init(&process_queue);
+		skb_queue_splice_tail_init(queue, &process_queue);
+		rcv = true;
+	}
+	spin_unlock(&queue->lock);
Since you always clear the 'queue' when you insert the skb that hits
the limit, I don't see how the "goto drop" path can be possibly taken.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help