[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87qzxfjxaw.fsf@toke.dk>
Date: Wed, 13 Aug 2025 13:06:15 +0200
From: Toke Høiland-Jørgensen <toke@...hat.com>
To: Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
bpf@...r.kernel.org
Cc: Jakub Kicinski <kuba@...nel.org>, ast@...nel.org, daniel@...earbox.net,
hawk@...nel.org, lorenzo@...nel.org, john.fastabend@...il.com,
sdf@...ichev.me, michael.chan@...adcom.com, anthony.l.nguyen@...el.com,
przemyslaw.kitszel@...el.com, marcin.s.wojtas@...il.com,
tariqt@...dia.com, mbloch@...dia.com, eperezma@...hat.com
Subject: Re: [RFC] xdp: pass flags to xdp_update_skb_shared_info() directly
Jakub Kicinski <kuba@...nel.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@...nel.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
Powered by blists - more mailing lists