Re: [PATCH v14 bpf-next 01/18] net: skbuff: add size metadata to skb_shared_info for xdp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10/09/2021 18.14, Lorenzo Bianconi wrote:
Introduce xdp_frags_truesize field in skb_shared_info data structure
to store xdp_buff/xdp_frame truesize (xdp_frags_truesize will be used
in xdp multi-buff support). In order to not increase skb_shared_info
size we will use a hole due to skb_shared_info alignment.
Introduce xdp_frags_size field in skb_shared_info data structure
reusing gso_type field in order to store xdp_buff/xdp_frame paged size.
xdp_frags_size will be used in xdp multi-buff support.

Acked-by: John Fastabend <john.fastabend@xxxxxxxxx>
Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
---
  include/linux/skbuff.h | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)

Acked-by: Jesper Dangaard Brouer <brouer@xxxxxxxxxx>


diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 6bdb0db3e825..769ffd09f975 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -522,13 +522,17 @@ struct skb_shared_info {
  	unsigned short	gso_segs;
  	struct sk_buff	*frag_list;
  	struct skb_shared_hwtstamps hwtstamps;
-	unsigned int	gso_type;
+	union {
+		unsigned int	gso_type;
+		unsigned int	xdp_frags_size;
+	};
  	u32		tskey;
/*
  	 * Warning : all fields before dataref are cleared in __alloc_skb()
  	 */
  	atomic_t	dataref;
+	unsigned int	xdp_frags_truesize;
/* Intermediate layers must ensure that destructor_arg
  	 * remains valid until skb destructor */





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux