Lines Matching refs:napi

257 static void napi_gro_complete(struct napi_struct *napi, struct sk_buff *skb)  in napi_gro_complete()  argument
290 gro_normal_one(napi, skb, NAPI_GRO_CB(skb)->count); in napi_gro_complete()
293 static void __napi_gro_flush_chain(struct napi_struct *napi, u32 index, in __napi_gro_flush_chain() argument
296 struct list_head *head = &napi->gro_hash[index].list; in __napi_gro_flush_chain()
303 napi_gro_complete(napi, skb); in __napi_gro_flush_chain()
304 napi->gro_hash[index].count--; in __napi_gro_flush_chain()
307 if (!napi->gro_hash[index].count) in __napi_gro_flush_chain()
308 __clear_bit(index, &napi->gro_bitmask); in __napi_gro_flush_chain()
315 void napi_gro_flush(struct napi_struct *napi, bool flush_old) in napi_gro_flush() argument
317 unsigned long bitmask = napi->gro_bitmask; in napi_gro_flush()
323 __napi_gro_flush_chain(napi, base, flush_old); in napi_gro_flush()
445 static void gro_flush_oldest(struct napi_struct *napi, struct list_head *head) in gro_flush_oldest() argument
461 napi_gro_complete(napi, oldest); in gro_flush_oldest()
464 static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb) in dev_gro_receive() argument
467 struct gro_list *gro_list = &napi->gro_hash[bucket]; in dev_gro_receive()
532 napi_gro_complete(napi, pp); in dev_gro_receive()
543 gro_flush_oldest(napi, &gro_list->list); in dev_gro_receive()
557 if (!test_bit(bucket, &napi->gro_bitmask)) in dev_gro_receive()
558 __set_bit(bucket, &napi->gro_bitmask); in dev_gro_receive()
559 } else if (test_bit(bucket, &napi->gro_bitmask)) { in dev_gro_receive()
560 __clear_bit(bucket, &napi->gro_bitmask); in dev_gro_receive()
599 static gro_result_t napi_skb_finish(struct napi_struct *napi, in napi_skb_finish() argument
605 gro_normal_one(napi, skb, 1); in napi_skb_finish()
626 gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb) in napi_gro_receive() argument
630 skb_mark_napi_id(skb, napi); in napi_gro_receive()
635 ret = napi_skb_finish(napi, skb, dev_gro_receive(napi, skb)); in napi_gro_receive()
642 static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb) in napi_reuse_skb() argument
652 skb->dev = napi->dev; in napi_reuse_skb()
668 napi->skb = skb; in napi_reuse_skb()
671 struct sk_buff *napi_get_frags(struct napi_struct *napi) in napi_get_frags() argument
673 struct sk_buff *skb = napi->skb; in napi_get_frags()
676 skb = napi_alloc_skb(napi, GRO_MAX_HEAD); in napi_get_frags()
678 napi->skb = skb; in napi_get_frags()
679 skb_mark_napi_id(skb, napi); in napi_get_frags()
686 static gro_result_t napi_frags_finish(struct napi_struct *napi, in napi_frags_finish() argument
696 gro_normal_one(napi, skb, 1); in napi_frags_finish()
703 napi_reuse_skb(napi, skb); in napi_frags_finish()
718 static struct sk_buff *napi_frags_skb(struct napi_struct *napi) in napi_frags_skb() argument
720 struct sk_buff *skb = napi->skb; in napi_frags_skb()
724 napi->skb = NULL; in napi_frags_skb()
733 __func__, napi->dev->name); in napi_frags_skb()
734 napi_reuse_skb(napi, skb); in napi_frags_skb()
758 gro_result_t napi_gro_frags(struct napi_struct *napi) in napi_gro_frags() argument
761 struct sk_buff *skb = napi_frags_skb(napi); in napi_gro_frags()
765 ret = napi_frags_finish(napi, skb, dev_gro_receive(napi, skb)); in napi_gro_frags()