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: <2d7c6d00-692b-442c-931f-ace85f8b1477@kernel.org>
Date: Tue, 10 Jun 2025 13:29:52 +0200
From: Jesper Dangaard Brouer <hawk@...nel.org>
To: Ujwal Kundur <ujwal.kundur@...il.com>, ast@...nel.org,
 daniel@...earbox.net, davem@...emloft.net, kuba@...nel.org,
 john.fastabend@...il.com, andrii@...nel.org, martin.lau@...ux.dev,
 eddyz87@...il.com, song@...nel.org, yonghong.song@...ux.dev,
 kpsingh@...nel.org, sdf@...ichev.me, aoluo@...gle.com, jolsa@...nel.org
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bpf: cpumap: report Rx queue index to xdp_rxq_info



On 09/06/2025 19.38, Ujwal Kundur wrote:
> Refer to the Rx queue using a XDP frame's attached netdev and ascertain
> the queue index from it.
> 
> Signed-off-by: Ujwal Kundur <ujwal.kundur@...il.com>
> ---
>   kernel/bpf/cpumap.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c
> index 67e8a2fc1a99..8230292deac1 100644
> --- a/kernel/bpf/cpumap.c
> +++ b/kernel/bpf/cpumap.c
> @@ -34,6 +34,7 @@
>   #include <linux/btf_ids.h>
>   
>   #include <linux/netdevice.h>
> +#include <net/netdev_rx_queue.h>
>   #include <net/gro.h>
>   
>   /* General idea: XDP packets getting XDP redirected to another CPU,
> @@ -196,7 +197,7 @@ static int cpu_map_bpf_prog_run_xdp(struct bpf_cpu_map_entry *rcpu,
>   
>   		rxq.dev = xdpf->dev_rx;
>   		rxq.mem.type = xdpf->mem_type;
> -		/* TODO: report queue_index to xdp_rxq_info */
> +		rxq.queue_index = get_netdev_rx_queue_index(xdpf->dev_rx->_rx);

This looks wrong...
I think this will always return index 0

--Jesper

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ