diff options
| author | Jakub Kicinski <[email protected]> | 2025-05-15 23:16:48 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-05-16 23:32:06 +0000 |
| commit | 0939a418b3b092aa8a97a59752084896e4a7c813 (patch) | |
| tree | 2857d5de4c531837c244a7000903e5d3472d2bd4 /tools/testing/selftests/drivers/net/lib/py/env.py | |
| parent | tools: ynl-gen: submsg: support parsing and rendering sub-messages (diff) | |
| download | kernel-0939a418b3b092aa8a97a59752084896e4a7c813.tar.gz kernel-0939a418b3b092aa8a97a59752084896e4a7c813.zip | |
tools: ynl: submsg: reverse parse / error reporting
Reverse parsing lets YNL convert bad and missing attr pointers
from extack into a string like "missing attribute nest1.nest2.attr_name".
It's a feature that's unique to YNL C AFAIU (even the Python YNL
can't do nested reverse parsing). Add support for reverse-parsing
of sub-messages.
To simplify the logic and the code annotate the type policies
with extra metadata. Mark the selectors and the messages with
the information we need. We assume that key / selector always
precedes the sub-message while parsing (and also if there are
multiple sub-messages like in rt-link they are interleaved
selector 1 ... submsg 1 ... selector 2 .. submsg 2, not
selector 1 ... selector 2 ... submsg 1 ... submsg 2).
The rt-link sample in a subsequent changes shows reverse parsing
of sub-messages in action.
Reviewed-by: Donald Hunter <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/drivers/net/lib/py/env.py')
0 files changed, 0 insertions, 0 deletions
