summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/lib/py/ynl.py
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2024-10-09 11:09:56 +0300
committerJakub Kicinski <kuba@kernel.org>2024-10-10 18:30:23 +0300
commitecd82cfee355d63c1b961a0fb8dadd8aab9dc2aa (patch)
tree3b60f2d36ce82d7f2d302a2ab5361d0f601d87f5 /tools/testing/selftests/net/lib/py/ynl.py
parent553ea9f1efd6e8410b01f7a31cfb71a97cadcd8b (diff)
downloadlinux-ecd82cfee355d63c1b961a0fb8dadd8aab9dc2aa.tar.xz
net-shapers: implement cap validation in the core
Use the device capabilities to reject invalid attribute values before pushing them to the H/W. Note that validating the metric explicitly avoids NL_SET_BAD_ATTR() usage, to provide unambiguous error messages to the user. Validating the nesting requires the knowledge of the new parent for the given shaper; as such is a chicken-egg problem: to validate the leaf nesting we need to know the node scope, to validate the node nesting we need to know the leafs parent scope. To break the circular dependency, place the leafs nesting validation after the parsing. Suggested-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Link: https://patch.msgid.link/54667601813e4c0348f39bf8ad2446ffc9fcd383.1728460186.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/ynl.py')
0 files changed, 0 insertions, 0 deletions