[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231012073223.2210c517@kernel.org>
Date: Thu, 12 Oct 2023 07:32:23 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, pabeni@...hat.com, davem@...emloft.net,
edumazet@...gle.com
Subject: Re: [patch net-next] tools: ynl: introduce option to ignore unknown
attributes or types
On Thu, 12 Oct 2023 16:04:38 +0200 Jiri Pirko wrote:
> $ sudo ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/devlink.yaml --do trap-get --json '{"bus-name": "netdevsim", "dev-name": "netdevsim1", "trap-name": "source_mac_is_multicast"}' --ignore-unknown
> {'bus-name': 'netdevsim',
> 'dev-name': 'netdevsim1',
> 'trap-action': 'drop',
> 'trap-group-name': 'l2_drops',
> 'trap-name': 'source_mac_is_multicast'}
Wouldn't it be better to put the unknown attr in as raw binary?
We can key it by attribute type (integer) and put the NlAttr object
in as the value.
That way at least the user still sees that the unknown attrs are
present.
Powered by blists - more mailing lists