Subject: Re: [PATCH net-next 1/5] netlink: spec: add shaper YAML spec

From: Jakub Kicinski <[email-masked]>
Date: Fri, 28 Jun 2024 19:12:30 -0700

On Thu, 27 Jun 2024 22:17:18 +0200 Paolo Abeni wrote:
> +      -
> +        name: port
> +        doc: The root shaper for the whole H/W.
> +      -
> +        name: netdev
> +        doc: The main shaper for the given network device.
> +      -
> +        name: queue
> +        doc: The shaper is attached to the given device queue.
> +      -
> +        name: detached
> +        doc: |
> +             The shaper can be attached to port, netdev or other
> +             detached shapers, allowing nesting and grouping of
> +             netdev or queues.
> +    render-max: true

nit: move other properties before the list

> +attribute-sets:
> +  -
> +    name: net_shaper

s/_/-/ on all names

> +    attributes:
> +      -
> +        name: ifindex
> +        type: u32
> +      -
> +        name: parent
> +        type: nest
> +        nested-attributes: handle
> +      -
> +        name: handle
> +        type: nest
> +        nested-attributes: handle
> +      -
> +        name: metric
> +        type: u32
> +        enum: metric
> +      -
> +        name: bw-min
> +        type: u64

s/u64/uint/

> +      -
> +         name: handles
> +         type: nest
> +         multi-attr: true
> +         nested-attributes: handle

oh both handle and handles...
it'd be good to have more doc: for the attributes, all these things get
auto-rendered on docs.kernel.org

> +      -
> +        name: shapers
> +        type: nest
> +        multi-attr: true
> +        nested-attributes: ns-info

How do shapers differ from shaping attrs in this scope? :S

> +      -
> +        name: modified
> +        type: u32
> +      -
> +        name: pad
> +        type: pad

after using uint this can go

> +operations:
> +  list:
> +    -
> +      name: get
> +      doc: |
> +        Get / Dump information about a/all the shaper for a given device
> +      attribute-set: net_shaper
> +      flags: [ admin-perm ]

Any reason why get is admin-perm ?