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