[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aW2MXiopZOUZLgSE@mini-arch>
Date: Sun, 18 Jan 2026 17:43:58 -0800
From: Stanislav Fomichev <stfomichev@...il.com>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, kuba@...nel.org,
davem@...emloft.net, razor@...ckwall.org, pabeni@...hat.com,
willemb@...gle.com, sdf@...ichev.me, john.fastabend@...il.com,
martin.lau@...nel.org, jordan@...fe.io,
maciej.fijalkowski@...el.com, magnus.karlsson@...el.com,
dw@...idwei.uk, toke@...hat.com, yangzhenze@...edance.com,
wangdongdong.6@...edance.com
Subject: Re: [PATCH net-next v7 01/16] net: Add queue-create operation
On 01/15, Daniel Borkmann wrote:
> Add a ynl netdev family operation called queue-create that creates a
> new queue on a netdevice:
>
> name: queue-create
> attribute-set: queue
> flags: [admin-perm]
> do:
> request:
> attributes:
> - ifindex
> - type
> - lease
> reply: &queue-create-op
> attributes:
> - id
>
> This is a generic operation such that it can be extended for various
> use cases in future. Right now it is mandatory to specify ifindex,
> the queue type which is enforced to rx and a lease. The newly created
> queue id is returned to the caller.
>
> A queue from a virtual device can have a lease which refers to another
> queue from a physical device. This is useful for memory providers
> and AF_XDP operations which take an ifindex and queue id to allow
> applications to bind against virtual devices in containers. The lease
> couples both queues together and allows to proxy the operations from
> a virtual device in a container to the physical device.
>
> In future, the nested lease attribute can be lifted and made optional
> for other use-cases such as dynamic queue creation for physical
> netdevs. The lack of lease and the specification of the physical
> device as an ifindex will imply that we need a real queue to be
> allocated. Similarly, the queue type enforcement to rx can then be
> lifted as well to support tx.
>
> An early implementation had only driver-specific integration [0], but
> in order for other virtual devices to reuse, it makes sense to have
> this as a generic API in core net.
>
> For leasing queues, the virtual netdev must have real_num_rx_queue
> less than num_rx_queues at the time of calling queue-create. The
> queue-type must be rx as only rx queues are supported for leasing
> for now. We also enforce that the queue-create ifindex must point
> to a virtual device, and that the nested lease attribute's ifindex
> must point to a physical device. The nested lease attribute set
> contains a netns-id attribute which is currently only intended for
> dumping as part of the queue-get operation. Also, it is modeled as
> an s32 type similarly as done elsewhere in the stack.
>
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> Co-developed-by: David Wei <dw@...idwei.uk>
> Signed-off-by: David Wei <dw@...idwei.uk>
> Link: https://bpfconf.ebpf.io/bpfconf2025/bpfconf2025_material/lsfmmbpf_2025_netkit_borkmann.pdf [0]
Acked-by: Stanislav Fomichev <sdf@...ichev.me>
Powered by blists - more mailing lists