From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, bpf@vger.kernel.org
Cc: Jakub Kicinski <kuba@kernel.org>,
ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org,
lorenzo@kernel.org, john.fastabend@gmail.com, sdf@fomichev.me,
michael.chan@broadcom.com, anthony.l.nguyen@intel.com,
przemyslaw.kitszel@intel.com, marcin.s.wojtas@gmail.com,
tariqt@nvidia.com, mbloch@nvidia.com, eperezma@redhat.com
Subject: Re: [RFC] xdp: pass flags to xdp_update_skb_shared_info() directly
Date: Wed, 13 Aug 2025 13:06:15 +0200 [thread overview]
Message-ID: <87qzxfjxaw.fsf@toke.dk> (raw)
In-Reply-To: <20250812161528.835855-1-kuba@kernel.org>
Jakub Kicinski <kuba@kernel.org> writes:
> xdp_update_skb_shared_info() needs to update skb state which
> was maintained in xdp_buff / frame. Pass full flags into it,
> instead of breaking it out bit by bit. We will need to add
> a bit for unreadable frags (even tho XDP doesn't support
> those the driver paths may be common), at which point almost
> all call sites would become:
>
> xdp_update_skb_shared_info(skb, num_frags,
> sinfo->xdp_frags_size,
> MY_PAGE_SIZE * num_frags,
> xdp_buff_is_frag_pfmemalloc(xdp),
> xdp_buff_is_frag_unreadable(xdp));
>
> Keep a helper for accessing the flags, in case we need to
> transform them somehow in the future (e.g. to cover up xdp_buff
> vs xdp_frame differences).
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> Does anyone prefer the current form of the API, or can we change
> as prosposed?
I think the change is fine, but I agree with Jesper that it's a bit
weird to call them skb_flags. Maybe just xdp_buff_get_flags()?
-Toke
prev parent reply other threads:[~2025-08-13 11:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-12 16:15 [RFC] xdp: pass flags to xdp_update_skb_shared_info() directly Jakub Kicinski
2025-08-12 16:17 ` Jakub Kicinski
2025-08-12 16:48 ` Alexander Lobakin
2025-08-13 8:43 ` Jesper Dangaard Brouer
2025-08-13 21:44 ` Jakub Kicinski
2025-08-14 8:11 ` Jesper Dangaard Brouer
2025-08-13 7:25 ` Lorenzo Bianconi
2025-08-13 11:06 ` Toke Høiland-Jørgensen [this message]
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=87qzxfjxaw.fsf@toke.dk \
--to=toke@redhat.com \
--cc=anthony.l.nguyen@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eperezma@redhat.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=lorenzo@kernel.org \
--cc=marcin.s.wojtas@gmail.com \
--cc=mbloch@nvidia.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.com \
--cc=sdf@fomichev.me \
--cc=tariqt@nvidia.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.