lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <baa409d6-e571-4380-b046-5ea54c0e613d@linux.dev>
Date: Tue, 5 Aug 2025 18:24:18 -0700
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Jesper Dangaard Brouer <hawk@...nel.org>
Cc: Jakub Kicinski <kuba@...nel.org>, Lorenzo Bianconi <lorenzo@...nel.org>,
 Stanislav Fomichev <stfomichev@...il.com>, bpf@...r.kernel.org,
 netdev@...r.kernel.org, Alexei Starovoitov <ast@...nel.org>,
 Daniel Borkmann <borkmann@...earbox.net>,
 Eric Dumazet <eric.dumazet@...il.com>, "David S. Miller"
 <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>, sdf@...ichev.me,
 kernel-team@...udflare.com, arthur@...hurfabre.com, jakub@...udflare.com,
 Jesse Brandeburg <jbrandeburg@...udflare.com>,
 Andrew Rzeznik <arzeznik@...udflare.com>
Subject: Re: [PATCH bpf-next V2 0/7] xdp: Allow BPF to set RX hints for
 XDP_REDIRECTed packets

On 8/4/25 6:18 AM, Jesper Dangaard Brouer wrote:
> Do keep-in-mind that "moving skb allocation out of the driver" is not
> part of this patchset and a moonshot goal that will take a long time
> (but we are already "simulation" this via XDP-redirect for years now).

The XDP_PASS was first done in the very early days of BPF in 2016. The 
XDP-redirect then followed a similar setup. A lot has improved since then. A 
moonshot in 2016 does not necessarily mean it is still hard to do now. e.g. Loop 
is feasible. Directly reading/writing skb is also easier.

Let’s first quantify what the performance loss would be if the skb is allocated 
and field-set by the xdp prog (for the general XDP_PASS case and the 
redirect+cpumap case). If it’s really worth it, let’s see what it would take for 
the XDP program to achieve similar optimizations.

> Drivers should obviously not unconditionally populate the xdp_frame's
> rx_meta area.  It is first time to populate rx_meta, once driver reach

afaict, the rx_meta is reserved regardless though. The xdp prog cannot use that 
space for data_meta. The rx_meta will grow in time.

My preference is to allow xdp prog to decide what needs to write in data_meta 
and decides what needs to set in the skb directly. This is the general case it 
should support first and then optimize.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ