Fix various minor bugs in the net shaper API. First 2 patches deal with ordering issues around inserting and publishing new shapers. Shapers are inserted "tentatively" and marked valid only after HW op succeeded, this used to be slightly racy.
Only other patch of note is patch 8. We want to add a Netlink policy check on the handle ID. This necessitates patch 7. The rest are simple and self-explanatory. v2: - drop the first 2 patches - the corresponding changes will be sent later to net-next. v1: https://lore.kernel.org/[email protected] Jakub Kicinski (10): net: shaper: flip the polarity of the valid flag net: shaper: fix trivial ordering issue in net_shaper_commit() net: shaper: reject duplicate leaves in GROUP request selftests: drv-net: add shaper test for duplicate leaves net: shaper: set ret to -ENOMEM when genlmsg_new() fails in group_doit net: shaper: fix undersized reply skb allocation in GROUP command tools: ynl: add scope qualifier for definitions net: shaper: reject handle IDs exceeding internal bit-width net: shaper: enforce singleton NETDEV scope with id 0 net: shaper: reject QUEUE scope handle with missing id Documentation/netlink/genetlink-c.yaml | 9 ++ Documentation/netlink/genetlink-legacy.yaml | 9 ++ Documentation/netlink/genetlink.yaml | 9 ++ Documentation/netlink/netlink-raw.yaml | 9 ++ Documentation/netlink/specs/net_shaper.yaml | 7 + net/shaper/shaper_nl_gen.h | 2 + net/shaper/shaper.c | 136 +++++++++++++----- net/shaper/shaper_nl_gen.c | 7 +- tools/net/ynl/pyynl/ynl_gen_c.py | 31 +++- tools/testing/selftests/drivers/net/shaper.py | 24 +++- 10 files changed, 200 insertions(+), 43 deletions(-) -- 2.54.0
