| 60411ade | 11-Jan-2026 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: cli: print reply in combined format if possible
As pointed out during review of the --list-attrs support the GET ops very often return the same attrs from do and dump. Make the output mo
tools: ynl: cli: print reply in combined format if possible
As pointed out during review of the --list-attrs support the GET ops very often return the same attrs from do and dump. Make the output more readable by combining the reply information, from:
Do request attributes: - ifindex: u32 netdev ifindex
Do reply attributes: - ifindex: u32 netdev ifindex [ .. other attrs .. ]
Dump reply attributes: - ifindex: u32 netdev ifindex [ .. other attrs .. ]
To, after:
Do request attributes: - ifindex: u32 netdev ifindex
Do and Dump reply attributes: - ifindex: u32 netdev ifindex [ .. other attrs .. ]
Tested-by: Gal Pressman <gal@nvidia.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260110233142.3921386-8-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 6ccc421b | 11-Jan-2026 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: cli: extract the event/notify handling in --list-attrs
Event and notify handling is quite different from do / dump handling. Forcing it into print_mode_attrs() doesn't really buy us anyt
tools: ynl: cli: extract the event/notify handling in --list-attrs
Event and notify handling is quite different from do / dump handling. Forcing it into print_mode_attrs() doesn't really buy us anything as events and notifications do not have requests. Call print_attr_list() directly. Apart form subjective code clarity this also removes the word "reply" from the output:
Before:
Event reply attributes:
Now:
Event attributes:
Tested-by: Gal Pressman <gal@nvidia.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260110233142.3921386-7-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 45b99bb4 | 11-Jan-2026 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: cli: factor out --list-attrs / --doc handling
We'll soon add more code to the --doc handling. Factor it out to avoid making main() too long.
Tested-by: Gal Pressman <gal@nvidia.com> Ack
tools: ynl: cli: factor out --list-attrs / --doc handling
We'll soon add more code to the --doc handling. Factor it out to avoid making main() too long.
Tested-by: Gal Pressman <gal@nvidia.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260110233142.3921386-6-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| aca1fe23 | 11-Jan-2026 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: cli: add --doc as alias to --list-attrs
--list-attrs also provides information about the operation itself. So --doc seems more appropriate. Add an alias.
Tested-by: Gal Pressman <gal@nv
tools: ynl: cli: add --doc as alias to --list-attrs
--list-attrs also provides information about the operation itself. So --doc seems more appropriate. Add an alias.
Tested-by: Gal Pressman <gal@nvidia.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260110233142.3921386-5-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 1b7fbf62 | 11-Jan-2026 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: cli: improve --help
Improve the clarity of --help. Reorder, provide some grouping and add help messages to most of the options.
No functional changes intended.
Tested-by: Gal Pressman
tools: ynl: cli: improve --help
Improve the clarity of --help. Reorder, provide some grouping and add help messages to most of the options.
No functional changes intended.
Tested-by: Gal Pressman <gal@nvidia.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260110233142.3921386-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 101a7d57 | 11-Jan-2026 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: cli: wrap the doc text if it's long
We already use textwrap when printing "doc" section about an attribute, but only to indent the text. Switch to using fill() to split and indent all th
tools: ynl: cli: wrap the doc text if it's long
We already use textwrap when printing "doc" section about an attribute, but only to indent the text. Switch to using fill() to split and indent all the lines. While at it indent the text by 2 more spaces, so that it doesn't align with the name of the attribute.
Before (I'm drawing a "box" at ~60 cols here, in an attempt for clarity):
| - irq-suspend-timeout: uint | | The timeout, in nanoseconds, of how long to suspend irq| |processing, if event polling finds events |
After:
| - irq-suspend-timeout: uint | | The timeout, in nanoseconds, of how long to suspend | | irq processing, if event polling finds events |
Tested-by: Gal Pressman <gal@nvidia.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260110233142.3921386-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 1ecc8ae8 | 08-Jan-2026 |
Donald Hunter <donald.hunter@gmail.com> |
tools: ynl-gen-c: Fix remaining pylint warnings
Fix the following pylint warning instances:
ynl_gen_c.py:575:15: E0606: Possibly using variable 'mem' before assignment (possibly-used-before-assignm
tools: ynl-gen-c: Fix remaining pylint warnings
Fix the following pylint warning instances:
ynl_gen_c.py:575:15: E0606: Possibly using variable 'mem' before assignment (possibly-used-before-assignment)
ynl_gen_c.py:888:0: R1707: Disallow trailing comma tuple (trailing-comma-tuple)
ynl_gen_c.py:944:21: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
ynl_gen_c.py:1450:14: C1802: Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len)
ynl_gen_c.py:1688:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
ynl_gen_c.py:3446:0: C0325: Unnecessary parens after '=' keyword (superfluous-parens)
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260108161339.29166-14-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| a587f592 | 08-Jan-2026 |
Donald Hunter <donald.hunter@gmail.com> |
tools: ynl-gen-c: fix pylint None, type, dict, generators, init
Fix the following pylint warnings that are trivial one-liners:
- unsubscriptable-object - unidiomatic-typecheck - use-dict-literal -
tools: ynl-gen-c: fix pylint None, type, dict, generators, init
Fix the following pylint warnings that are trivial one-liners:
- unsubscriptable-object - unidiomatic-typecheck - use-dict-literal - attribute-defined-outside-init - consider-using-in - consider-using-generator
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260108161339.29166-13-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 93ef8429 | 08-Jan-2026 |
Donald Hunter <donald.hunter@gmail.com> |
tools: ynl-gen-c: fix pylint warnings for returns, unused, redefined
Fix the following pylint warnings:
- unused-argument - unused-variable - no-else-return - inconsistent-return-statements - redef
tools: ynl-gen-c: fix pylint warnings for returns, unused, redefined
Fix the following pylint warnings:
- unused-argument - unused-variable - no-else-return - inconsistent-return-statements - redefined-outer-name - unreachable
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260108161339.29166-12-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| c2fa97c5 | 08-Jan-2026 |
Donald Hunter <donald.hunter@gmail.com> |
tools: ynl-gen-c: suppress unhelpful pylint messages
Disable pylint messages for too-many-*, too-few-*, docstrings, broad-exception-* and messages for specific code that won't get changed.
Signed-o
tools: ynl-gen-c: suppress unhelpful pylint messages
Disable pylint messages for too-many-*, too-few-*, docstrings, broad-exception-* and messages for specific code that won't get changed.
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260108161339.29166-11-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 9a130471 | 08-Jan-2026 |
Donald Hunter <donald.hunter@gmail.com> |
tools: ynl: fix pylint issues in ynl_gen_rst
Add a couple of pylint suppressions to ynl_gen_rst.py:
- no-name-in-module,wrong-import-position - broad-exception-caught
Signed-off-by: Donald Hunter
tools: ynl: fix pylint issues in ynl_gen_rst
Add a couple of pylint suppressions to ynl_gen_rst.py:
- no-name-in-module,wrong-import-position - broad-exception-caught
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260108161339.29166-10-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 301da4cf | 08-Jan-2026 |
Donald Hunter <donald.hunter@gmail.com> |
tools: ynl: ethtool: fix pylint issues
Fix or suppress all the pylint issues in ethtool.py, except for TODO (fixme) items.
Suppress:
- too-many-locals - too-many-branches - too-many-statements - t
tools: ynl: ethtool: fix pylint issues
Fix or suppress all the pylint issues in ethtool.py, except for TODO (fixme) items.
Suppress:
- too-many-locals - too-many-branches - too-many-statements - too-many-return-statements - import-error
Fix:
- missing-module-docstring - redefined-outer-name - dangerous-default-value - use-dict-literal - missing-function-docstring - global-variable-undefined - expression-not-assigned - inconsistent-return-statements - wrong-import-order
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260108161339.29166-9-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 9b6b016d | 08-Jan-2026 |
Donald Hunter <donald.hunter@gmail.com> |
tools: ynl: fix logic errors reported by pylint
Fix the following logic errors:
tools/net/ynl/pyynl/lib/nlspec.py:299:15: E1101: Instance of 'list' has no 'items' member (no-member)
tools/net/ynl/
tools: ynl: fix logic errors reported by pylint
Fix the following logic errors:
tools/net/ynl/pyynl/lib/nlspec.py:299:15: E1101: Instance of 'list' has no 'items' member (no-member)
tools/net/ynl/pyynl/lib/nlspec.py:580:22: E0606: Possibly using variable 'op' before assignment (possibly-used-before-assignment)
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260108161339.29166-8-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 00ef9f15 | 08-Jan-2026 |
Donald Hunter <donald.hunter@gmail.com> |
tools: ynl: fix pylint global variable related warnings
Refactor to avoid using global variables to fix the following pylint issues:
- invalid-name - global-statement - global-variable-not-assigned
tools: ynl: fix pylint global variable related warnings
Refactor to avoid using global variables to fix the following pylint issues:
- invalid-name - global-statement - global-variable-not-assigned
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260108161339.29166-7-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 542ba2de | 08-Jan-2026 |
Donald Hunter <donald.hunter@gmail.com> |
tools: ynl: fix pylint misc warnings
Fix pylint warnings for:
- unused-argument - consider-using-in - consider-using-get - consider-using-f-string - protected-access - unidiomatic-typecheck - no-el
tools: ynl: fix pylint misc warnings
Fix pylint warnings for:
- unused-argument - consider-using-in - consider-using-get - consider-using-f-string - protected-access - unidiomatic-typecheck - no-else-return
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260108161339.29166-6-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 04b0b64e | 08-Jan-2026 |
Donald Hunter <donald.hunter@gmail.com> |
tools: ynl: fix pylint dict, indentation, long lines, uninitialised
Fix pylint warnings for:
- use-dict-literal - bad-indentation - line-too-long - possibly-used-before-assignment
Signed-off-by: D
tools: ynl: fix pylint dict, indentation, long lines, uninitialised
Fix pylint warnings for:
- use-dict-literal - bad-indentation - line-too-long - possibly-used-before-assignment
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260108161339.29166-5-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| b6270a10 | 08-Jan-2026 |
Donald Hunter <donald.hunter@gmail.com> |
tools: ynl: fix pylint exception warnings
Fix pylint warnings for:
- broad-exception-raised - broad-exception-caught - raise-missing-from
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Lin
tools: ynl: fix pylint exception warnings
Fix pylint warnings for:
- broad-exception-raised - broad-exception-caught - raise-missing-from
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260108161339.29166-4-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| bcdd8ea7 | 08-Jan-2026 |
Donald Hunter <donald.hunter@gmail.com> |
tools: ynl: fix pylint redefinition, encoding errors
Fix pylint warnings for:
- invalid-name - arguments-renamed - redefined-outer-name - unspecified-encoding - consider-using-sys-exit
Signed-off-
tools: ynl: fix pylint redefinition, encoding errors
Fix pylint warnings for:
- invalid-name - arguments-renamed - redefined-outer-name - unspecified-encoding - consider-using-sys-exit
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20260108161339.29166-3-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|