提交 f6ad8c1b 编写于 作者: E Edward Cree 提交者: David S. Miller

net: core: trivial netif_receive_skb_list() entry point

Just calls netif_receive_skb() in a loop.
Signed-off-by: NEdward Cree <ecree@solarflare.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2bdea157
...@@ -3477,6 +3477,7 @@ int netif_rx(struct sk_buff *skb); ...@@ -3477,6 +3477,7 @@ int netif_rx(struct sk_buff *skb);
int netif_rx_ni(struct sk_buff *skb); int netif_rx_ni(struct sk_buff *skb);
int netif_receive_skb(struct sk_buff *skb); int netif_receive_skb(struct sk_buff *skb);
int netif_receive_skb_core(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); 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); void napi_gro_flush(struct napi_struct *napi, bool flush_old);
struct sk_buff *napi_get_frags(struct napi_struct *napi); struct sk_buff *napi_get_frags(struct napi_struct *napi);
......
...@@ -4906,6 +4906,25 @@ int netif_receive_skb(struct sk_buff *skb) ...@@ -4906,6 +4906,25 @@ int netif_receive_skb(struct sk_buff *skb)
} }
EXPORT_SYMBOL(netif_receive_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); DEFINE_PER_CPU(struct work_struct, flush_works);
/* Network device is going away, flush any packets still pending */ /* Network device is going away, flush any packets still pending */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册