From: Jakub Kicinski <kuba@kernel.org>
To: Maryam Tahhan <mtahhan@redhat.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com
Subject: Re: [PATCH net-next v2 0/2] tools/net/ynl: enable json configuration
Date: Thu, 27 Jul 2023 17:37:53 -0700 [thread overview]
Message-ID: <20230727173753.6e044c13@kernel.org> (raw)
In-Reply-To: <20230727120353.3020678-1-mtahhan@redhat.com>
On Thu, 27 Jul 2023 08:03:29 -0400 Maryam Tahhan wrote:
> Use a json configuration file to pass parameters to ynl to allow
> for operations on multiple specs in one go. Additionally, check
> this new configuration against a schema to validate it in the cli
> module before parsing it and passing info to the ynl module.
Interesting. Is this related to Donald's comments about subscribing
to notifications from multiple families?
Can you share some info about your use case?
> Example configs would be:
>
> {
> "yaml-specs-path": "/<path-to>/linux/Documentation/netlink/specs",
> "spec-args": {
> "ethtool.yaml": {
> "do": "rings-get",
> "json-params": {
> "header": {
> "dev-name": "eno1"
> }
> }
> },
> "netdev.yaml": {
> "do": "dev-get",
> "json-params": {
> "ifindex": 3
> }
> }
> }
> }
Why is the JSON preferable to writing a script to the same effect?
It'd actually be shorter and more flexible.
Maybe we should focus on packaging YNL as a python lib?
> OR
>
> {
> "yaml-specs-path": "/<path-to>/linux/Documentation/netlink/specs",
> "spec-args": {
> "ethtool.yaml": {
> "subscribe": "monitor",
> "sleep": 10
> },
> "netdev.yaml": {
> "subscribe": "mgmt",
> "sleep": 5
> }
> }
> }
Could you also share the outputs the examples would produce?
next prev parent reply other threads:[~2023-07-28 0:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 12:03 [PATCH net-next v2 0/2] tools/net/ynl: enable json configuration Maryam Tahhan
2023-07-27 12:03 ` [PATCH net-next v2 1/2] tools/net/ynl: configuration through json Maryam Tahhan
2023-07-28 0:39 ` Jakub Kicinski
2023-07-27 12:03 ` [PATCH net-next v2 2/2] tools/net/ynl: validate config against schema Maryam Tahhan
2023-07-28 0:37 ` Jakub Kicinski [this message]
2023-07-28 10:24 ` [PATCH net-next v2 0/2] tools/net/ynl: enable json configuration Maryam Tahhan
2023-07-28 15:49 ` Jakub Kicinski
2023-07-31 8:12 ` Maryam Tahhan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230727173753.6e044c13@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=mtahhan@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).