Re: [RFC net-next 1/2] netdev-genl: Add an XSK attribute to queues
From: Joe Damato
Date: Thu Jan 30 2025 - 13:07:04 EST
On Wed, Jan 29, 2025 at 05:52:24PM -0800, Jakub Kicinski wrote:
> On Wed, 29 Jan 2025 17:24:24 +0000 Joe Damato wrote:
> > Expose a new per-queue attribute, xsk, which indicates that a queue is
> > being used for AF_XDP. Update the documentation to more explicitly state
> > which queue types are linked.
>
> Let's do the same thing we did for io_uring queues? An empty nest:
> https://lore.kernel.org/all/20250116231704.2402455-6-dw@xxxxxxxxxxx/
>
> At the protocol level nest is both smaller and more flexible.
> It's just 4B with zero length and a "this is a nest" flag.
> We can add attributes to it as we think of things to express.
I got a thing working locally, but just to make sure I'm
following... you are saying that the attribute will exist (but have
nothing in it) when the queue has a pool, and when !q->pool the
attribute will not exist?
For example:
[{'id': 0, 'ifindex': 5, 'napi-id': 8266, 'type': 'rx', 'xsk': {}},
{'id': 1, 'ifindex': 5, 'napi-id': 8267, 'type': 'rx'},
...
Is that what you are thinking?
Completely fine with me as I haven't read enough of the xsk code to
really have a good sense of what attributes might be helpful to
expose at this point.