diff mbox series

[bpf-next,1/2] net: skbuff: add xdp_frags_tsize field to skb_shared_info

Message ID 2a37aaa826807751478a2003b83ccb9838323b17.1625828537.git.lorenzo@kernel.org (mailing list archive)
State Changes Requested
Delegated to: BPF
Headers show
Series Add xdp_update_skb_shared_info utility routine | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for bpf-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 17 maintainers not CCed: jonathan.lemon@gmail.com yhs@fb.com kpsingh@kernel.org hawk@kernel.org andrii@kernel.org wenxu@ucloud.cn kafai@fb.com cong.wang@bytedance.com ilias.apalodimas@linaro.org john.fastabend@gmail.com willemb@google.com elver@google.com songliubraving@fb.com memxor@gmail.com alobakin@pm.me nogikh@google.com haokexin@gmail.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 6118 this patch: 6118
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 6175 this patch: 6175
netdev/header_inline success Link

Commit Message

Lorenzo Bianconi July 9, 2021, 11:10 a.m. UTC
xdp_frags_tsize field will be used to store paged frame
truesize for xdp_buff/xdp_frame. In order to not increase
skb_shared_info size we will use a hole due to skb_shared_info
alignment.
gso_type filed will be used to store paged frame size.
This is a preliminary patch to properly support xdp multi-buff

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 include/linux/skbuff.h | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index f19190820e63..0e345c5ccb4f 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -522,6 +522,7 @@  struct skb_shared_info {
 	unsigned short	gso_segs;
 	struct sk_buff	*frag_list;
 	struct skb_shared_hwtstamps hwtstamps;
+	/* used for xdp_{buff,frame} paged size */
 	unsigned int	gso_type;
 	u32		tskey;
 
@@ -529,6 +530,7 @@  struct skb_shared_info {
 	 * Warning : all fields before dataref are cleared in __alloc_skb()
 	 */
 	atomic_t	dataref;
+	unsigned int	xdp_frags_tsize;
 
 	/* Intermediate layers must ensure that destructor_arg
 	 * remains valid until skb destructor */