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: <CAGF5Uf48mRAuUZpTAGCGQtveDoDpF_1SKXFoBECqYzU4+dVwwg@mail.gmail.com>
Date: Wed, 14 Jan 2026 20:27:01 +0900
From: Sai Aung Hlyan Htet <saiaunghlyanhtet2003@...il.com>
To: Toke Høiland-Jørgensen <toke@...nel.org>
Cc: bpf@...r.kernel.org, Alexei Starovoitov <ast@...nel.org>, 
	Daniel Borkmann <daniel@...earbox.net>, John Fastabend <john.fastabend@...il.com>, netdev@...r.kernel.org, 
	Jesper Dangaard Brouer <hawk@...nel.org>, Lorenzo Bianconi <lorenzo.bianconi@...hat.com>
Subject: Re: [bpf-next,v3] bpf: cpumap: report queue_index to xdp_rxq_info

Sorry. I did not know it as this is my first time contribution, and
did not check it.

What about introducing a structured metadata extension area between
xdp_frame and BPF metadata in packet headroom?

Below is the example memory layout:
Current (after redirect):
[xdp_frame 32B][BPF metadata][unused headroom][data]→

Proposed:
[xdp_frame 32B][kernel_metadata 48B][BPF metadata][unused headroom][data]→

But, the problem that comes to my mind while thinking about this
solution is that
additional 48 bytes of headroom beyond the 32-byte xdp_frame would be consumed.
WDYT?

-Sai

On Wed, Jan 14, 2026 at 7:53 PM Toke Høiland-Jørgensen <toke@...nel.org> wrote:
>
> saiaunghlyanhtet <saiaunghlyanhtet2003@...il.com> writes:
>
> > When packets are redirected via cpumap, the original queue_index
> > information from xdp_rxq_info was lost. This is because the
> > xdp_frame structure did not include a queue_index field.
> >
> > This patch adds a queue_index field to struct xdp_frame and ensures
> > it is properly preserved during the xdp_buff to xdp_frame conversion.
> > Now the queue_index is reported to the xdp_rxq_info.
> >
> > Resolves the TODO comment in cpu_map_bpf_prog_run_xdp().
> >
> > Signed-off-by: saiaunghlyanhtet <saiaunghlyanhtet2003@...il.com>
>
> This exact patch was submitted before by Lorenzo[0] and was rejected
> with the argument that we shouldn't be adding more fields to xdp_frame
> in an ad-hoc manner, but rather wait until we have a more general
> solution.
>
> -Toke
>
> [0] https://lore.kernel.org/r/1a22e7e9-e6ef-028f-dffa-e954207dc24d@redhat.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ