Add support for encoding multi-attr to ynl
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest3 patches 0 repliesApplied 3/3
- v33 patches 5 repliesSuperseded
- v23 patches 5 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 3 patches | 2 replies | Superseded |
Changes in v4 from the cover letter
- Separate the new code block with empty lines
Patches in v4 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | tools: ynl: correct typo and docstringtools/ | +3 | 0 replies | Applied |
| 2/3 | doc: netlink: specs: tc: add multi-attr to tc-taprio-sched-entryDocumentation/ | +1 | 0 replies | Applied |
| 3/3 | tools: ynl: add support for encoding multi-attrtools/ | +7 | 0 replies | Applied |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Donald Hunter | Jakub Kicinski |
|---|---|---|
| 1/3 | R-b | R-b |
| 2/3 | R-b | R-b |
| 3/3 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 net-next 0/3] Add support for encoding multi-attr to ynl
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).
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
v3 --> v4:
- Separate the new code block with empty lines
Some examples of what is now possible with the ynl cli:
- Add a taprio qdisc
# ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/tc.yaml \
--do newqdisc --create --json '{
"family":1, "ifindex":4, "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
}
}'- Add an ets qdisc
# ./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":6,
"nstrict":3,
"quanta":{
"quanta-band": [3500, 3000, 2500]
},
"priomap":{
"priomap-band":[0, 1, 1, 1, 2, 3, 4, 5]
}
}
}'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 | 7 +++++++ 3 files changed, 11 insertions(+), 4 deletions(-)
Signature · 1 line
2.43.0