ea020d4e9feeb2117c931d699a252390669f4582
[openwrt/staging/ansuel.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 diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
23 index bf11e1fbd69b..8131d0de7559 100644
24 --- a/include/linux/skbuff.h
25 +++ b/include/linux/skbuff.h
26 @@ -567,6 +567,7 @@ struct skb_shared_info {
27 * Warning : all fields before dataref are cleared in __alloc_skb()
28 */
29 atomic_t dataref;
30 + unsigned int xdp_frags_size;
31
32 /* Intermediate layers must ensure that destructor_arg
33 * remains valid until skb destructor */