summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2018-07-02 16:12:45 +0100
committerDavid S. Miller <davem@davemloft.net>2018-07-04 14:06:19 +0900
commitf6ad8c1bcdf014272d08c55b9469536952a0a771 (patch)
treec85c4d4b0521be53c012f769725f2f12e1bf68c4 /net
parent2bdea157b99903c8d344dbae44fedf033db4e2c2 (diff)
net: core: trivial netif_receive_skb_list() entry point
Just calls netif_receive_skb() in a loop. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 08d58e0debe5..85c456a4b551 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4906,6 +4906,25 @@ int netif_receive_skb(struct sk_buff *skb)
}
EXPORT_SYMBOL(netif_receive_skb);
+/**
+ * netif_receive_skb_list - process many receive buffers from network
+ * @head: list of skbs to process.
+ *
+ * For now, just calls netif_receive_skb() in a loop, ignoring the
+ * return value.
+ *
+ * This function may only be called from softirq context and interrupts
+ * should be enabled.
+ */
+void netif_receive_skb_list(struct list_head *head)
+{
+ struct sk_buff *skb, *next;
+
+ list_for_each_entry_safe(skb, next, head, list)
+ netif_receive_skb(skb);
+}
+EXPORT_SYMBOL(netif_receive_skb_list);
+
DEFINE_PER_CPU(struct work_struct, flush_works);
/* Network device is going away, flush any packets still pending */