netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislav Fomichev <stfomichev@gmail.com>
To: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, donald.hunter@gmail.com,
	andrew+netdev@lunn.ch, ast@kernel.org, daniel@iogearbox.net,
	hawk@kernel.org, john.fastabend@gmail.com, matttbe@kernel.org,
	chuck.lever@oracle.com, jdamato@fastly.com, skhawaja@google.com,
	dw@davidwei.uk, mkarsten@uwaterloo.ca,
	yoong.siang.song@intel.com, david.hunter.linux@gmail.com,
	skhan@linuxfoundation.org, horms@kernel.org, sdf@fomichev.me,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org,
	linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH RFC 0/4] Add XDP RX queue index metadata via kfuncs
Date: Wed, 24 Sep 2025 15:31:33 -0700	[thread overview]
Message-ID: <aNRxRRSfjOzSPNks@mini-arch> (raw)
In-Reply-To: <f103da72-0973-4a45-af81-ec1537422433@gmail.com>

On 09/24, Mehdi Ben Hadj Khelifa wrote:
> On 9/23/25 9:45 PM, Stanislav Fomichev wrote:
> > On 09/23, Mehdi Ben Hadj Khelifa wrote:
> > > ---
> > > Mehdi Ben Hadj Khelifa (4):
> > >    netlink: specs: Add XDP RX queue index to XDP metadata
> > >    net: xdp: Add xmo_rx_queue_index callback
> > >    uapi: netdev: Add XDP RX queue index metadata flags
> > >    net: veth: Implement RX queue index XDP hint
> > > 
> > >   Documentation/netlink/specs/netdev.yaml |  5 +++++
> > >   drivers/net/veth.c                      | 12 ++++++++++++
> > >   include/net/xdp.h                       |  5 +++++
> > >   include/uapi/linux/netdev.h             |  3 +++
> > >   net/core/xdp.c                          | 15 +++++++++++++++
> > >   tools/include/uapi/linux/netdev.h       |  3 +++
> > >   6 files changed, 43 insertions(+)
> > >   ---
> > >   base-commit: 07e27ad16399afcd693be20211b0dfae63e0615f
> > >   this is the commit of tag: v6.17-rc7 on the mainline.
> > >   This patch series is intended to make a base for setting
> > >   queue_index in the xdp_rxq_info struct in bpf/cpumap.c to
> > >   the right index. Although that part I still didn't figure
> > >   out yet,I m searching for my guidance to do that as well
> > >   as for the correctness of the patches in this series.
> 
> > But why do you need a kfunc getter? You can already get rxq index
> > via xdp_md rx_queue_index.
> 
> Hi Stanislav, When i was looking at the available information or recent
> similar patches to populate the queue_index in xdp_rxq_info inside of
> the cpu map of an ebpf program to run xdp. i stumbled upon this:
> https://lkml.rescloud.iu.edu/2506.1/02808.html
> 
> which suggests that in order to that, a struct called "xdp_rx_meta" should
> be the route to do that. In my navigation of code i only found
> the closest thing to that is xdp_rx_metadata which is an enum. I tried to
> follow was done for other metadata there like timestamp in order to see if
> that gets me closer to do that. which was stupid with the information that i
> have now but for my lack of experience (this is my first patch) i tried to
> reason with the code.So yeah, since xdp_md is the structure for transfering
> metadata to ebpf programs that use xdp. it's useless to have a kfunc to
> expose queue_index since it's already present there. But how would one try
> to populate the queue_index in xdp_rxq_info in cpu_map_bpf_prog_run_xdp()?
> Any sort of hints or guides would be much appreciated.
> Thank you for your time.

I don't really understand what queue_index means for the cpu map. It is
a kernel thread doing work, there is no queue. Maybe whoever added
the todo can clarify?

  reply	other threads:[~2025-09-24 22:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-23 21:00 [PATCH RFC 0/4] Add XDP RX queue index metadata via kfuncs Mehdi Ben Hadj Khelifa
2025-09-23 20:45 ` Stanislav Fomichev
2025-09-24 10:40   ` Mehdi Ben Hadj Khelifa
2025-09-24 22:31     ` Stanislav Fomichev [this message]
2025-09-25  9:57       ` Mehdi Ben Hadj Khelifa
2025-09-26  6:42         ` Lorenzo Bianconi
2025-09-23 21:00 ` [PATCH RFC 1/4] netlink: specs: Add XDP RX queue index to XDP metadata Mehdi Ben Hadj Khelifa
2025-09-23 21:00 ` [PATCH RFC 2/4] net: xdp: Add xmo_rx_queue_index callback Mehdi Ben Hadj Khelifa
2025-09-23 21:00 ` [PATCH RFC 3/4] uapi: netdev: Add XDP RX queue index metadata flags Mehdi Ben Hadj Khelifa
2025-09-23 21:00 ` [PATCH RFC 4/4] net: veth: Implement RX queue index XDP hint Mehdi Ben Hadj Khelifa
2025-09-25  9:43 ` [PATCH RFC 0/4] Add XDP RX queue index metadata via kfuncs Jakub Sitnicki
2025-09-25 10:54   ` Mehdi Ben Hadj Khelifa
2025-09-25 10:18     ` Jakub Sitnicki
2025-09-25 11:28       ` Mehdi Ben Hadj Khelifa
2025-09-25 10:47         ` Jakub Sitnicki
2025-09-25 12:03           ` 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=aNRxRRSfjOzSPNks@mini-arch \
    --to=stfomichev@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=david.hunter.linux@gmail.com \
    --cc=donald.hunter@gmail.com \
    --cc=dw@davidwei.uk \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=jdamato@fastly.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matttbe@kernel.org \
    --cc=mehdi.benhadjkhelifa@gmail.com \
    --cc=mkarsten@uwaterloo.ca \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=skhan@linuxfoundation.org \
    --cc=skhawaja@google.com \
    --cc=yoong.siang.song@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).