]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Mar 2022 13:26:42 +0000 (14:26 +0100)
[ Upstream commit 0b935d7f8c07bf0a192712bdbf76dbf45ef8b115 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/netdevice.h
net/core/skbuff.c
net/ipv4/udp_offload.c

index 049858c671efa045c99284c99ec9fe4d62159b50..7500ac08c9ba2cccfb1323508a81cb013e23d37d 100644 (file)
@@ -3007,7 +3007,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 unsigned int skb_gro_offset(const struct sk_buff *skb)
 {
index 56e23333e70808468b70ba5234cb040617c66343..f1e3d70e8987050eecfa7c4526c6757a51a06c35 100644 (file)
@@ -3919,32 +3919,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 86d32a1e62ac969fae1879c8cb5f992c1b026987..c2398f9e46f06df6f6065a3b620ae8a6b4ef2a00 100644 (file)
@@ -424,6 +424,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)