Skip to content

tools: ynl: policy query support

Jakub Kicinski linux-kselftest netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 3 repliesApplied 5/5

Patches in v1 All 5 applied

#Subject and filesSizeRepliesApplied
1/5tools: ynl: handle pad type during decodetools/net/ynl/pyynl/lib/ynl.py+3 -10 repliesApplied
2/5tools: ynl: move policy decoding out of NlMsgtools/net/ynl/pyynl/lib/ynl.py+28 -250 repliesApplied
3/5tools: ynl: add short doc to class YnlFamilytools/net/ynl/pyynl/lib/ynl.py+26 -00 repliesApplied
4/5tools: ynl: add Python API for easier access to policiestools/net/ynl/pyynl/lib/__init__.py tools/net/ynl/pyynl/lib/ynl.py tools/testing/selftests/net/lib/py/ynl.py+139 -50 repliesApplied
5/5tools: ynl: cli: add --policy supporttools/net/ynl/pyynl/cli.py+12 -00 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/5] tools: ynl: policy query support

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(-)
Signature · 1 line
2.53.0