File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -438,6 +438,7 @@ static inline __wsum ip6_gro_compute_pseudo(const struct sk_buff *skb,
438438}
439439
440440int skb_gro_receive (struct sk_buff * p , struct sk_buff * skb );
441+ int skb_gro_receive_list (struct sk_buff * p , struct sk_buff * skb );
441442
442443/* Pass the currently batched GRO_NORMAL SKBs up to the stack. */
443444static inline void gro_normal_list (struct napi_struct * napi )
Original file line number Diff line number Diff line change @@ -231,6 +231,33 @@ int skb_gro_receive(struct sk_buff *p, struct sk_buff *skb)
231231 return 0 ;
232232}
233233
234+ int skb_gro_receive_list (struct sk_buff * p , struct sk_buff * skb )
235+ {
236+ if (unlikely (p -> len + skb -> len >= 65536 ))
237+ return - E2BIG ;
238+
239+ if (NAPI_GRO_CB (p )-> last == p )
240+ skb_shinfo (p )-> frag_list = skb ;
241+ else
242+ NAPI_GRO_CB (p )-> last -> next = skb ;
243+
244+ skb_pull (skb , skb_gro_offset (skb ));
245+
246+ NAPI_GRO_CB (p )-> last = skb ;
247+ NAPI_GRO_CB (p )-> count ++ ;
248+ p -> data_len += skb -> len ;
249+
250+ /* sk ownership - if any - completely transferred to the aggregated packet */
251+ skb -> destructor = NULL ;
252+ skb -> sk = NULL ;
253+ p -> truesize += skb -> truesize ;
254+ p -> len += skb -> len ;
255+
256+ NAPI_GRO_CB (skb )-> same_flow = 1 ;
257+
258+ return 0 ;
259+ }
260+
234261
235262static void napi_gro_complete (struct napi_struct * napi , struct sk_buff * skb )
236263{
Original file line number Diff line number Diff line change @@ -433,33 +433,6 @@ static struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb,
433433 return segs ;
434434}
435435
436- static int skb_gro_receive_list (struct sk_buff * p , struct sk_buff * skb )
437- {
438- if (unlikely (p -> len + skb -> len >= 65536 ))
439- return - E2BIG ;
440-
441- if (NAPI_GRO_CB (p )-> last == p )
442- skb_shinfo (p )-> frag_list = skb ;
443- else
444- NAPI_GRO_CB (p )-> last -> next = skb ;
445-
446- skb_pull (skb , skb_gro_offset (skb ));
447-
448- NAPI_GRO_CB (p )-> last = skb ;
449- NAPI_GRO_CB (p )-> count ++ ;
450- p -> data_len += skb -> len ;
451-
452- /* sk ownership - if any - completely transferred to the aggregated packet */
453- skb -> destructor = NULL ;
454- skb -> sk = NULL ;
455- p -> truesize += skb -> truesize ;
456- p -> len += skb -> len ;
457-
458- NAPI_GRO_CB (skb )-> same_flow = 1 ;
459-
460- return 0 ;
461- }
462-
463436
464437#define UDP_GRO_CNT_MAX 64
465438static struct sk_buff * udp_gro_receive_segment (struct list_head * head ,
You can’t perform that action at this time.
0 commit comments