mbox series

[net-next,0/3] Add support for encoding multi-attr to ynl

Message ID cover.1706112189.git.alessandromarcolini99@gmail.com (mailing list archive)
Headers show
Series Add support for encoding multi-attr to ynl | expand

Message

Alessandro Marcolini Jan. 24, 2024, 4:34 p.m. UTC
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).

Example:
The equivalent to:
# tc qdisc add dev eni1np1 root handle:1 ets bands 8 priomap 7 6 5 4 3 2 1 0

would be in ynl:
# ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/tc.yaml --do
newqdisc --create --json '{"family":1, "ifindex":4, "handle":65536, 
"parent":4294967295, "kind":"ets", "options":{"nbands":8, "priomap":
[{"priomap-band":7}, {"priomap-band":6}, {"priomap-band":5},
{"priomap-band":4}, {"priomap-band":3}, {"priomap-band":2},
{"priomap-band":1}, {"priomap-band":0}]}}'

This patchset depends on the work done by Donald Hunter:
https://lore.kernel.org/netdev/20240123160538.172-1-donald.hunter@gmail.com/T/#t

It is a modified version of a previous patch I've submitted, where I
removed the part already addressed by Donald and modified the rest
accordingly. Previous patch:
https://lore.kernel.org/netdev/cover.1705950652.git.alessandromarcolini99@gmail.com/T/#t

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

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         |  9 ++++-----
 tools/net/ynl/lib/ynl.py            | 16 ++++++++++++----
 3 files changed, 17 insertions(+), 9 deletions(-)

Comments

Jakub Kicinski Jan. 24, 2024, 11:25 p.m. UTC | #1
On Wed, 24 Jan 2024 17:34:35 +0100 Alessandro Marcolini wrote:
> This patchset depends on the work done by Donald Hunter:
> https://lore.kernel.org/netdev/20240123160538.172-1-donald.hunter@gmail.com/T/#t

You'll have to repost once Donald's changes are in, sorry :(
Our build bots and CI do not know how to handle series with
dependencies.
Alessandro Marcolini Jan. 25, 2024, 2:09 p.m. UTC | #2
On 1/25/24 00:25, Jakub Kicinski wrote:
> On Wed, 24 Jan 2024 17:34:35 +0100 Alessandro Marcolini wrote:
>> This patchset depends on the work done by Donald Hunter:
>> https://lore.kernel.org/netdev/20240123160538.172-1-donald.hunter@gmail.com/T/#t
> You'll have to repost once Donald's changes are in, sorry :(
> Our build bots and CI do not know how to handle series with
> dependencies.

Ok, thanks for the update :)