Lines Matching refs:napi
236 static void napi_gro_complete(struct napi_struct *napi, struct sk_buff *skb)
269 gro_normal_one(napi, skb, NAPI_GRO_CB(skb)->count);
272 static void __napi_gro_flush_chain(struct napi_struct *napi, u32 index,
275 struct list_head *head = &napi->gro_hash[index].list;
282 napi_gro_complete(napi, skb);
283 napi->gro_hash[index].count--;
286 if (!napi->gro_hash[index].count)
287 __clear_bit(index, &napi->gro_bitmask);
290 /* napi->gro_hash[].list contains packets ordered by age.
294 void napi_gro_flush(struct napi_struct *napi, bool flush_old)
296 unsigned long bitmask = napi->gro_bitmask;
302 __napi_gro_flush_chain(napi, base, flush_old);
418 static void gro_flush_oldest(struct napi_struct *napi, struct list_head *head)
430 /* Do not adjust napi->gro_hash[].count, caller is adding a new
434 napi_gro_complete(napi, oldest);
437 static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
440 struct gro_list *gro_list = &napi->gro_hash[bucket];
506 napi_gro_complete(napi, pp);
517 gro_flush_oldest(napi, &gro_list->list);
531 if (!test_bit(bucket, &napi->gro_bitmask))
532 __set_bit(bucket, &napi->gro_bitmask);
533 } else if (test_bit(bucket, &napi->gro_bitmask)) {
534 __clear_bit(bucket, &napi->gro_bitmask);
573 static gro_result_t napi_skb_finish(struct napi_struct *napi,
579 gro_normal_one(napi, skb, 1);
600 gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
604 skb_mark_napi_id(skb, napi);
609 ret = napi_skb_finish(napi, skb, dev_gro_receive(napi, skb));
616 static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb)
626 skb->dev = napi->dev;
642 napi->skb = skb;
645 struct sk_buff *napi_get_frags(struct napi_struct *napi)
647 struct sk_buff *skb = napi->skb;
650 skb = napi_alloc_skb(napi, GRO_MAX_HEAD);
652 napi->skb = skb;
653 skb_mark_napi_id(skb, napi);
660 static gro_result_t napi_frags_finish(struct napi_struct *napi,
670 gro_normal_one(napi, skb, 1);
677 napi_reuse_skb(napi, skb);
692 static struct sk_buff *napi_frags_skb(struct napi_struct *napi)
694 struct sk_buff *skb = napi->skb;
698 napi->skb = NULL;
707 __func__, napi->dev->name);
708 napi_reuse_skb(napi, skb);
729 gro_result_t napi_gro_frags(struct napi_struct *napi)
732 struct sk_buff *skb = napi_frags_skb(napi);
736 ret = napi_frags_finish(napi, skb, dev_gro_receive(napi, skb));