From: Jesper Dangaard Brouer <hawk@kernel.org>
To: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>,
ast@kernel.org, daniel@iogearbox.net, davem@davemloft.net,
kuba@kernel.org, john.fastabend@gmail.com, sdf@fomichev.me,
andrii@kernel.org, martin.lau@linux.dev, eddyz87@gmail.com,
song@kernel.org, yonghong.song@linux.dev, kpsingh@kernel.org,
haoluo@google.com, jolsa@kernel.org
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, skhan@linuxfoundation.org,
david.hunter.linux@gmail.com, khalid@kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH bpf-next v2] bpf/cpumap.c: Remove unnecessary TODO comment
Date: Tue, 21 Oct 2025 11:37:00 +0200 [thread overview]
Message-ID: <e0901356-ef48-4652-9ad4-ff85ae07d83a@kernel.org> (raw)
In-Reply-To: <20251020170254.14622-1-mehdi.benhadjkhelifa@gmail.com>
On 20/10/2025 19.02, Mehdi Ben Hadj Khelifa wrote:
> After discussion with bpf maintainers[1], queue_index could
> be propagated to the remote XDP program by the xdp_md struct[2]
> which makes this todo a misguide for future effort.
>
> [1]:https://lore.kernel.org/all/87y0q23j2w.fsf@cloudflare.com/
> [2]:https://docs.ebpf.io/linux/helper-function/bpf_xdp_adjust_meta/
>
> Signed-off-by: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>
> ---
> Changelog:
>
> Changes from v1:
>
> -Added a comment to clarify that RX queue_index is lost after the frame
> redirection.
>
> Link:https://lore.kernel.org/bpf/d9819687-5b0d-4bfa-9aec-aef71b847383@gmail.com/T/#mcb6a0315f174d02db3c9bc4fa556cc939c87a706
> kernel/bpf/cpumap.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c
> index 703e5df1f4ef..6856a4a67840 100644
> --- a/kernel/bpf/cpumap.c
> +++ b/kernel/bpf/cpumap.c
> @@ -195,7 +195,10 @@ 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 */
> + /* The NIC RX queue_index is lost after the frame redirection
> + * but in case of need, it can be passed as a custom XDP
> + * metadata via xdp_md struct to the remote XDP program
Argh, saying XDP metadata is accessed via the xdp_md struct is just wrong.
Nacked-by: Jesper Dangaard Brouer <hawk@kernel.org>
> + */
>
> xdp_convert_frame_to_buff(xdpf, &xdp);
>
next prev parent reply other threads:[~2025-10-21 9:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 17:02 [PATCH bpf-next v2] bpf/cpumap.c: Remove unnecessary TODO comment Mehdi Ben Hadj Khelifa
2025-10-21 9:37 ` Jesper Dangaard Brouer [this message]
2025-10-21 11:13 ` Mehdi Ben Hadj Khelifa
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=e0901356-ef48-4652-9ad4-ff85ae07d83a@kernel.org \
--to=hawk@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=david.hunter.linux@gmail.com \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=khalid@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mehdi.benhadjkhelifa@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=sdf@fomichev.me \
--cc=skhan@linuxfoundation.org \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox