Improve the Netlink policy support in YNL. This series grew out of improvements to policy checking, when writing selftests I realized that instead of doing all the policy parsing in the test we're better off making it part of YNL itself.
Patch 1 adds pad handling, apparently we never hit pad with commonly used families. nlctrl policy dumps use pad more frequently. Patch 2 is a trivial refactor. Patch 3 pays off some technical debt in terms of documentation. The YnlFamily class is growing in size and it's quite hard to find its members. So document it a little bit. Patch 4 is the main dish, the implementation of get_policy(op) in YnlFamily. Patch 5 plugs the new functionality into the CLI. Jakub Kicinski (5): tools: ynl: handle pad type during decode tools: ynl: move policy decoding out of NlMsg tools: ynl: add short doc to class YnlFamily tools: ynl: add Python API for easier access to policies tools: ynl: cli: add --policy support tools/net/ynl/pyynl/cli.py | 12 ++ tools/net/ynl/pyynl/lib/__init__.py | 5 +- tools/net/ynl/pyynl/lib/ynl.py | 216 +++++++++++++++++++--- tools/testing/selftests/net/lib/py/ynl.py | 6 +- 4 files changed, 208 insertions(+), 31 deletions(-) -- 2.53.0
