On Wed,  4 Sep 2024 15:53:42 +0200 Paolo Abeni wrote:
> 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 <k...@kernel.org>
> Signed-off-by: Paolo Abeni <pab...@redhat.com>

Reviewed-by: Jakub Kicinski <k...@kernel.org>

Reply via email to