Commit eef9630d authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'devlink-use-spec-to-generate-split-ops'

Jiri Pirko says:

====================
devlink: use spec to generate split ops

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.
====================

Link: https://lore.kernel.org/r/20230803111340.1074067-1-jiri@resnulli.us


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 86b7e033 6e067d0c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -274,7 +274,7 @@ properties:
              description: Kernel attribute validation flags.
              type: array
              items:
                enum: [ strict, dump ]
                enum: [ strict, dump, dump-strict ]
            do: &subop-type
              description: Main command handler.
              type: object
+1 −1
Original line number Diff line number Diff line
@@ -321,7 +321,7 @@ properties:
              description: Kernel attribute validation flags.
              type: array
              items:
                enum: [ strict, dump ]
                enum: [ strict, dump, dump-strict ]
            # Start genetlink-legacy
            fixed-header: *fixed-header
            # End genetlink-legacy
+1 −1
Original line number Diff line number Diff line
@@ -243,7 +243,7 @@ properties:
              description: Kernel attribute validation flags.
              type: array
              items:
                enum: [ strict, dump ]
                enum: [ strict, dump, dump-strict ]
            do: &subop-type
              description: Main command handler.
              type: object
+13 −1
Original line number Diff line number Diff line
@@ -165,8 +165,13 @@ operations:
      name: get
      doc: Get devlink instances.
      attribute-set: devlink
      dont-validate:
        - strict
        - dump

      do:
        pre: devlink-nl-pre-doit
        post: devlink-nl-post-doit
        request:
          value: 1
          attributes: &dev-id-attrs
@@ -189,12 +194,17 @@ operations:
      name: info-get
      doc: Get device information, like driver name, hardware and firmware versions etc.
      attribute-set: devlink
      dont-validate:
        - strict
        - dump

      do:
        pre: devlink-nl-pre-doit
        post: devlink-nl-post-doit
        request:
          value: 51
          attributes: *dev-id-attrs
        reply:
        reply: &info-get-reply
          value: 51
          attributes:
            - bus-name
@@ -204,3 +214,5 @@ operations:
            - info-version-fixed
            - info-version-running
            - info-version-stored
      dump:
        reply: *info-get-reply
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

obj-y := leftover.o core.o netlink.o dev.o health.o
obj-y := leftover.o core.o netlink.o netlink_gen.o dev.o health.o
Loading