public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Alessandro Marcolini <alessandromarcolini99@gmail•com>
To: davem@davemloft•net, edumazet@google•com, kuba@kernel•org,
	pabeni@redhat•com, donald.hunter@gmail•com, sdf@google•com,
	chuck.lever@oracle•com, lorenzo@kernel•org,
	jacob.e.keller@intel•com, jiri@resnulli•us
Cc: netdev@vger•kernel.org,
	Alessandro Marcolini <alessandromarcolini99@gmail•com>
Subject: [PATCH net-next 0/3] Add support for encoding multi-attr to ynl
Date: Wed, 24 Jan 2024 17:34:35 +0100	[thread overview]
Message-ID: <cover.1706112189.git.alessandromarcolini99@gmail.com> (raw)

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(-)

-- 
2.43.0


             reply	other threads:[~2024-01-24 16:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 16:34 Alessandro Marcolini [this message]
2024-01-24 16:34 ` [PATCH net-next 1/3] tools: ynl: correct typo and docstring Alessandro Marcolini
2024-01-24 16:34 ` [PATCH net-next 2/3] doc: netlink: specs: tc: add multi-attr to tc-taprio-sched-entry Alessandro Marcolini
2024-01-24 16:34 ` [PATCH net-next 3/3] tools: ynl: add support for encoding multi-attr Alessandro Marcolini
2024-01-24 23:25 ` [PATCH net-next 0/3] Add support for encoding multi-attr to ynl Jakub Kicinski
2024-01-25 14:09   ` 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=cover.1706112189.git.alessandromarcolini99@gmail.com \
    --to=alessandromarcolini99@gmail$(echo .)com \
    --cc=chuck.lever@oracle$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=donald.hunter@gmail$(echo .)com \
    --cc=edumazet@google$(echo .)com \
    --cc=jacob.e.keller@intel$(echo .)com \
    --cc=jiri@resnulli$(echo .)us \
    --cc=kuba@kernel$(echo .)org \
    --cc=lorenzo@kernel$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=sdf@google$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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