]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: gro: move skb_gro_receive_list to udp_offload.c
authorEric Dumazet <edumazet@google.com>
Mon, 15 Nov 2021 17:05:52 +0000 (09:05 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Nov 2021 13:16:54 +0000 (13:16 +0000)
This helper is used once, no need to keep it in fat net/core/skbuff.c

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/skbuff.c
net/ipv4/udp_offload.c

index d95c9839ce90d611f4b729c7c54e277446259c7a..ce6ee1453dbc3691fab13ee079347fbd49e587d3 100644 (file)
@@ -2903,7 +2903,6 @@ struct net_device *dev_get_by_napi_id(unsigned int napi_id);
 int netdev_get_name(struct net *net, char *name, int ifindex);
 int dev_restart(struct net_device *dev);
 int skb_gro_receive(struct sk_buff *p, struct sk_buff *skb);
-int skb_gro_receive_list(struct sk_buff *p, struct sk_buff *skb);
 
 
 static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev,
index 5b9472bdcefff8f6abae72d6ca5a8b35aafa73f3..8560d50c960b2458cae88012064bb5f5ddda600c 100644 (file)
@@ -3920,32 +3920,6 @@ err_linearize:
 }
 EXPORT_SYMBOL_GPL(skb_segment_list);
 
-int skb_gro_receive_list(struct sk_buff *p, struct sk_buff *skb)
-{
-       if (unlikely(p->len + skb->len >= 65536))
-               return -E2BIG;
-
-       if (NAPI_GRO_CB(p)->last == p)
-               skb_shinfo(p)->frag_list = skb;
-       else
-               NAPI_GRO_CB(p)->last->next = skb;
-
-       skb_pull(skb, skb_gro_offset(skb));
-
-       NAPI_GRO_CB(p)->last = skb;
-       NAPI_GRO_CB(p)->count++;
-       p->data_len += skb->len;
-
-       /* sk owenrship - if any - completely transferred to the aggregated packet */
-       skb->destructor = NULL;
-       p->truesize += skb->truesize;
-       p->len += skb->len;
-
-       NAPI_GRO_CB(skb)->same_flow = 1;
-
-       return 0;
-}
-
 /**
  *     skb_segment - Perform protocol segmentation on skb.
  *     @head_skb: buffer to segment
index 7fbf9975e8c0e9f0aa6a707bb63b55628ca6add8..cbeb8965d1b771b4d50c888a42279287904304e9 100644 (file)
@@ -425,6 +425,33 @@ out:
        return segs;
 }
 
+static int skb_gro_receive_list(struct sk_buff *p, struct sk_buff *skb)
+{
+       if (unlikely(p->len + skb->len >= 65536))
+               return -E2BIG;
+
+       if (NAPI_GRO_CB(p)->last == p)
+               skb_shinfo(p)->frag_list = skb;
+       else
+               NAPI_GRO_CB(p)->last->next = skb;
+
+       skb_pull(skb, skb_gro_offset(skb));
+
+       NAPI_GRO_CB(p)->last = skb;
+       NAPI_GRO_CB(p)->count++;
+       p->data_len += skb->len;
+
+       /* sk owenrship - if any - completely transferred to the aggregated packet */
+       skb->destructor = NULL;
+       p->truesize += skb->truesize;
+       p->len += skb->len;
+
+       NAPI_GRO_CB(skb)->same_flow = 1;
+
+       return 0;
+}
+
+
 #define UDP_GRO_CNT_MAX 64
 static struct sk_buff *udp_gro_receive_segment(struct list_head *head,
                                               struct sk_buff *skb)