Thread (10 messages) 10 messages, 4 authors, 2015-04-27

Re: [PATCH next 1/3] ipvlan: Defer multicast / broadcast processing to a work-queue

flat view

From: Eric Dumazet <hidden>
Date: 2015-04-24 03:04:08

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);
     }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help