[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0dd28272-6131-4fe2-aa32-df315a6c4a0f@blackwall.org>
Date: Wed, 22 Oct 2025 14:23:55 +0300
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: Daniel Borkmann <daniel@...earbox.net>, netdev@...r.kernel.org
Cc: bpf@...r.kernel.org, kuba@...nel.org, davem@...emloft.net,
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 v3 03/15] net: Add peer info to queue-get
response
On 10/20/25 19:23, Daniel Borkmann wrote:
> From: David Wei <dw@...idwei.uk>
>
> Add a nested peer field to the queue-get response that returns the peered
> ifindex and queue id.
>
> Example with ynl client:
>
> # ip netns exec foo ./pyynl/cli.py \
> --spec ~/netlink/specs/netdev.yaml \
> --do queue-get \
> --json '{"ifindex": 3, "id": 1, "type": "rx"}'
> {'id': 1, 'ifindex': 3, 'peer': {'id': 15, 'ifindex': 4, 'netns-id': 21}, 'type': 'rx'}
>
> Note that the caller of netdev_nl_queue_fill_one() holds the netdevice
> lock. For the queue-get we do not lock both devices. When queues get
> {un,}peered, both devices are locked, thus if netdev_rx_queue_peered()
> returns true, the peer pointer points to a valid device. The netns-id
> is fetched via peernet2id_alloc() similarly as done in OVS.
>
> Signed-off-by: David Wei <dw@...idwei.uk>
> Co-developed-by: Daniel Borkmann <daniel@...earbox.net>
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> ---
> Documentation/netlink/specs/netdev.yaml | 24 ++++++++++++++++++
> include/net/netdev_rx_queue.h | 3 +++
> include/uapi/linux/netdev.h | 10 ++++++++
> net/core/netdev-genl.c | 33 +++++++++++++++++++++++--
> net/core/netdev_rx_queue.c | 8 ++++++
> tools/include/uapi/linux/netdev.h | 10 ++++++++
> 6 files changed, 86 insertions(+), 2 deletions(-)
>
Reviewed-by: Nikolay Aleksandrov <razor@...ckwall.org>
Powered by blists - more mailing lists