Re: [PATCH net] tools/net/ynl: fix cli.py --subscribe feature
From: Donald Hunter
Date: Tue Sep 03 2024 - 17:10:14 EST
On Tue, 3 Sept 2024 at 21:01, Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Mon, 02 Sep 2024 10:51:13 +0100 Donald Hunter wrote:
> > Reviewed-by: Donald Hunter <donald.hunter@xxxxxxxxx>
>
> Any preference on passing self.rsp_by_value, vs .decode() accessing
> ynl.rsp_by_value on its own?
.decode() accessing ynl.rsp_by_value would be cleaner, but I am
working on some notification fixes that might benefit from the map
being passed as a parameter. The netlink-raw families use a msg id
scheme that is neither unified nor directional. It's more like a mix
of both where req and rsp use different values but notifications reuse
the req values. I suspect that to fix that we'd need to introduce a
dict for ntf_by_value and then the parameter would be context
specific. OVS reuses req/rsp values for notifications as well, but it
uses a unified scheme, and that's mostly a problem for ynl-gen-c. We
could choose the cleaner approach just now and revisit it as part of
fixing notifications for netlink-raw?