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 00:32:32

On Thu, 2015-04-23 at 14:29 -0700, Mahesh Bandewar wrote:
quoted hunk ↗ jump to hunk
+static void ipvlan_multicast_enqueue(struct ipvl_port *port,
+				     struct sk_buff *skb)
+{
+	if (skb->protocol == htons(ETH_P_PAUSE))
+		return;
But what happens to this packet ? It seems leaked ?
quoted hunk ↗ jump to hunk
+
+	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);
+	} else {
+		spin_unlock(&port->backlog.lock);
+		atomic_long_inc(&skb->dev->rx_dropped);
+		kfree_skb(skb);
+	}
+	schedule_work(&port->wq);
No point calling schedule_work(&port->wq); if packet was dropped.

We are under pressure, so don't add extra cpu cycles ;)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help