1244675a70b4591da5d36e64b8725706e84300c6
[openwrt/staging/wigyori.git] / target / linux / layerscape / patches-4.9 / 602-linux-core-export-copy_skb_header-function.patch
1 From eae03a91605fd7dccb1de11053efee87db398df3 Mon Sep 17 00:00:00 2001
2 From: Zhang Ying-22455 <ying.zhang22455@nxp.com>
3 Date: Fri, 1 Sep 2017 14:56:01 +0800
4 Subject: [PATCH] linux/core: export copy_skb_header() function
5
6 Signed-off-by: Camelia Groza camelia.groza@nxp.com
7 ---
8 include/linux/skbuff.h | 1 +
9 net/core/skbuff.c | 3 ++-
10 2 files changed, 3 insertions(+), 1 deletion(-)
11
12 diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
13 index a52a6fb0ac2e..a0385f9bdd4e 100644
14 --- a/include/linux/skbuff.h
15 +++ b/include/linux/skbuff.h
16 @@ -3063,6 +3063,7 @@ static inline void skb_free_datagram_locked(struct sock *sk,
17 }
18 int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags);
19 int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len);
20 +void copy_skb_header(struct sk_buff *new, const struct sk_buff *old);
21 int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len);
22 __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, u8 *to,
23 int len, __wsum csum);
24 diff --git a/net/core/skbuff.c b/net/core/skbuff.c
25 index ab1038083df2..2684c49b9805 100644
26 --- a/net/core/skbuff.c
27 +++ b/net/core/skbuff.c
28 @@ -1082,7 +1082,7 @@ static void skb_headers_offset_update(struct sk_buff *skb, int off)
29 skb->inner_mac_header += off;
30 }
31
32 -static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
33 +void copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
34 {
35 __copy_skb_header(new, old);
36
37 @@ -1090,6 +1090,7 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
38 skb_shinfo(new)->gso_segs = skb_shinfo(old)->gso_segs;
39 skb_shinfo(new)->gso_type = skb_shinfo(old)->gso_type;
40 }
41 +EXPORT_SYMBOL(copy_skb_header);
42
43 static inline int skb_alloc_rx_flag(const struct sk_buff *skb)
44 {
45 --
46 2.11.1
47