Add features to ynl for tc and update the tc spec to use them. Patch 1 adds an option to output json instead of python pretty printing. Patch 2 adds support for sub-messages in nested attribute spaces that reference keys from a parent space. Patches 3 and 6-8 refactor ynl in support of nested struct definitions Patch 4 implements sub-message encoding for write ops. Patch 5 adds logic to set default zero values for binary blobs Patches 9, 10 adds support and docs for nested struct definitions Patch 11 updates the ynl doc generator to include type information for struct members. Patch 12 updates the tc spec - still a work in progress but more complete Donald Hunter (12): tools/net/ynl: Add --output-json arg to ynl cli tools/net/ynl: Support sub-messages in nested attribute spaces tools/net/ynl: Refactor fixed header encoding into separate method tools/net/ynl: Add support for encoding sub-messages tools/net/ynl: Encode default values for binary blobs tools/net/ynl: Combine struct decoding logic in ynl tools/net/ynl: Rename _fixed_header_size() to _struct_size() tools/net/ynl: Move formatted_string method out of NlAttr tools/net/ynl: Add support for nested structs doc/netlink: Describe nested structs in netlink raw docs tools/net/ynl: Add type info to struct members in generated docs doc/netlink/specs: Update the tc spec Documentation/netlink/netlink-raw.yaml | 15 +- Documentation/netlink/specs/tc.yaml | 2218 +++++++++++++++-- .../userspace-api/netlink/netlink-raw.rst | 34 + tools/net/ynl/cli.py | 22 +- tools/net/ynl/lib/nlspec.py | 2 + tools/net/ynl/lib/ynl.py | 174 +- tools/net/ynl/ynl-gen-rst.py | 10 +- 7 files changed, 2241 insertions(+), 234 deletions(-) -- 2.42.0