From: Donald Hunter <donald.hunter@gmail.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
Jiri Pirko <jiri@resnulli.us>,
Madhu Chittim <madhu.chittim@intel.com>,
Sridhar Samudrala <sridhar.samudrala@intel.com>,
Simon Horman <horms@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
Sunil Kovvuri Goutham <sgoutham@marvell.com>,
Jamal Hadi Salim <jhs@mojatatu.com>
Subject: Re: [PATCH v3 02/12] netlink: spec: add shaper YAML spec
Date: Wed, 31 Jul 2024 22:13:22 +0100 [thread overview]
Message-ID: <m25xslp8nh.fsf@gmail.com> (raw)
In-Reply-To: <13747e9505c47d88c22a12a372ea94755c6ba3b2.1722357745.git.pabeni@redhat.com> (Paolo Abeni's message of "Tue, 30 Jul 2024 22:39:45 +0200")
Paolo Abeni <pabeni@redhat.com> writes:
> diff --git a/Documentation/netlink/specs/shaper.yaml b/Documentation/netlink/specs/shaper.yaml
> new file mode 100644
> index 000000000000..7327f5596fdb
> --- /dev/null
> +++ b/Documentation/netlink/specs/shaper.yaml
It's probably more user-friendly to use the same filename as the spec
name, so net-shaper.yaml
> @@ -0,0 +1,262 @@
> +# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
> +
> +name: net-shaper
> +
> +doc: Network device HW Rate Limiting offload
> +
> +definitions:
> + -
> + type: enum
> + name: scope
> + doc: the different scopes where a shaper can be attached
Nit: upper case 'The' to be consistent with rest of docs.
> + render-max: true
> + entries:
> + - name: unspec
> + doc: The scope is not specified
What are the semantics of 'unspec' ? When can it be used?
> + -
> + name: port
> + doc: The root for the whole H/W
> + -
> + name: netdev
> + doc: The main shaper for the given network device.
What are the semantic differences between netdev and port?
> + -
> + name: queue
> + doc: The shaper is attached to the given device queue.
> + -
> + name: detached
> + doc: |
> + The shaper is not attached to any user-visible network
> + device component and allows nesting and grouping of
> + queues or others detached shapers.
I assume that shapers are always owned by the netdev regardless of
attach status?
> + -
> + type: enum
> + name: metric
> + doc: different metric each shaper can support
Nit: upper case here as well.
> + entries:
> + -
> + name: bps
> + doc: Shaper operates on a bits per second basis
> + -
> + name: pps
> + doc: Shaper operates on a packets per second basis
> +
> +attribute-sets:
> + -
> + name: net-shaper
> + attributes:
> + -
> + name: ifindex
> + type: u32
> + doc: Interface index owing the specified shaper[s]
Typo: this should be 'owning' ?
> + -
> + name: handle
> + type: nest
> + nested-attributes: handle
> + doc: Unique identifier for the given shaper
> + -
> + name: metric
> + type: u32
> + enum: metric
> + doc: Metric used by the given shaper for bw-min, bw-max and burst
> + -
> + name: bw-min
> + type: uint
> + doc: Minimum guaranteed B/W for the given shaper
> + -
> + name: bw-max
> + type: uint
> + doc: Shaping B/W for the given shaper or 0 when unlimited
> + -
> + name: burst
> + type: uint
> + doc: Maximum burst-size for bw-min and bw-max
> + -
> + name: priority
> + type: u32
> + doc: Scheduling priority for the given shaper
> + -
> + name: weight
> + type: u32
> + doc: |
> + Weighted round robin weight for given shaper.
> + The scheduling is applied to all the sibling
> + shapers with the same priority
> + -
> + name: scope
> + type: u32
> + enum: scope
> + doc: The given handle scope
> + -
> + name: id
> + type: u32
> + doc: |
> + The given handle id. The id semantic depends on the actual
> + scope, e.g. for 'queue' scope it's the queue id, for
> + 'detached' scope it's the shaper group identifier.
If scope and id are only ever used as attributes of a handle then they
would be better specified as a separate attribute-set, instead of
mixing them in here and using a subset.
You use 'quoted' references here and @refs elsewhere. It would be good
to be consistent. See note below about @ in htmldocs.
> + -
> + name: parent
> + type: nest
> + nested-attributes: handle
> + doc: |
> + Identifier for the parent of the affected shaper,
> + The parent handle value is implied by the shaper handle itself,
> + except for the output shaper in the 'group' operation.
Nit: quoted ref again here
> + -
> + name: inputs
> + type: nest
> + multi-attr: true
> + nested-attributes: ns-info
> + doc: |
> + Describes a set of inputs shapers for a @group operation
The @group renders exactly as-is in the generated htmldocs. There may be
a more .rst friendly markup you can use that will render better.
> + -
> + name: output
> + type: nest
> + nested-attributes: ns-output-info
> + doc: |
> + Describes the output shaper for a @group operation
> + Differently from @inputs and @shaper allow specifying
> + the shaper parent handle, too.
> +
Nit: remove the extra blank line here
> + -
> + name: shaper
> + type: nest
> + nested-attributes: ns-info
> + doc: |
> + Describes a single shaper for a @set operation
> + -
> + name: handle
> + subset-of: net-shaper
> + attributes:
> + -
> + name: scope
> + -
> + name: id
> + -
> + name: ns-info
> + subset-of: net-shaper
> + attributes:
> + -
> + name: handle
> + -
> + name: metric
> + -
> + name: bw-min
> + -
> + name: bw-max
> + -
> + name: burst
> + -
> + name: priority
> + -
> + name: weight
> + -
> + name: ns-output-info
> + subset-of: net-shaper
> + attributes:
> + -
> + name: parent
> + -
> + name: handle
> + -
> + name: metric
> + -
> + name: bw-min
> + -
> + name: bw-max
> + -
> + name: burst
> + -
> + name: priority
> + -
> + name: weight
> +
> +operations:
> + list:
> + -
> + name: get
> + doc: |
> + Get / Dump information about a/all the shaper for a given device
> + attribute-set: net-shaper
> +
> + do:
> + request:
> + attributes:
> + - ifindex
> + - handle
> + reply:
> + attributes: &ns-attrs
> + - parent
> + - handle
> + - metric
> + - bw-min
> + - bw-max
> + - burst
> + - priority
> + - weight
> +
> + dump:
> + request:
> + attributes:
> + - ifindex
> + reply:
> + attributes: *ns-attrs
> + -
> + name: set
> + doc: |
> + Create or configures the specified shaper.
> + On failures the extack is set accordingly.
> + Can't create @detached scope shaper, use
> + the @group operation instead.
> + attribute-set: net-shaper
> + flags: [ admin-perm ]
> +
> + do:
> + request:
> + attributes:
> + - ifindex
> + - shaper
> +
> + -
> + name: delete
> + doc: |
> + Clear (remove) the specified shaper. If after the removal
> + the parent shaper has no more children and the parent
> + shaper scope is @detached, even the parent is deleted,
> + recursively.
> + On failures the extack is set accordingly.
> + attribute-set: net-shaper
> + flags: [ admin-perm ]
> +
> + do:
> + request:
> + attributes:
> + - ifindex
> + - handle
> +
> + -
> + name: group
> + doc: |
> + Group the specified input shapers under the specified
> + output shaper, eventually creating the latter, if needed.
> + Input shapers scope must be either @queue or @detached.
It says above that you cannot create a detached shaper, so how do you
create one to use as an input shaper here? Is this group op more like a
multi-create op?
> + Output shaper scope must be either @detached or @netdev.
> + When using an output @detached scope shaper, if the
> + @handle @id is not specified, a new shaper of such scope
> + is created and, otherwise the specified output shaper
> + must be already existing.
> + The operation is atomic, on failures the extack is set
> + accordingly and no change is applied to the device
> + shaping configuration, otherwise the output shaper
> + handle is provided as reply.
> + attribute-set: net-shaper
> + flags: [ admin-perm ]
Does there need to be a reciprocal 'ungroup' operation? Without it,
create / group / delete seems like they will have ambiguous semantics.
> + do:
> + request:
> + attributes:
> + - ifindex
> + - inputs
> + - output
> + reply:
> + attributes:
> + - handle
next prev parent reply other threads:[~2024-07-31 21:14 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 20:39 [PATCH v3 00/12] net: introduce TX H/W shaping API Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 01/12] tools: ynl: lift an assumption about spec file name Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 02/12] netlink: spec: add shaper YAML spec Paolo Abeni
2024-07-31 21:13 ` Donald Hunter [this message]
2024-08-01 14:31 ` Paolo Abeni
2024-08-02 10:57 ` Jiri Pirko
2024-08-02 11:15 ` Donald Hunter
2024-08-05 14:35 ` Paolo Abeni
2024-08-05 20:37 ` Jakub Kicinski
2024-08-01 13:10 ` Jiri Pirko
2024-08-01 14:40 ` Jakub Kicinski
2024-08-01 15:12 ` Paolo Abeni
2024-08-02 10:49 ` Jiri Pirko
2024-08-05 15:11 ` Paolo Abeni
2024-08-06 7:06 ` Jiri Pirko
2024-08-12 14:58 ` Paolo Abeni
2024-08-12 15:25 ` Jakub Kicinski
2024-08-12 16:50 ` Jiri Pirko
2024-08-12 17:42 ` Jakub Kicinski
2024-08-13 5:38 ` Jiri Pirko
2024-08-13 14:12 ` Jakub Kicinski
2024-08-13 14:47 ` Paolo Abeni
2024-08-13 14:58 ` Jakub Kicinski
2024-08-13 15:31 ` Paolo Abeni
2024-08-13 15:43 ` Jakub Kicinski
2024-08-14 8:56 ` Donald Hunter
2024-08-13 17:12 ` Donald Hunter
2024-08-14 14:21 ` Paolo Abeni
2024-08-15 9:07 ` Donald Hunter
2024-08-02 11:19 ` Jiri Pirko
2024-08-02 11:26 ` Jiri Pirko
2024-08-02 16:04 ` Jiri Pirko
2024-07-30 20:39 ` [PATCH v3 03/12] net-shapers: implement NL get operation Paolo Abeni
2024-08-01 13:42 ` Jiri Pirko
2024-08-13 15:17 ` Paolo Abeni
2024-08-14 8:37 ` Jiri Pirko
2024-08-16 8:52 ` Paolo Abeni
2024-08-16 9:16 ` Jiri Pirko
2024-08-19 9:33 ` Paolo Abeni
2024-08-19 11:53 ` Jiri Pirko
2024-08-19 16:52 ` Paolo Abeni
2024-08-22 12:02 ` Jiri Pirko
2024-08-22 14:41 ` Jakub Kicinski
2024-08-22 20:30 ` Paolo Abeni
2024-08-22 22:56 ` Jakub Kicinski
2024-08-23 11:50 ` Jiri Pirko
2024-08-23 12:58 ` Paolo Abeni
2024-08-23 13:36 ` Jiri Pirko
2024-08-23 14:23 ` Paolo Abeni
2024-08-26 9:31 ` Jiri Pirko
2024-08-27 14:37 ` Paolo Abeni
2024-08-27 14:54 ` Jakub Kicinski
2024-08-27 20:43 ` Paolo Abeni
2024-08-27 21:03 ` Jakub Kicinski
2024-08-27 21:54 ` Paolo Abeni
2024-08-28 6:40 ` Jiri Pirko
2024-08-28 10:55 ` Paolo Abeni
2024-08-28 13:02 ` Jiri Pirko
2024-08-28 20:30 ` Jakub Kicinski
2024-08-28 21:13 ` Paolo Abeni
2024-08-29 11:45 ` Jiri Pirko
2024-08-01 15:09 ` Jakub Kicinski
2024-08-02 11:53 ` Jiri Pirko
2024-07-30 20:39 ` [PATCH v3 04/12] net-shapers: implement NL set and delete operations Paolo Abeni
2024-08-01 15:00 ` Jakub Kicinski
2024-08-01 15:25 ` Paolo Abeni
2024-08-01 15:39 ` Jakub Kicinski
2024-08-02 16:15 ` Jiri Pirko
2024-08-02 22:01 ` Jakub Kicinski
2024-08-05 15:23 ` Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 05/12] net-shapers: implement NL group operation Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 06/12] netlink: spec: add shaper introspection support Paolo Abeni
2024-08-02 11:21 ` Donald Hunter
2024-07-30 20:39 ` [PATCH v3 07/12] net: shaper: implement " Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 08/12] testing: net-drv: add basic shaper test Paolo Abeni
2024-07-31 7:52 ` Paolo Abeni
2024-08-01 1:55 ` Jakub Kicinski
2024-08-05 14:22 ` Simon Horman
2024-08-05 19:36 ` Jakub Kicinski
2024-08-06 15:21 ` Simon Horman
2024-08-08 12:20 ` Simon Horman
2024-08-08 14:17 ` Jakub Kicinski
2024-08-08 14:34 ` Simon Horman
2024-08-11 12:40 ` Simon Horman
2024-08-12 15:31 ` Jakub Kicinski
2024-08-12 16:03 ` Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 09/12] virtchnl: support queue rate limit and quanta size configuration Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 10/12] ice: Support VF " Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 11/12] iavf: Add net_shaper_ops support Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 12/12] iavf: add support to exchange qos capabilities Paolo Abeni
2024-08-01 12:57 ` [PATCH v3 00/12] net: introduce TX H/W shaping API Jiri Pirko
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=m25xslp8nh.fsf@gmail.com \
--to=donald.hunter@gmail.com \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=madhu.chittim@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sgoutham@marvell.com \
--cc=sridhar.samudrala@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).