36f55d511ad92aaf26bdbfd1a5ec38bf87ab7112
[openwrt/staging/jogo.git] /
1 From d16697cb6261d4cc23422e6b1cb2759df8aa76d0 Mon Sep 17 00:00:00 2001
2 From: Lorenzo Bianconi <lorenzo@kernel.org>
3 Date: Fri, 21 Jan 2022 11:09:44 +0100
4 Subject: [PATCH] net: skbuff: add size metadata to skb_shared_info for xdp
5
6 Introduce xdp_frags_size field in skb_shared_info data structure
7 to store xdp_buff/xdp_frame frame paged size (xdp_frags_size will
8 be used in xdp frags support). In order to not increase
9 skb_shared_info size we will use a hole due to skb_shared_info
10 alignment.
11
12 Acked-by: Toke Hoiland-Jorgensen <toke@redhat.com>
13 Acked-by: John Fastabend <john.fastabend@gmail.com>
14 Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
15 Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
16 Link: https://lore.kernel.org/r/8a849819a3e0a143d540f78a3a5add76e17e980d.1642758637.git.lorenzo@kernel.org
17 Signed-off-by: Alexei Starovoitov <ast@kernel.org>
18 ---
19 include/linux/skbuff.h | 1 +
20 1 file changed, 1 insertion(+)
21
22 --- a/include/linux/skbuff.h
23 +++ b/include/linux/skbuff.h
24 @@ -568,6 +568,7 @@ struct skb_shared_info {
25 * Warning : all fields before dataref are cleared in __alloc_skb()
26 */
27 atomic_t dataref;
28 + unsigned int xdp_frags_size;
29
30 /* Intermediate layers must ensure that destructor_arg
31 * remains valid until skb destructor */