From: Donald Hunter <donald.hunter@gmail.com>
To: Alessandro Marcolini <alessandromarcolini99@gmail.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, sdf@google.com, chuck.lever@oracle.com,
lorenzo@kernel.org, jacob.e.keller@intel.com, jiri@resnulli.us,
netdev@vger.kernel.org
Subject: Re: [PATCH v3 net-next 0/3] Add support for encoding multi-attr to ynl
Date: Fri, 02 Feb 2024 15:05:34 +0000 [thread overview]
Message-ID: <m2ttmqucsh.fsf@gmail.com> (raw)
In-Reply-To: <cover.1706882196.git.alessandromarcolini99@gmail.com> (Alessandro Marcolini's message of "Fri, 2 Feb 2024 15:00:02 +0100")
Alessandro Marcolini <alessandromarcolini99@gmail.com> writes:
> This patchset add the support for encoding multi-attr attributes, making
> it possible to use ynl with qdisc which have this kind of attributes
> (e.g: taprio, ets).
I liked the fact that your original cover letter included an example
ynl.py command. With this patchset plus the merged struct encoding
patch, you can add a taprio qdisc like this:
# ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/tc.yaml \
--do newqdisc --create --json '{
"family":1, "ifindex":111, "handle":65536, "parent":4294967295, "info":0,
"kind":"taprio",
"stab":{
"base": {
"cell-log": 0,
"size-log": 0,
"cell-align": 0,
"overhead": 31,
"linklayer": 0,
"mpu": 0,
"mtu": 0,
"tsize": 0
}
},
"options":{
"priomap": {
"num-tc": 3,
"prio-tc-map": "01010101010101010101010101010101",
"hw": 0,
"count": "0100010002000000000000000000000000000000000000000000000000000000",
"offset": "0100020003000000000000000000000000000000000000000000000000000000"
},
"sched-clockid":11,
"sched-entry-list": {"entry": [
{"index":0, "cmd":0, "gate-mask":1, "interval":300000},
{"index":1, "cmd":0, "gate-mask":2, "interval":300000},
{"index":2, "cmd":0, "gate-mask":4, "interval":400000} ]
},
"sched-base-time":1528743495910289987, "flags": 1
}
}'
> Patch 1 corrects two docstrings in nlspec.py
> Patch 2 adds the multi-attr attribute to taprio entry
> Patch 3 adds the support for encoding multi-attr
>
> v1 --> v2:
> - Use SearchAttrs instead of ChainMap
>
> v2 --> v3:
> - Handle multi-attr at every level, not only in nested attributes
>
> Alessandro Marcolini (3):
> tools: ynl: correct typo and docstring
> doc: netlink: specs: tc: add multi-attr to tc-taprio-sched-entry
> tools: ynl: add support for encoding multi-attr
>
> Documentation/netlink/specs/tc.yaml | 1 +
> tools/net/ynl/lib/nlspec.py | 7 +++----
> tools/net/ynl/lib/ynl.py | 5 +++++
> 3 files changed, 9 insertions(+), 4 deletions(-)
next prev parent reply other threads:[~2024-02-02 15:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 14:00 [PATCH v3 net-next 0/3] Add support for encoding multi-attr to ynl Alessandro Marcolini
2024-02-02 14:00 ` [PATCH v3 net-next 1/3] tools: ynl: correct typo and docstring Alessandro Marcolini
2024-02-02 14:00 ` [PATCH v3 net-next 2/3] doc: netlink: specs: tc: add multi-attr to tc-taprio-sched-entry Alessandro Marcolini
2024-02-02 14:00 ` [PATCH v3 net-next 3/3] tools: ynl: add support for encoding multi-attr Alessandro Marcolini
2024-02-02 14:34 ` Donald Hunter
2024-02-03 2:17 ` Jakub Kicinski
2024-02-03 12:00 ` Alessandro Marcolini
2024-02-02 15:05 ` Donald Hunter [this message]
2024-02-02 15:31 ` [PATCH v3 net-next 0/3] Add support for encoding multi-attr to ynl Alessandro Marcolini
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=m2ttmqucsh.fsf@gmail.com \
--to=donald.hunter@gmail.com \
--cc=alessandromarcolini99@gmail.com \
--cc=chuck.lever@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jacob.e.keller@intel.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@google.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).