2023-03-16 07:03:50 +08:00
|
|
|
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
2023-03-07 04:04:57 +08:00
|
|
|
|
netlink: specs: add partial specification for ethtool
Ethtool is one of the most actively developed families.
With the changes to the CLI it should be possible to use
the YNL based code for easy prototyping and development.
Add a partial family definition. I've tested the string
set and rings. I don't have any MAC Merge implementation
to test with, but I added the definition for it, anyway,
because it's last. New commands can simply be added at
the end without having to worry about manually providing
IDs / values.
Set (with notification support - None is the response,
the data is from the notification):
$ sudo ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--do rings-set \
--json '{"header":{"dev-name":"enp0s31f6"}, "rx":129}' \
--subscribe monitor
None
[{'msg': {'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0},
'name': 'rings-ntf'}]
Do / dump (yes, the kernel requires that even for dump and even
if empty - the "header" nest must be there):
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--do rings-get \
--json '{"header":{"dev-index": 2}}'
{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0}
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--dump rings-get \
--json '{"header":{}}'
[{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0},
{'header': {'dev-index': 3, 'dev-name': 'wlp0s20f3'}, 'tx-push': 0},
{'header': {'dev-index': 19, 'dev-name': 'enp58s0u1u1'},
'rx': 100,
'rx-max': 4096,
'tx-push': 0}]
And error reporting:
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--dump rings-get \
--json '{"header":{"flags":5}}'
Netlink error: Invalid argument
nl_len = 68 (52) nl_flags = 0x300 nl_type = 2
error: -22 extack: {'msg': 'reserved bit set',
'bad-attr-offs': 24,
'bad-attr': '.header.flags'}
None
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-31 10:33:52 +08:00
|
|
|
name: ethtool
|
|
|
|
|
|
|
|
protocol: genetlink-legacy
|
|
|
|
|
|
|
|
doc: Partial family for Ethtool Netlink.
|
|
|
|
|
2023-03-30 06:16:53 +08:00
|
|
|
definitions:
|
|
|
|
-
|
|
|
|
name: udp-tunnel-type
|
2023-06-10 05:43:38 +08:00
|
|
|
enum-name:
|
2023-03-30 06:16:53 +08:00
|
|
|
type: enum
|
|
|
|
entries: [ vxlan, geneve, vxlan-gpe ]
|
2023-06-10 05:43:41 +08:00
|
|
|
-
|
|
|
|
name: stringset
|
|
|
|
type: enum
|
|
|
|
entries: []
|
2023-03-30 06:16:53 +08:00
|
|
|
|
netlink: specs: add partial specification for ethtool
Ethtool is one of the most actively developed families.
With the changes to the CLI it should be possible to use
the YNL based code for easy prototyping and development.
Add a partial family definition. I've tested the string
set and rings. I don't have any MAC Merge implementation
to test with, but I added the definition for it, anyway,
because it's last. New commands can simply be added at
the end without having to worry about manually providing
IDs / values.
Set (with notification support - None is the response,
the data is from the notification):
$ sudo ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--do rings-set \
--json '{"header":{"dev-name":"enp0s31f6"}, "rx":129}' \
--subscribe monitor
None
[{'msg': {'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0},
'name': 'rings-ntf'}]
Do / dump (yes, the kernel requires that even for dump and even
if empty - the "header" nest must be there):
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--do rings-get \
--json '{"header":{"dev-index": 2}}'
{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0}
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--dump rings-get \
--json '{"header":{}}'
[{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0},
{'header': {'dev-index': 3, 'dev-name': 'wlp0s20f3'}, 'tx-push': 0},
{'header': {'dev-index': 19, 'dev-name': 'enp58s0u1u1'},
'rx': 100,
'rx-max': 4096,
'tx-push': 0}]
And error reporting:
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--dump rings-get \
--json '{"header":{"flags":5}}'
Netlink error: Invalid argument
nl_len = 68 (52) nl_flags = 0x300 nl_type = 2
error: -22 extack: {'msg': 'reserved bit set',
'bad-attr-offs': 24,
'bad-attr': '.header.flags'}
None
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-31 10:33:52 +08:00
|
|
|
attribute-sets:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: dev-index
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: dev-name
|
|
|
|
type: string
|
|
|
|
-
|
|
|
|
name: flags
|
|
|
|
type: u32
|
|
|
|
|
|
|
|
-
|
|
|
|
name: bitset-bit
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: index
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: name
|
|
|
|
type: string
|
|
|
|
-
|
|
|
|
name: value
|
|
|
|
type: flag
|
|
|
|
-
|
|
|
|
name: bitset-bits
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: bit
|
|
|
|
type: nest
|
2023-03-30 06:16:53 +08:00
|
|
|
multi-attr: true
|
netlink: specs: add partial specification for ethtool
Ethtool is one of the most actively developed families.
With the changes to the CLI it should be possible to use
the YNL based code for easy prototyping and development.
Add a partial family definition. I've tested the string
set and rings. I don't have any MAC Merge implementation
to test with, but I added the definition for it, anyway,
because it's last. New commands can simply be added at
the end without having to worry about manually providing
IDs / values.
Set (with notification support - None is the response,
the data is from the notification):
$ sudo ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--do rings-set \
--json '{"header":{"dev-name":"enp0s31f6"}, "rx":129}' \
--subscribe monitor
None
[{'msg': {'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0},
'name': 'rings-ntf'}]
Do / dump (yes, the kernel requires that even for dump and even
if empty - the "header" nest must be there):
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--do rings-get \
--json '{"header":{"dev-index": 2}}'
{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0}
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--dump rings-get \
--json '{"header":{}}'
[{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0},
{'header': {'dev-index': 3, 'dev-name': 'wlp0s20f3'}, 'tx-push': 0},
{'header': {'dev-index': 19, 'dev-name': 'enp58s0u1u1'},
'rx': 100,
'rx-max': 4096,
'tx-push': 0}]
And error reporting:
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--dump rings-get \
--json '{"header":{"flags":5}}'
Netlink error: Invalid argument
nl_len = 68 (52) nl_flags = 0x300 nl_type = 2
error: -22 extack: {'msg': 'reserved bit set',
'bad-attr-offs': 24,
'bad-attr': '.header.flags'}
None
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-31 10:33:52 +08:00
|
|
|
nested-attributes: bitset-bit
|
|
|
|
-
|
|
|
|
name: bitset
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: nomask
|
|
|
|
type: flag
|
|
|
|
-
|
|
|
|
name: size
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: bits
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset-bits
|
|
|
|
|
|
|
|
-
|
|
|
|
name: string
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: index
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: value
|
|
|
|
type: string
|
|
|
|
-
|
|
|
|
name: strings
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: string
|
|
|
|
type: nest
|
|
|
|
multi-attr: true
|
|
|
|
nested-attributes: string
|
|
|
|
-
|
|
|
|
name: stringset
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: id
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: count
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: strings
|
|
|
|
type: nest
|
|
|
|
multi-attr: true
|
|
|
|
nested-attributes: strings
|
|
|
|
-
|
|
|
|
name: stringsets
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: stringset
|
|
|
|
type: nest
|
|
|
|
multi-attr: true
|
|
|
|
nested-attributes: stringset
|
|
|
|
-
|
|
|
|
name: strset
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: stringsets
|
|
|
|
type: nest
|
|
|
|
nested-attributes: stringsets
|
|
|
|
-
|
|
|
|
name: counts-only
|
|
|
|
type: flag
|
|
|
|
|
|
|
|
-
|
|
|
|
name: privflags
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: flags
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
|
|
|
|
-
|
|
|
|
name: rings
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: rx-max
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rx-mini-max
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rx-jumbo-max
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-max
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rx
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rx-mini
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rx-jumbo
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rx-buf-len
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tcp-data-split
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: cqe-size
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-push
|
|
|
|
type: u8
|
2023-02-14 12:32:46 +08:00
|
|
|
-
|
|
|
|
name: rx-push
|
|
|
|
type: u8
|
2023-03-24 00:36:05 +08:00
|
|
|
-
|
|
|
|
name: tx-push-buf-len
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-push-buf-len-max
|
|
|
|
type: u32
|
netlink: specs: add partial specification for ethtool
Ethtool is one of the most actively developed families.
With the changes to the CLI it should be possible to use
the YNL based code for easy prototyping and development.
Add a partial family definition. I've tested the string
set and rings. I don't have any MAC Merge implementation
to test with, but I added the definition for it, anyway,
because it's last. New commands can simply be added at
the end without having to worry about manually providing
IDs / values.
Set (with notification support - None is the response,
the data is from the notification):
$ sudo ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--do rings-set \
--json '{"header":{"dev-name":"enp0s31f6"}, "rx":129}' \
--subscribe monitor
None
[{'msg': {'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0},
'name': 'rings-ntf'}]
Do / dump (yes, the kernel requires that even for dump and even
if empty - the "header" nest must be there):
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--do rings-get \
--json '{"header":{"dev-index": 2}}'
{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0}
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--dump rings-get \
--json '{"header":{}}'
[{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0},
{'header': {'dev-index': 3, 'dev-name': 'wlp0s20f3'}, 'tx-push': 0},
{'header': {'dev-index': 19, 'dev-name': 'enp58s0u1u1'},
'rx': 100,
'rx-max': 4096,
'tx-push': 0}]
And error reporting:
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--dump rings-get \
--json '{"header":{"flags":5}}'
Netlink error: Invalid argument
nl_len = 68 (52) nl_flags = 0x300 nl_type = 2
error: -22 extack: {'msg': 'reserved bit set',
'bad-attr-offs': 24,
'bad-attr': '.header.flags'}
None
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-31 10:33:52 +08:00
|
|
|
|
|
|
|
-
|
|
|
|
name: mm-stat
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: pad
|
|
|
|
type: pad
|
|
|
|
-
|
|
|
|
name: reassembly-errors
|
|
|
|
type: u64
|
|
|
|
-
|
|
|
|
name: smd-errors
|
|
|
|
type: u64
|
|
|
|
-
|
|
|
|
name: reassembly-ok
|
|
|
|
type: u64
|
|
|
|
-
|
|
|
|
name: rx-frag-count
|
|
|
|
type: u64
|
|
|
|
-
|
|
|
|
name: tx-frag-count
|
|
|
|
type: u64
|
|
|
|
-
|
|
|
|
name: hold-count
|
|
|
|
type: u64
|
|
|
|
-
|
|
|
|
name: mm
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: pmac-enabled
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: tx-enabled
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: tx-active
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: tx-min-frag-size
|
|
|
|
type: u32
|
|
|
|
-
|
2023-06-06 07:32:57 +08:00
|
|
|
name: rx-min-frag-size
|
netlink: specs: add partial specification for ethtool
Ethtool is one of the most actively developed families.
With the changes to the CLI it should be possible to use
the YNL based code for easy prototyping and development.
Add a partial family definition. I've tested the string
set and rings. I don't have any MAC Merge implementation
to test with, but I added the definition for it, anyway,
because it's last. New commands can simply be added at
the end without having to worry about manually providing
IDs / values.
Set (with notification support - None is the response,
the data is from the notification):
$ sudo ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--do rings-set \
--json '{"header":{"dev-name":"enp0s31f6"}, "rx":129}' \
--subscribe monitor
None
[{'msg': {'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0},
'name': 'rings-ntf'}]
Do / dump (yes, the kernel requires that even for dump and even
if empty - the "header" nest must be there):
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--do rings-get \
--json '{"header":{"dev-index": 2}}'
{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0}
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--dump rings-get \
--json '{"header":{}}'
[{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0},
{'header': {'dev-index': 3, 'dev-name': 'wlp0s20f3'}, 'tx-push': 0},
{'header': {'dev-index': 19, 'dev-name': 'enp58s0u1u1'},
'rx': 100,
'rx-max': 4096,
'tx-push': 0}]
And error reporting:
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--dump rings-get \
--json '{"header":{"flags":5}}'
Netlink error: Invalid argument
nl_len = 68 (52) nl_flags = 0x300 nl_type = 2
error: -22 extack: {'msg': 'reserved bit set',
'bad-attr-offs': 24,
'bad-attr': '.header.flags'}
None
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-31 10:33:52 +08:00
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: verify-enabled
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: verify-status
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: verify-time
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: max-verify-time
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: stats
|
|
|
|
type: nest
|
|
|
|
nested-attributes: mm-stat
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: linkinfo
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: port
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: phyaddr
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: tp-mdix
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: tp-mdix-ctrl
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: transceiver
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: linkmodes
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: autoneg
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: ours
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: peer
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: speed
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: duplex
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: master-slave-cfg
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: master-slave-state
|
|
|
|
type: u8
|
|
|
|
-
|
2023-06-06 07:32:57 +08:00
|
|
|
name: lanes
|
2023-03-30 06:16:53 +08:00
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rate-matching
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: linkstate
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: link
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: sqi
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: sqi-max
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: ext-state
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: ext-substate
|
|
|
|
type: u8
|
|
|
|
-
|
2023-06-06 07:32:57 +08:00
|
|
|
name: ext-down-cnt
|
2023-03-30 06:16:53 +08:00
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: debug
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: msgmask
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: wol
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: modes
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: sopass
|
|
|
|
type: binary
|
|
|
|
-
|
|
|
|
name: features
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: hw
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: wanted
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: active
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: nochange
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: channels
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: rx-max
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-max
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: other-max
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: combined-max
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rx-count
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-count
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: other-count
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: combined-count
|
|
|
|
type: u32
|
netlink: specs: add partial specification for ethtool
Ethtool is one of the most actively developed families.
With the changes to the CLI it should be possible to use
the YNL based code for easy prototyping and development.
Add a partial family definition. I've tested the string
set and rings. I don't have any MAC Merge implementation
to test with, but I added the definition for it, anyway,
because it's last. New commands can simply be added at
the end without having to worry about manually providing
IDs / values.
Set (with notification support - None is the response,
the data is from the notification):
$ sudo ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--do rings-set \
--json '{"header":{"dev-name":"enp0s31f6"}, "rx":129}' \
--subscribe monitor
None
[{'msg': {'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0},
'name': 'rings-ntf'}]
Do / dump (yes, the kernel requires that even for dump and even
if empty - the "header" nest must be there):
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--do rings-get \
--json '{"header":{"dev-index": 2}}'
{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0}
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--dump rings-get \
--json '{"header":{}}'
[{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0},
{'header': {'dev-index': 3, 'dev-name': 'wlp0s20f3'}, 'tx-push': 0},
{'header': {'dev-index': 19, 'dev-name': 'enp58s0u1u1'},
'rx': 100,
'rx-max': 4096,
'tx-push': 0}]
And error reporting:
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--dump rings-get \
--json '{"header":{"flags":5}}'
Netlink error: Invalid argument
nl_len = 68 (52) nl_flags = 0x300 nl_type = 2
error: -22 extack: {'msg': 'reserved bit set',
'bad-attr-offs': 24,
'bad-attr': '.header.flags'}
None
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-31 10:33:52 +08:00
|
|
|
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: coalesce
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: rx-usecs
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rx-max-frames
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rx-usecs-irq
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rx-max-frames-irq
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-usecs
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-max-frames
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-usecs-irq
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-max-frames-irq
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: stats-block-usecs
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: use-adaptive-rx
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: use-adaptive-tx
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: pkt-rate-low
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rx-usecs-low
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rx-max-frames-low
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-usecs-low
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-max-frames-low
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: pkt-rate-high
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rx-usecs-high
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rx-max-frames-high
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-usecs-high
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-max-frames-high
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: rate-sample-interval
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: use-cqe-mode-tx
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: use-cqe-mode-rx
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: tx-aggr-max-bytes
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-aggr-max-frames
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tx-aggr-time-usecs
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: pause-stat
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: pad
|
2023-06-10 05:43:44 +08:00
|
|
|
type: pad
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: tx-frames
|
|
|
|
type: u64
|
|
|
|
-
|
|
|
|
name: rx-frames
|
|
|
|
type: u64
|
|
|
|
-
|
|
|
|
name: pause
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: autoneg
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: rx
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: tx
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: stats
|
|
|
|
type: nest
|
|
|
|
nested-attributes: pause-stat
|
|
|
|
-
|
|
|
|
name: stats-src
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: eee
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: modes-ours
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: modes-peer
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: active
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: enabled
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: tx-lpi-enabled
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: tx-lpi-timer
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: tsinfo
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: timestamping
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: tx-types
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: rx-filters
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: phc-index
|
|
|
|
type: u32
|
|
|
|
-
|
2023-06-10 05:43:42 +08:00
|
|
|
name: cable-result
|
2023-03-30 06:16:53 +08:00
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: pair
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: code
|
|
|
|
type: u8
|
|
|
|
-
|
2023-06-10 05:43:42 +08:00
|
|
|
name: cable-fault-length
|
2023-03-30 06:16:53 +08:00
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: pair
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: cm
|
|
|
|
type: u32
|
|
|
|
-
|
2023-06-10 05:43:42 +08:00
|
|
|
name: cable-nest
|
2023-03-30 06:16:53 +08:00
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: result
|
|
|
|
type: nest
|
2023-06-10 05:43:42 +08:00
|
|
|
nested-attributes: cable-result
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: fault-length
|
|
|
|
type: nest
|
2023-06-10 05:43:42 +08:00
|
|
|
nested-attributes: cable-fault-length
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: cable-test
|
2023-06-10 05:43:42 +08:00
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: cable-test-ntf
|
2023-03-30 06:16:53 +08:00
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: status
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: nest
|
|
|
|
type: nest
|
2023-06-10 05:43:42 +08:00
|
|
|
nested-attributes: cable-nest
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: cable-test-tdr-cfg
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: first
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: last
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: step
|
|
|
|
type: u32
|
|
|
|
-
|
2023-06-10 05:43:42 +08:00
|
|
|
name: pair
|
2023-03-30 06:16:53 +08:00
|
|
|
type: u8
|
2023-06-10 05:43:42 +08:00
|
|
|
-
|
|
|
|
name: cable-test-tdr-ntf
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: status
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: nest
|
|
|
|
type: nest
|
|
|
|
nested-attributes: cable-nest
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: cable-test-tdr
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: cfg
|
|
|
|
type: nest
|
|
|
|
nested-attributes: cable-test-tdr-cfg
|
|
|
|
-
|
2023-06-10 05:43:42 +08:00
|
|
|
name: tunnel-udp-entry
|
2023-03-30 06:16:53 +08:00
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: port
|
|
|
|
type: u16
|
|
|
|
byte-order: big-endian
|
|
|
|
-
|
|
|
|
name: type
|
|
|
|
type: u32
|
|
|
|
enum: udp-tunnel-type
|
|
|
|
-
|
2023-06-10 05:43:42 +08:00
|
|
|
name: tunnel-udp-table
|
2023-03-30 06:16:53 +08:00
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: size
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: types
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
2023-06-10 05:43:42 +08:00
|
|
|
name: entry
|
2023-03-30 06:16:53 +08:00
|
|
|
type: nest
|
2023-06-10 05:43:42 +08:00
|
|
|
multi-attr: true
|
|
|
|
nested-attributes: tunnel-udp-entry
|
|
|
|
-
|
|
|
|
name: tunnel-udp
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: table
|
|
|
|
type: nest
|
|
|
|
nested-attributes: tunnel-udp-table
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: tunnel-info
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: udp-ports
|
|
|
|
type: nest
|
2023-06-10 05:43:42 +08:00
|
|
|
nested-attributes: tunnel-udp
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: fec-stat
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: pad
|
2023-06-10 05:43:44 +08:00
|
|
|
type: pad
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: corrected
|
2023-05-27 06:06:53 +08:00
|
|
|
type: binary
|
|
|
|
sub-type: u64
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: uncorr
|
2023-05-27 06:06:53 +08:00
|
|
|
type: binary
|
|
|
|
sub-type: u64
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: corr-bits
|
2023-05-27 06:06:53 +08:00
|
|
|
type: binary
|
|
|
|
sub-type: u64
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: fec
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: modes
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: auto
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: active
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: stats
|
|
|
|
type: nest
|
|
|
|
nested-attributes: fec-stat
|
|
|
|
-
|
|
|
|
name: module-eeprom
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: offset
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: length
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: page
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: bank
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: i2c-address
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: data
|
|
|
|
type: binary
|
|
|
|
-
|
|
|
|
name: stats-grp
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: pad
|
2023-06-10 05:43:44 +08:00
|
|
|
type: pad
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: id
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: ss-id
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: stat
|
2023-06-10 05:43:43 +08:00
|
|
|
type: u64
|
|
|
|
type-value: [ id ]
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: hist-rx
|
|
|
|
type: nest
|
2023-06-10 05:43:43 +08:00
|
|
|
nested-attributes: stats-grp-hist
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: hist-tx
|
|
|
|
type: nest
|
2023-06-10 05:43:43 +08:00
|
|
|
nested-attributes: stats-grp-hist
|
|
|
|
-
|
|
|
|
name: hist-bkt-low
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: hist-bkt-hi
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: hist-val
|
|
|
|
type: u64
|
|
|
|
-
|
|
|
|
name: stats-grp-hist
|
|
|
|
subset-of: stats-grp
|
|
|
|
attributes:
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: hist-bkt-low
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: hist-bkt-hi
|
|
|
|
type: u32
|
|
|
|
-
|
2023-06-06 07:32:57 +08:00
|
|
|
name: hist-val
|
2023-03-30 06:16:53 +08:00
|
|
|
type: u64
|
|
|
|
-
|
|
|
|
name: stats
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: pad
|
2023-06-10 05:43:44 +08:00
|
|
|
type: pad
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: groups
|
|
|
|
type: nest
|
|
|
|
nested-attributes: bitset
|
|
|
|
-
|
|
|
|
name: grp
|
|
|
|
type: nest
|
|
|
|
nested-attributes: stats-grp
|
|
|
|
-
|
|
|
|
name: src
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: phc-vclocks
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: num
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: index
|
2023-05-27 06:06:53 +08:00
|
|
|
type: binary
|
|
|
|
sub-type: s32
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: module
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: power-mode-policy
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: power-mode
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: pse
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: admin-state
|
|
|
|
type: u32
|
2023-06-10 05:43:38 +08:00
|
|
|
name-prefix: ethtool-a-podl-pse-
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: admin-control
|
|
|
|
type: u32
|
2023-06-10 05:43:38 +08:00
|
|
|
name-prefix: ethtool-a-podl-pse-
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: pw-d-status
|
|
|
|
type: u32
|
2023-06-10 05:43:38 +08:00
|
|
|
name-prefix: ethtool-a-podl-pse-
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: rss
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: context
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: hfunc
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: indir
|
|
|
|
type: binary
|
|
|
|
-
|
|
|
|
name: hkey
|
|
|
|
type: binary
|
|
|
|
-
|
|
|
|
name: plca
|
|
|
|
attributes:
|
|
|
|
-
|
|
|
|
name: header
|
|
|
|
type: nest
|
|
|
|
nested-attributes: header
|
|
|
|
-
|
|
|
|
name: version
|
|
|
|
type: u16
|
|
|
|
-
|
|
|
|
name: enabled
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: status
|
|
|
|
type: u8
|
|
|
|
-
|
|
|
|
name: node-cnt
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: node-id
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: to-tmr
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: burst-cnt
|
|
|
|
type: u32
|
|
|
|
-
|
|
|
|
name: burst-tmr
|
|
|
|
type: u32
|
|
|
|
|
|
|
|
operations:
|
|
|
|
enum-model: directional
|
2023-06-10 05:43:38 +08:00
|
|
|
name-prefix: ethtool-msg-
|
2023-03-30 06:16:53 +08:00
|
|
|
list:
|
|
|
|
-
|
|
|
|
name: strset-get
|
|
|
|
doc: Get string set from the kernel.
|
|
|
|
|
|
|
|
attribute-set: strset
|
|
|
|
|
|
|
|
do: &strset-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
- stringsets
|
|
|
|
- counts-only
|
|
|
|
reply:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
- stringsets
|
|
|
|
dump: *strset-get-op
|
|
|
|
-
|
|
|
|
name: linkinfo-get
|
|
|
|
doc: Get link info.
|
|
|
|
|
|
|
|
attribute-set: linkinfo
|
|
|
|
|
|
|
|
do: &linkinfo-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &linkinfo
|
|
|
|
- header
|
|
|
|
- port
|
|
|
|
- phyaddr
|
|
|
|
- tp-mdix
|
|
|
|
- tp-mdix-ctrl
|
|
|
|
- transceiver
|
|
|
|
dump: *linkinfo-get-op
|
|
|
|
-
|
|
|
|
name: linkinfo-set
|
|
|
|
doc: Set link info.
|
|
|
|
|
|
|
|
attribute-set: linkinfo
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes: *linkinfo
|
|
|
|
-
|
|
|
|
name: linkinfo-ntf
|
|
|
|
doc: Notification for change in link info.
|
|
|
|
notify: linkinfo-get
|
|
|
|
-
|
|
|
|
name: linkmodes-get
|
|
|
|
doc: Get link modes.
|
|
|
|
|
|
|
|
attribute-set: linkmodes
|
|
|
|
|
|
|
|
do: &linkmodes-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &linkmodes
|
|
|
|
- header
|
|
|
|
- autoneg
|
|
|
|
- ours
|
|
|
|
- peer
|
|
|
|
- speed
|
|
|
|
- duplex
|
|
|
|
- master-slave-cfg
|
|
|
|
- master-slave-state
|
2023-06-06 07:32:57 +08:00
|
|
|
- lanes
|
2023-03-30 06:16:53 +08:00
|
|
|
- rate-matching
|
|
|
|
dump: *linkmodes-get-op
|
|
|
|
-
|
|
|
|
name: linkmodes-set
|
|
|
|
doc: Set link modes.
|
|
|
|
|
|
|
|
attribute-set: linkmodes
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes: *linkmodes
|
|
|
|
-
|
|
|
|
name: linkmodes-ntf
|
|
|
|
doc: Notification for change in link modes.
|
|
|
|
notify: linkmodes-get
|
|
|
|
-
|
|
|
|
name: linkstate-get
|
|
|
|
doc: Get link state.
|
|
|
|
|
|
|
|
attribute-set: linkstate
|
|
|
|
|
|
|
|
do: &linkstate-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
- link
|
|
|
|
- sqi
|
|
|
|
- sqi-max
|
|
|
|
- ext-state
|
|
|
|
- ext-substate
|
2023-06-06 07:32:57 +08:00
|
|
|
- ext-down-cnt
|
2023-03-30 06:16:53 +08:00
|
|
|
dump: *linkstate-get-op
|
|
|
|
-
|
|
|
|
name: debug-get
|
|
|
|
doc: Get debug message mask.
|
|
|
|
|
|
|
|
attribute-set: debug
|
|
|
|
|
|
|
|
do: &debug-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &debug
|
|
|
|
- header
|
|
|
|
- msgmask
|
|
|
|
dump: *debug-get-op
|
|
|
|
-
|
|
|
|
name: debug-set
|
|
|
|
doc: Set debug message mask.
|
|
|
|
|
|
|
|
attribute-set: debug
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes: *debug
|
|
|
|
-
|
|
|
|
name: debug-ntf
|
|
|
|
doc: Notification for change in debug message mask.
|
|
|
|
notify: debug-get
|
|
|
|
-
|
|
|
|
name: wol-get
|
|
|
|
doc: Get WOL params.
|
|
|
|
|
|
|
|
attribute-set: wol
|
|
|
|
|
|
|
|
do: &wol-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &wol
|
|
|
|
- header
|
|
|
|
- modes
|
|
|
|
- sopass
|
|
|
|
dump: *wol-get-op
|
|
|
|
-
|
|
|
|
name: wol-set
|
|
|
|
doc: Set WOL params.
|
|
|
|
|
|
|
|
attribute-set: wol
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes: *wol
|
|
|
|
-
|
|
|
|
name: wol-ntf
|
|
|
|
doc: Notification for change in WOL params.
|
|
|
|
notify: wol-get
|
|
|
|
-
|
|
|
|
name: features-get
|
|
|
|
doc: Get features.
|
|
|
|
|
|
|
|
attribute-set: features
|
|
|
|
|
|
|
|
do: &feature-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &feature
|
|
|
|
- header
|
|
|
|
# User-changeable features.
|
|
|
|
- hw
|
|
|
|
# User-requested features.
|
|
|
|
- wanted
|
|
|
|
# Currently active features.
|
|
|
|
- active
|
|
|
|
# Unchangeable features.
|
|
|
|
- nochange
|
|
|
|
dump: *feature-get-op
|
|
|
|
-
|
|
|
|
name: features-set
|
|
|
|
doc: Set features.
|
|
|
|
|
|
|
|
attribute-set: features
|
|
|
|
|
|
|
|
do: &feature-set-op
|
|
|
|
request:
|
|
|
|
attributes: *feature
|
|
|
|
reply:
|
|
|
|
attributes: *feature
|
|
|
|
-
|
|
|
|
name: features-ntf
|
|
|
|
doc: Notification for change in features.
|
|
|
|
notify: features-get
|
|
|
|
-
|
|
|
|
name: privflags-get
|
|
|
|
doc: Get device private flags.
|
|
|
|
|
|
|
|
attribute-set: privflags
|
|
|
|
|
|
|
|
do: &privflag-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &privflag
|
|
|
|
- header
|
|
|
|
- flags
|
|
|
|
dump: *privflag-get-op
|
|
|
|
-
|
|
|
|
name: privflags-set
|
|
|
|
doc: Set device private flags.
|
|
|
|
|
|
|
|
attribute-set: privflags
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes: *privflag
|
|
|
|
-
|
|
|
|
name: privflags-ntf
|
|
|
|
doc: Notification for change in device private flags.
|
|
|
|
notify: privflags-get
|
|
|
|
|
|
|
|
-
|
|
|
|
name: rings-get
|
|
|
|
doc: Get ring params.
|
|
|
|
|
|
|
|
attribute-set: rings
|
|
|
|
|
|
|
|
do: &ring-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &ring
|
|
|
|
- header
|
|
|
|
- rx-max
|
|
|
|
- rx-mini-max
|
|
|
|
- rx-jumbo-max
|
|
|
|
- tx-max
|
|
|
|
- rx
|
|
|
|
- rx-mini
|
|
|
|
- rx-jumbo
|
|
|
|
- tx
|
|
|
|
- rx-buf-len
|
|
|
|
- tcp-data-split
|
|
|
|
- cqe-size
|
|
|
|
- tx-push
|
|
|
|
- rx-push
|
|
|
|
- tx-push-buf-len
|
|
|
|
- tx-push-buf-len-max
|
|
|
|
dump: *ring-get-op
|
|
|
|
-
|
|
|
|
name: rings-set
|
|
|
|
doc: Set ring params.
|
|
|
|
|
|
|
|
attribute-set: rings
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes: *ring
|
|
|
|
-
|
|
|
|
name: rings-ntf
|
|
|
|
doc: Notification for change in ring params.
|
|
|
|
notify: rings-get
|
|
|
|
-
|
|
|
|
name: channels-get
|
|
|
|
doc: Get channel params.
|
|
|
|
|
|
|
|
attribute-set: channels
|
|
|
|
|
|
|
|
do: &channel-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &channel
|
|
|
|
- header
|
|
|
|
- rx-max
|
|
|
|
- tx-max
|
|
|
|
- other-max
|
|
|
|
- combined-max
|
|
|
|
- rx-count
|
|
|
|
- tx-count
|
|
|
|
- other-count
|
|
|
|
- combined-count
|
|
|
|
dump: *channel-get-op
|
|
|
|
-
|
|
|
|
name: channels-set
|
|
|
|
doc: Set channel params.
|
|
|
|
|
|
|
|
attribute-set: channels
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes: *channel
|
|
|
|
-
|
|
|
|
name: channels-ntf
|
|
|
|
doc: Notification for change in channel params.
|
|
|
|
notify: channels-get
|
|
|
|
-
|
|
|
|
name: coalesce-get
|
|
|
|
doc: Get coalesce params.
|
|
|
|
|
|
|
|
attribute-set: coalesce
|
|
|
|
|
|
|
|
do: &coalesce-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &coalesce
|
|
|
|
- header
|
|
|
|
- rx-usecs
|
|
|
|
- rx-max-frames
|
|
|
|
- rx-usecs-irq
|
|
|
|
- rx-max-frames-irq
|
|
|
|
- tx-usecs
|
|
|
|
- tx-max-frames
|
|
|
|
- tx-usecs-irq
|
|
|
|
- tx-max-frames-irq
|
|
|
|
- stats-block-usecs
|
|
|
|
- use-adaptive-rx
|
|
|
|
- use-adaptive-tx
|
|
|
|
- pkt-rate-low
|
|
|
|
- rx-usecs-low
|
|
|
|
- rx-max-frames-low
|
|
|
|
- tx-usecs-low
|
|
|
|
- tx-max-frames-low
|
|
|
|
- pkt-rate-high
|
|
|
|
- rx-usecs-high
|
|
|
|
- rx-max-frames-high
|
|
|
|
- tx-usecs-high
|
|
|
|
- tx-max-frames-high
|
|
|
|
- rate-sample-interval
|
|
|
|
- use-cqe-mode-tx
|
|
|
|
- use-cqe-mode-rx
|
|
|
|
- tx-aggr-max-bytes
|
|
|
|
- tx-aggr-max-frames
|
|
|
|
- tx-aggr-time-usecs
|
|
|
|
dump: *coalesce-get-op
|
|
|
|
-
|
|
|
|
name: coalesce-set
|
|
|
|
doc: Set coalesce params.
|
|
|
|
|
|
|
|
attribute-set: coalesce
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes: *coalesce
|
|
|
|
-
|
|
|
|
name: coalesce-ntf
|
|
|
|
doc: Notification for change in coalesce params.
|
|
|
|
notify: coalesce-get
|
|
|
|
-
|
|
|
|
name: pause-get
|
|
|
|
doc: Get pause params.
|
|
|
|
|
|
|
|
attribute-set: pause
|
|
|
|
|
|
|
|
do: &pause-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &pause
|
|
|
|
- header
|
|
|
|
- autoneg
|
|
|
|
- rx
|
|
|
|
- tx
|
|
|
|
- stats
|
|
|
|
- stats-src
|
|
|
|
dump: *pause-get-op
|
|
|
|
-
|
|
|
|
name: pause-set
|
|
|
|
doc: Set pause params.
|
|
|
|
|
|
|
|
attribute-set: pause
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes: *pause
|
|
|
|
-
|
|
|
|
name: pause-ntf
|
|
|
|
doc: Notification for change in pause params.
|
|
|
|
notify: pause-get
|
|
|
|
-
|
|
|
|
name: eee-get
|
|
|
|
doc: Get eee params.
|
|
|
|
|
|
|
|
attribute-set: eee
|
|
|
|
|
|
|
|
do: &eee-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &eee
|
|
|
|
- header
|
|
|
|
- modes-ours
|
|
|
|
- modes-peer
|
|
|
|
- active
|
|
|
|
- enabled
|
|
|
|
- tx-lpi-enabled
|
|
|
|
- tx-lpi-timer
|
|
|
|
dump: *eee-get-op
|
|
|
|
-
|
|
|
|
name: eee-set
|
|
|
|
doc: Set eee params.
|
|
|
|
|
|
|
|
attribute-set: eee
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes: *eee
|
|
|
|
-
|
|
|
|
name: eee-ntf
|
|
|
|
doc: Notification for change in eee params.
|
|
|
|
notify: eee-get
|
|
|
|
-
|
|
|
|
name: tsinfo-get
|
|
|
|
doc: Get tsinfo params.
|
|
|
|
|
|
|
|
attribute-set: tsinfo
|
|
|
|
|
|
|
|
do: &tsinfo-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
- timestamping
|
|
|
|
- tx-types
|
|
|
|
- rx-filters
|
|
|
|
- phc-index
|
|
|
|
dump: *tsinfo-get-op
|
|
|
|
-
|
|
|
|
name: cable-test-act
|
|
|
|
doc: Cable test.
|
|
|
|
|
|
|
|
attribute-set: cable-test
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
2023-06-10 05:43:42 +08:00
|
|
|
-
|
|
|
|
name: cable-test-ntf
|
|
|
|
doc: Cable test notification.
|
|
|
|
|
|
|
|
attribute-set: cable-test-ntf
|
|
|
|
|
|
|
|
event:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
- status
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: cable-test-tdr-act
|
|
|
|
doc: Cable test TDR.
|
|
|
|
|
|
|
|
attribute-set: cable-test-tdr
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
2023-06-10 05:43:42 +08:00
|
|
|
-
|
|
|
|
name: cable-test-tdr-ntf
|
|
|
|
doc: Cable test TDR notification.
|
|
|
|
|
|
|
|
attribute-set: cable-test-tdr-ntf
|
|
|
|
|
|
|
|
event:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
- status
|
|
|
|
- nest
|
2023-03-30 06:16:53 +08:00
|
|
|
-
|
|
|
|
name: tunnel-info-get
|
|
|
|
doc: Get tsinfo params.
|
|
|
|
|
|
|
|
attribute-set: tunnel-info
|
|
|
|
|
|
|
|
do: &tunnel-info-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
- udp-ports
|
|
|
|
dump: *tunnel-info-get-op
|
|
|
|
-
|
|
|
|
name: fec-get
|
|
|
|
doc: Get FEC params.
|
|
|
|
|
|
|
|
attribute-set: fec
|
|
|
|
|
|
|
|
do: &fec-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &fec
|
|
|
|
- header
|
|
|
|
- modes
|
|
|
|
- auto
|
|
|
|
- active
|
|
|
|
- stats
|
|
|
|
dump: *fec-get-op
|
|
|
|
-
|
|
|
|
name: fec-set
|
|
|
|
doc: Set FEC params.
|
|
|
|
|
|
|
|
attribute-set: fec
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes: *fec
|
|
|
|
-
|
|
|
|
name: fec-ntf
|
|
|
|
doc: Notification for change in FEC params.
|
|
|
|
notify: fec-get
|
|
|
|
-
|
|
|
|
name: module-eeprom-get
|
|
|
|
doc: Get module EEPROM params.
|
|
|
|
|
|
|
|
attribute-set: module-eeprom
|
|
|
|
|
|
|
|
do: &module-eeprom-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
- offset
|
|
|
|
- length
|
|
|
|
- page
|
|
|
|
- bank
|
|
|
|
- i2c-address
|
|
|
|
- data
|
|
|
|
dump: *module-eeprom-get-op
|
|
|
|
-
|
|
|
|
name: stats-get
|
|
|
|
doc: Get statistics.
|
|
|
|
|
|
|
|
attribute-set: stats
|
|
|
|
|
|
|
|
do: &stats-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
- groups
|
|
|
|
reply:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
- groups
|
|
|
|
- grp
|
|
|
|
- src
|
|
|
|
dump: *stats-get-op
|
|
|
|
-
|
|
|
|
name: phc-vclocks-get
|
|
|
|
doc: Get PHC VCLOCKs.
|
|
|
|
|
|
|
|
attribute-set: phc-vclocks
|
|
|
|
|
|
|
|
do: &phc-vclocks-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
- num
|
|
|
|
dump: *phc-vclocks-get-op
|
|
|
|
-
|
|
|
|
name: module-get
|
|
|
|
doc: Get module params.
|
|
|
|
|
|
|
|
attribute-set: module
|
|
|
|
|
|
|
|
do: &module-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &module
|
|
|
|
- header
|
|
|
|
- power-mode-policy
|
|
|
|
- power-mode
|
|
|
|
dump: *module-get-op
|
|
|
|
-
|
|
|
|
name: module-set
|
|
|
|
doc: Set module params.
|
|
|
|
|
|
|
|
attribute-set: module
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes: *module
|
|
|
|
-
|
|
|
|
name: module-ntf
|
|
|
|
doc: Notification for change in module params.
|
|
|
|
notify: module-get
|
|
|
|
-
|
|
|
|
name: pse-get
|
|
|
|
doc: Get Power Sourcing Equipment params.
|
|
|
|
|
|
|
|
attribute-set: pse
|
|
|
|
|
|
|
|
do: &pse-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &pse
|
|
|
|
- header
|
|
|
|
- admin-state
|
|
|
|
- admin-control
|
|
|
|
- pw-d-status
|
|
|
|
dump: *pse-get-op
|
|
|
|
-
|
|
|
|
name: pse-set
|
|
|
|
doc: Set Power Sourcing Equipment params.
|
|
|
|
|
|
|
|
attribute-set: pse
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes: *pse
|
|
|
|
-
|
|
|
|
name: rss-get
|
|
|
|
doc: Get RSS params.
|
|
|
|
|
|
|
|
attribute-set: rss
|
|
|
|
|
|
|
|
do: &rss-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
- context
|
|
|
|
- hfunc
|
|
|
|
- indir
|
|
|
|
- hkey
|
|
|
|
dump: *rss-get-op
|
|
|
|
-
|
2023-06-06 07:32:57 +08:00
|
|
|
name: plca-get-cfg
|
2023-03-30 06:16:53 +08:00
|
|
|
doc: Get PLCA params.
|
|
|
|
|
|
|
|
attribute-set: plca
|
|
|
|
|
|
|
|
do: &plca-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: &plca
|
|
|
|
- header
|
|
|
|
- version
|
|
|
|
- enabled
|
|
|
|
- status
|
|
|
|
- node-cnt
|
|
|
|
- node-id
|
|
|
|
- to-tmr
|
|
|
|
- burst-cnt
|
|
|
|
- burst-tmr
|
|
|
|
dump: *plca-get-op
|
|
|
|
-
|
2023-06-06 07:32:57 +08:00
|
|
|
name: plca-set-cfg
|
2023-03-30 06:16:53 +08:00
|
|
|
doc: Set PLCA params.
|
|
|
|
|
|
|
|
attribute-set: plca
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes: *plca
|
|
|
|
-
|
|
|
|
name: plca-get-status
|
|
|
|
doc: Get PLCA status params.
|
|
|
|
|
|
|
|
attribute-set: plca
|
|
|
|
|
|
|
|
do: &plca-get-status-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes: *plca
|
|
|
|
dump: *plca-get-status-op
|
|
|
|
-
|
|
|
|
name: plca-ntf
|
|
|
|
doc: Notification for change in PLCA params.
|
2023-06-06 07:32:57 +08:00
|
|
|
notify: plca-get-cfg
|
netlink: specs: add partial specification for ethtool
Ethtool is one of the most actively developed families.
With the changes to the CLI it should be possible to use
the YNL based code for easy prototyping and development.
Add a partial family definition. I've tested the string
set and rings. I don't have any MAC Merge implementation
to test with, but I added the definition for it, anyway,
because it's last. New commands can simply be added at
the end without having to worry about manually providing
IDs / values.
Set (with notification support - None is the response,
the data is from the notification):
$ sudo ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--do rings-set \
--json '{"header":{"dev-name":"enp0s31f6"}, "rx":129}' \
--subscribe monitor
None
[{'msg': {'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0},
'name': 'rings-ntf'}]
Do / dump (yes, the kernel requires that even for dump and even
if empty - the "header" nest must be there):
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--do rings-get \
--json '{"header":{"dev-index": 2}}'
{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0}
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--dump rings-get \
--json '{"header":{}}'
[{'header': {'dev-index': 2, 'dev-name': 'enp0s31f6'},
'rx': 136,
'rx-max': 4096,
'tx': 256,
'tx-max': 4096,
'tx-push': 0},
{'header': {'dev-index': 3, 'dev-name': 'wlp0s20f3'}, 'tx-push': 0},
{'header': {'dev-index': 19, 'dev-name': 'enp58s0u1u1'},
'rx': 100,
'rx-max': 4096,
'tx-push': 0}]
And error reporting:
$ ./tools/net/ynl/cli.py \
--spec Documentation/netlink/specs/ethtool.yaml \
--dump rings-get \
--json '{"header":{"flags":5}}'
Netlink error: Invalid argument
nl_len = 68 (52) nl_flags = 0x300 nl_type = 2
error: -22 extack: {'msg': 'reserved bit set',
'bad-attr-offs': 24,
'bad-attr': '.header.flags'}
None
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-31 10:33:52 +08:00
|
|
|
-
|
|
|
|
name: mm-get
|
|
|
|
doc: Get MAC Merge configuration and state
|
|
|
|
|
|
|
|
attribute-set: mm
|
|
|
|
|
|
|
|
do: &mm-get-op
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
reply:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
- pmac-enabled
|
|
|
|
- tx-enabled
|
|
|
|
- tx-active
|
|
|
|
- tx-min-frag-size
|
|
|
|
- rx-min-frag-size
|
|
|
|
- verify-enabled
|
|
|
|
- verify-time
|
|
|
|
- max-verify-time
|
|
|
|
- stats
|
|
|
|
dump: *mm-get-op
|
|
|
|
-
|
|
|
|
name: mm-set
|
|
|
|
doc: Set MAC Merge configuration
|
|
|
|
|
|
|
|
attribute-set: mm
|
|
|
|
|
|
|
|
do:
|
|
|
|
request:
|
|
|
|
attributes:
|
|
|
|
- header
|
|
|
|
- verify-enabled
|
|
|
|
- verify-time
|
|
|
|
- tx-enabled
|
|
|
|
- pmac-enabled
|
|
|
|
- tx-min-frag-size
|
|
|
|
-
|
|
|
|
name: mm-ntf
|
|
|
|
doc: Notification for change in MAC Merge configuration.
|
|
|
|
notify: mm-get
|