[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250701125008.GP41770@horms.kernel.org>
Date: Tue, 1 Jul 2025 13:50:08 +0100
From: Simon Horman <horms@...nel.org>
To: Aurelien Aptel <aaptel@...dia.com>
Cc: linux-nvme@...ts.infradead.org, netdev@...r.kernel.org,
sagi@...mberg.me, hch@....de, kbusch@...nel.org, axboe@...com,
chaitanyak@...dia.com, davem@...emloft.net, kuba@...nel.org,
aurelien.aptel@...il.com, smalin@...dia.com, malin1024@...il.com,
ogerlitz@...dia.com, yorayz@...dia.com, borisp@...dia.com,
galshalom@...dia.com, mgurtovoy@...dia.com, tariqt@...dia.com,
gus@...labora.com, edumazet@...gle.com, pabeni@...hat.com
Subject: Re: [PATCH v29 02/20] netlink: add new family to manage ULP_DDP
enablement and stats
On Mon, Jun 30, 2025 at 02:07:19PM +0000, Aurelien Aptel wrote:
> Add a new netlink family to get/set ULP DDP capabilities on a network
> device and to retrieve statistics.
>
> The messages use the genetlink infrastructure and are specified in a
> YAML file which was used to generate some of the files in this commit:
>
> ./tools/net/ynl/ynl-gen-c.py --mode kernel \
> --spec ./Documentation/netlink/specs/ulp_ddp.yaml --header \
> -o net/core/ulp_ddp_gen_nl.h
> ./tools/net/ynl/ynl-gen-c.py --mode kernel \
> --spec ./Documentation/netlink/specs/ulp_ddp.yaml --source \
> -o net/core/ulp_ddp_gen_nl.c
> ./tools/net/ynl/ynl-gen-c.py --mode uapi \
> --spec ./Documentation/netlink/specs/ulp_ddp.yaml --header \
> > include/uapi/linux/ulp_ddp.h
>
> Signed-off-by: Shai Malin <smalin@...dia.com>
> Signed-off-by: Aurelien Aptel <aaptel@...dia.com>
> Reviewed-by: Jiri Pirko <jiri@...dia.com>
> ---
> Documentation/netlink/specs/ulp_ddp.yaml | 172 +++++++++++
> include/net/ulp_ddp.h | 3 +-
> include/uapi/linux/ulp_ddp.h | 61 ++++
> net/core/Makefile | 2 +-
> net/core/ulp_ddp_gen_nl.c | 75 +++++
> net/core/ulp_ddp_gen_nl.h | 30 ++
> net/core/ulp_ddp_nl.c | 348 +++++++++++++++++++++++
> 7 files changed, 689 insertions(+), 2 deletions(-)
> create mode 100644 Documentation/netlink/specs/ulp_ddp.yaml
> create mode 100644 include/uapi/linux/ulp_ddp.h
> create mode 100644 net/core/ulp_ddp_gen_nl.c
> create mode 100644 net/core/ulp_ddp_gen_nl.h
> create mode 100644 net/core/ulp_ddp_nl.c
>
> diff --git a/Documentation/netlink/specs/ulp_ddp.yaml b/Documentation/netlink/specs/ulp_ddp.yaml
> new file mode 100644
> index 000000000000..27a0b905ec28
> --- /dev/null
> +++ b/Documentation/netlink/specs/ulp_ddp.yaml
> @@ -0,0 +1,172 @@
> +# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
> +#
> +# Author: Aurelien Aptel <aaptel@...dia.com>
> +#
> +# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
> +#
> +
> +name: ulp_ddp
I think that the name needs to avoid using '_' ('-' seems ok)
in order for make -C tools/net/ynl/ to run successfully
on current net-next.
...
> + name: caps
> + attributes:
> + -
> + name: ifindex
> + doc: Interface index of the net device.
> + type: u32
> + -
> + name: hw
> + doc: Bitmask of the capabilities supported by the device.
> + type: uint
> + enum: cap
> + enum-as-flags: true
> + -
> + name: active
> + doc: Bitmask of the capabilities currently enabled on the device.
> + type: uint
> + enum: cap
> + enum-as-flags: true
> + -
> + name: wanted
> + doc: >
> + New active bit values of the capabilities we want to set on the
> + device.
> + type: uint
> + enum: cap
> + enum-as-flags: true
> + -
> + name: wanted_mask
Likewise here.
> + doc: Bitmask of the meaningful bits in the wanted field.
> + type: uint
> + enum: cap
> + enum-as-flags: true
> +
...
> + name: caps-set
> + doc: Set ULP DDP capabilities.
> + attribute-set: caps
> + do:
> + request:
> + attributes:
> + - ifindex
> + - wanted
> + - wanted_mask
And correspondingly, here.
> + reply:
> + attributes:
> + - ifindex
> + - hw
> + - active
> + pre: ulp_ddp_get_netdev
> + post: ulp_ddp_put_netdev
> + -
> + name: caps-set-ntf
> + doc: Notification for change in ULP DDP capabilities.
> + notify: caps-get
...
Powered by blists - more mailing lists