[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1429844646.22254.113.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Thu, 23 Apr 2015 20:04:06 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Mahesh Bandewar <maheshb@...gle.com>
Cc: netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Dan Willems <dcbw@...hat.com>,
David Miller <davem@...emloft.net>
Subject: Re: [PATCH next 1/3] ipvlan: Defer multicast / broadcast processing
to a work-queue
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists