]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: core: trivial netif_receive_skb_list() entry point
authorEdward Cree <ecree@solarflare.com>
Mon, 2 Jul 2018 15:12:45 +0000 (16:12 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Jul 2018 05:06:19 +0000 (14:06 +0900)
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>
include/linux/netdevice.h
net/core/dev.c

index 64480a0f2c1690d250c8e1d7607f23a2713d47d6..f67258f057ca38520fb4cf646f10e3838257aa81 100644 (file)
@@ -3477,6 +3477,7 @@ int netif_rx(struct sk_buff *skb);
 int netif_rx_ni(struct sk_buff *skb);
 int netif_receive_skb(struct sk_buff *skb);
 int netif_receive_skb_core(struct sk_buff *skb);
+void netif_receive_skb_list(struct list_head *head);
 gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb);
 void napi_gro_flush(struct napi_struct *napi, bool flush_old);
 struct sk_buff *napi_get_frags(struct napi_struct *napi);
index 08d58e0debe57351588df7560686652ccb64bf04..85c456a4b55151489e3f32d2297bafc9954d97ae 100644 (file)
@@ -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 */