diff mbox series

[net-next,6/9] netlink: specs: Expand the pse netlink command with PoE interface

Message ID 20231116-feature_poe-v1-6-be48044bf249@bootlin.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series net: Add support for Power over Ethernet (PoE) | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/cc_maintainers warning 1 maintainers not CCed: sdf@google.com
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 27 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Kory Maincent Nov. 16, 2023, 2:01 p.m. UTC
Add the PoE pse attributes prefix to be able to use PoE interface.

Example usage:
./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do pse-get \
             --json '{"header":{"dev-name":"eth0"}}'
{'header': {'dev-index': 4, 'dev-name': 'eth0'},
 'pse-admin-state': 3,
 'pse-pw-d-status': 4}

./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do pse-set \
             --json '{"header":{"dev-name":"eth0"}, "pse-admin-control":3}'

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
 Documentation/netlink/specs/ethtool.yaml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Jakub Kicinski Nov. 19, 2023, 12:01 a.m. UTC | #1
On Thu, 16 Nov 2023 15:01:38 +0100 Kory Maincent wrote:
> +        name: pse-admin-state
> +        type: u32
> +        name-prefix: ethtool-a-
> +      -
> +        name: pse-admin-control
> +        type: u32
> +        name-prefix: ethtool-a-
> +      -
> +        name: pse-pw-d-status
> +        type: u32
> +        name-prefix: ethtool-a-

The default prefix is ethtool-a-pse-
Why don't you leave that be and drop the pse- from the names?
Kory Maincent Nov. 20, 2023, 10:13 a.m. UTC | #2
On Sat, 18 Nov 2023 16:01:31 -0800
Jakub Kicinski <kuba@kernel.org> wrote:

> On Thu, 16 Nov 2023 15:01:38 +0100 Kory Maincent wrote:
> > +        name: pse-admin-state
> > +        type: u32
> > +        name-prefix: ethtool-a-
> > +      -
> > +        name: pse-admin-control
> > +        type: u32
> > +        name-prefix: ethtool-a-
> > +      -
> > +        name: pse-pw-d-status
> > +        type: u32
> > +        name-prefix: ethtool-a-  
> 
> The default prefix is ethtool-a-pse-
> Why don't you leave that be and drop the pse- from the names?

Oh right, thanks, I copied blindly the PoDL lines.

Regards,
diff mbox series

Patch

diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml
index e1bf75099264..6e1525106a9e 100644
--- a/Documentation/netlink/specs/ethtool.yaml
+++ b/Documentation/netlink/specs/ethtool.yaml
@@ -889,6 +889,18 @@  attribute-sets:
         name: podl-pse-pw-d-status
         type: u32
         name-prefix: ethtool-a-
+      -
+        name: pse-admin-state
+        type: u32
+        name-prefix: ethtool-a-
+      -
+        name: pse-admin-control
+        type: u32
+        name-prefix: ethtool-a-
+      -
+        name: pse-pw-d-status
+        type: u32
+        name-prefix: ethtool-a-
   -
     name: rss
     attributes:
@@ -1571,6 +1583,9 @@  operations:
             - podl-pse-admin-state
             - podl-pse-admin-control
             - podl-pse-pw-d-status
+            - pse-admin-state
+            - pse-admin-control
+            - pse-pw-d-status
       dump: *pse-get-op
     -
       name: pse-set