mbox series

[net-next,v3,00/12] devlink: use spec to generate split ops

Message ID 20230803111340.1074067-1-jiri@resnulli.us (mailing list archive)
Headers show
Series devlink: use spec to generate split ops | expand

Message

Jiri Pirko Aug. 3, 2023, 11:13 a.m. UTC
From: Jiri Pirko <jiri@nvidia.com>

This is an outcome of the discussion in the following thread:
https://lore.kernel.org/netdev/20230720121829.566974-1-jiri@resnulli.us/
It serves as a dependency on the linked selector patchset.

There is an existing spec for devlink used for userspace part
generation. There are two commands supported there.

This patchset extends the spec so kernel split ops code could
be generated from it.

---
v2->v3:
- reordered a bit to avoid build break, small changes to fix that
- see individual patches for changelog
v1->v2:
- see individual patches for changelog

Jiri Pirko (12):
  netlink: specs: add dump-strict flag for dont-validate property
  ynl-gen-c.py: filter rendering of validate field values for split ops
  ynl-gen-c.py: allow directional model for kernel mode
  ynl-gen-c.py: render netlink policies static for split ops
  devlink: rename devlink_nl_ops to devlink_nl_small_ops
  devlink: rename couple of doit netlink callbacks to match generated
    names
  devlink: introduce couple of dumpit callbacks for split ops
  devlink: un-static devlink_nl_pre/post_doit()
  netlink: specs: devlink: add info-get dump op
  devlink: add split ops generated according to spec
  devlink: include the generated netlink header
  devlink: use generated split ops and remove duplicated commands from
    small ops

 Documentation/netlink/genetlink-c.yaml      |  2 +-
 Documentation/netlink/genetlink-legacy.yaml |  2 +-
 Documentation/netlink/genetlink.yaml        |  2 +-
 Documentation/netlink/specs/devlink.yaml    | 14 ++++-
 net/devlink/Makefile                        |  2 +-
 net/devlink/dev.c                           | 26 ++++-----
 net/devlink/devl_internal.h                 | 20 +++----
 net/devlink/leftover.c                      | 16 +-----
 net/devlink/netlink.c                       | 35 ++++++------
 net/devlink/netlink_gen.c                   | 59 +++++++++++++++++++++
 net/devlink/netlink_gen.h                   | 29 ++++++++++
 tools/net/ynl/generated/devlink-user.c      | 53 ++++++++++++++++++
 tools/net/ynl/generated/devlink-user.h      | 10 ++++
 tools/net/ynl/ynl-gen-c.py                  | 20 +++++--
 14 files changed, 230 insertions(+), 60 deletions(-)
 create mode 100644 net/devlink/netlink_gen.c
 create mode 100644 net/devlink/netlink_gen.h

Comments

Jakub Kicinski Aug. 4, 2023, 1:23 a.m. UTC | #1
On Thu,  3 Aug 2023 13:13:28 +0200 Jiri Pirko wrote:
> This is an outcome of the discussion in the following thread:
> https://lore.kernel.org/netdev/20230720121829.566974-1-jiri@resnulli.us/
> It serves as a dependency on the linked selector patchset.
> 
> There is an existing spec for devlink used for userspace part
> generation. There are two commands supported there.
> 
> This patchset extends the spec so kernel split ops code could
> be generated from it.

Reviewed-by: Jakub Kicinski <kuba@kernel.org>
patchwork-bot+netdevbpf@kernel.org Aug. 4, 2023, 9:10 p.m. UTC | #2
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu,  3 Aug 2023 13:13:28 +0200 you wrote:
> From: Jiri Pirko <jiri@nvidia.com>
> 
> This is an outcome of the discussion in the following thread:
> https://lore.kernel.org/netdev/20230720121829.566974-1-jiri@resnulli.us/
> It serves as a dependency on the linked selector patchset.
> 
> There is an existing spec for devlink used for userspace part
> generation. There are two commands supported there.
> 
> [...]

Here is the summary with links:
  - [net-next,v3,01/12] netlink: specs: add dump-strict flag for dont-validate property
    https://git.kernel.org/netdev/net-next/c/78c96d7b7c9a
  - [net-next,v3,02/12] ynl-gen-c.py: filter rendering of validate field values for split ops
    https://git.kernel.org/netdev/net-next/c/dc7b81a828db
  - [net-next,v3,03/12] ynl-gen-c.py: allow directional model for kernel mode
    https://git.kernel.org/netdev/net-next/c/eab7be688b44
  - [net-next,v3,04/12] ynl-gen-c.py: render netlink policies static for split ops
    https://git.kernel.org/netdev/net-next/c/fa8ba3502ade
  - [net-next,v3,05/12] devlink: rename devlink_nl_ops to devlink_nl_small_ops
    https://git.kernel.org/netdev/net-next/c/ba0f66c95fa6
  - [net-next,v3,06/12] devlink: rename couple of doit netlink callbacks to match generated names
    https://git.kernel.org/netdev/net-next/c/d61aedcf628e
  - [net-next,v3,07/12] devlink: introduce couple of dumpit callbacks for split ops
    https://git.kernel.org/netdev/net-next/c/491a24872a64
  - [net-next,v3,08/12] devlink: un-static devlink_nl_pre/post_doit()
    https://git.kernel.org/netdev/net-next/c/8300dce542e4
  - [net-next,v3,09/12] netlink: specs: devlink: add info-get dump op
    https://git.kernel.org/netdev/net-next/c/759f661012d1
  - [net-next,v3,10/12] devlink: add split ops generated according to spec
    https://git.kernel.org/netdev/net-next/c/6b7c486cae81
  - [net-next,v3,11/12] devlink: include the generated netlink header
    https://git.kernel.org/netdev/net-next/c/b2551b1517d8
  - [net-next,v3,12/12] devlink: use generated split ops and remove duplicated commands from small ops
    https://git.kernel.org/netdev/net-next/c/6e067d0cab68

You are awesome, thank you!