[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240416191016.5072e144@kernel.org>
Date: Tue, 16 Apr 2024 19:10:16 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Donald Hunter <donald.hunter@...il.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Jiri Pirko
<jiri@...nulli.us>, Jacob Keller <jacob.e.keller@...el.com>, Pablo Neira
Ayuso <pablo@...filter.org>, Jozsef Kadlecsik <kadlec@...filter.org>,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
donald.hunter@...hat.com
Subject: Re: [PATCH net-next v3 3/4] tools/net/ynl: Handle acks that use
req_value
On Tue, 16 Apr 2024 20:32:14 +0100 Donald Hunter wrote:
> The nfnetlink family uses the directional op model but errors get
> reported using the request value instead of the reply value.
What's an error in this case ? "Normal" errors come via NLMSG_ERROR
> diff --git a/tools/net/ynl/lib/nlspec.py b/tools/net/ynl/lib/nlspec.py
> index 6d08ab9e213f..04085bc6365e 100644
> --- a/tools/net/ynl/lib/nlspec.py
> +++ b/tools/net/ynl/lib/nlspec.py
> @@ -567,6 +567,18 @@ class SpecFamily(SpecElement):
> return op
> return None
>
> + def get_op_by_value(self, value):
> + """
> + For a given operation value, look up operation spec. Search
> + by response value first then fall back to request value. This
> + is required for handling failure cases.
Looks like we're only going to need it in NetlinkProtocol, so that's
fine. But let's somehow call out that this is a bit of a hack, so that
people don't feel like this is the more correct way of finding the op
than direct access to rsp_by_value[].
Powered by blists - more mailing lists