[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240904185606.366ef437@kernel.org>
Date: Wed, 4 Sep 2024 18:56:06 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, Jiri Pirko <jiri@...nulli.us>, Madhu Chittim
<madhu.chittim@...el.com>, Sridhar Samudrala <sridhar.samudrala@...el.com>,
Simon Horman <horms@...nel.org>, John Fastabend <john.fastabend@...il.com>,
Sunil Kovvuri Goutham <sgoutham@...vell.com>, Jamal Hadi Salim
<jhs@...atatu.com>, Donald Hunter <donald.hunter@...il.com>,
anthony.l.nguyen@...el.com, przemyslaw.kitszel@...el.com,
intel-wired-lan@...ts.osuosl.org, edumazet@...gle.com
Subject: Re: [PATCH v6 net-next 10/15] net-shapers: implement cap validation
in the core
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 <kuba@...nel.org>
> Signed-off-by: Paolo Abeni <pabeni@...hat.com>
Reviewed-by: Jakub Kicinski <kuba@...nel.org>
Powered by blists - more mailing lists