Lines Matching full:gro
2 #include <net/gro.h>
253 static void gro_complete(struct gro_node *gro, struct sk_buff *skb) in gro_complete() argument
286 gro_normal_one(gro, skb, NAPI_GRO_CB(skb)->count); in gro_complete()
289 static void __gro_flush_chain(struct gro_node *gro, u32 index, bool flush_old) in __gro_flush_chain() argument
291 struct list_head *head = &gro->hash[index].list; in __gro_flush_chain()
298 gro_complete(gro, skb); in __gro_flush_chain()
299 gro->hash[index].count--; in __gro_flush_chain()
302 if (!gro->hash[index].count) in __gro_flush_chain()
303 __clear_bit(index, &gro->bitmask); in __gro_flush_chain()
307 * gro->hash[].list contains packets ordered by age.
311 void __gro_flush(struct gro_node *gro, bool flush_old) in __gro_flush() argument
313 unsigned long bitmask = gro->bitmask; in __gro_flush()
319 __gro_flush_chain(gro, base, flush_old); in __gro_flush()
441 static void gro_flush_oldest(struct gro_node *gro, struct list_head *head) in gro_flush_oldest() argument
457 gro_complete(gro, oldest); in gro_flush_oldest()
460 static enum gro_result dev_gro_receive(struct gro_node *gro, in dev_gro_receive() argument
465 struct gro_list *gro_list = &gro->hash[bucket]; in dev_gro_receive()
502 /* Setup for GRO checksum validation */ in dev_gro_receive()
529 gro_complete(gro, pp); in dev_gro_receive()
540 gro_flush_oldest(gro, &gro_list->list); in dev_gro_receive()
554 if (!test_bit(bucket, &gro->bitmask)) in dev_gro_receive()
555 __set_bit(bucket, &gro->bitmask); in dev_gro_receive()
556 } else if (test_bit(bucket, &gro->bitmask)) { in dev_gro_receive()
557 __clear_bit(bucket, &gro->bitmask); in dev_gro_receive()
596 static gro_result_t gro_skb_finish(struct gro_node *gro, struct sk_buff *skb, in gro_skb_finish() argument
601 gro_normal_one(gro, skb, 1); in gro_skb_finish()
622 gro_result_t gro_receive_skb(struct gro_node *gro, struct sk_buff *skb) in gro_receive_skb() argument
626 __skb_mark_napi_id(skb, gro); in gro_receive_skb()
631 ret = gro_skb_finish(gro, skb, dev_gro_receive(gro, skb)); in gro_receive_skb()
693 gro_normal_one(&napi->gro, skb, 1); in napi_frags_finish()
711 /* Upper GRO stack assumes network header starts at gro_offset=0
762 ret = napi_frags_finish(napi, skb, dev_gro_receive(&napi->gro, skb)); in napi_gro_frags()
795 void gro_init(struct gro_node *gro) in gro_init() argument
798 INIT_LIST_HEAD(&gro->hash[i].list); in gro_init()
799 gro->hash[i].count = 0; in gro_init()
802 gro->bitmask = 0; in gro_init()
803 gro->cached_napi_id = 0; in gro_init()
805 INIT_LIST_HEAD(&gro->rx_list); in gro_init()
806 gro->rx_count = 0; in gro_init()
809 void gro_cleanup(struct gro_node *gro) in gro_cleanup() argument
814 list_for_each_entry_safe(skb, n, &gro->hash[i].list, list) in gro_cleanup()
817 gro->hash[i].count = 0; in gro_cleanup()
820 gro->bitmask = 0; in gro_cleanup()
821 gro->cached_napi_id = 0; in gro_cleanup()
823 list_for_each_entry_safe(skb, n, &gro->rx_list, list) in gro_cleanup()
826 gro->rx_count = 0; in gro_cleanup()