On Thu, 2015-04-23 at 19:54 -0700, Mahesh Bandewar wrote:
> The only possibility of schedule_work() while doing kfree_skb() is
> when the queue limit is reached. How can the queue be reduced if not
> scheduled? May be I'm missing something..
What is the point calling schedule_work() if you queued no packet at
this round ?
Do you really think it will expedite the queue drain ?
Just write instead :
spin_lock(&port->backlog.lock);
if (skb_queue_len(&port->backlog) < IPVLAN_QBACKLOG_LIMIT) {
__skb_queue_tail(&port->backlog, skb);
spin_unlock(&port->backlog.lock);
schedule_work(&port->wq);
} else {
spin_unlock(&port->backlog.lock);
atomic_long_inc(&skb->dev->rx_dropped);
kfree_skb(skb);
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html