Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: bpf@vger.kernel.org
Cc: netdev@vger.kernel.org, lorenzo.bianconi@redhat.com,
	davem@davemloft.net, kuba@kernel.org, ast@kernel.org,
	daniel@iogearbox.net, alexander.duyck@gmail.com,
	brouer@redhat.com, echaudro@redhat.com,
	magnus.karlsson@intel.com, tirthendu.sarkar@intel.com,
	toke@redhat.com
Subject: [PATCH bpf-next 1/2] net: skbuff: add xdp_frags_tsize field to skb_shared_info
Date: Fri,  9 Jul 2021 13:10:27 +0200	[thread overview]
Message-ID: <2a37aaa826807751478a2003b83ccb9838323b17.1625828537.git.lorenzo@kernel.org> (raw)
In-Reply-To: <cover.1625828537.git.lorenzo@kernel.org>

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 --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 */
-- 
2.31.1


  reply	other threads:[~2021-07-09 11:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-09 11:10 [PATCH bpf-next 0/2] Add xdp_update_skb_shared_info utility routine Lorenzo Bianconi
2021-07-09 11:10 ` Lorenzo Bianconi [this message]
2021-07-09 11:10 ` [PATCH bpf-next 2/2] net: xdp: add " Lorenzo Bianconi
2021-07-12 18:46   ` John Fastabend
2021-07-12 20:22     ` Lorenzo Bianconi
2021-07-14 23:44       ` John Fastabend
2021-07-15 23:27         ` Lorenzo Bianconi
2021-07-16  3:05           ` John Fastabend

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a37aaa826807751478a2003b83ccb9838323b17.1625828537.git.lorenzo@kernel.org \
    --to=lorenzo@kernel.org \
    --cc=alexander.duyck@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=echaudro@redhat.com \
    --cc=kuba@kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=tirthendu.sarkar@intel.com \
    --cc=toke@redhat.com \
    --subject='Re: [PATCH bpf-next 1/2] net: skbuff: add xdp_frags_tsize field to skb_shared_info' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).