Thread (91 messages) 91 messages, 5 authors, 2024-08-29

Re: [PATCH v3 02/12] netlink: spec: add shaper YAML spec

From: Jiri Pirko <jiri@resnulli.us>
Date: 2024-08-02 10:49:54

Thu, Aug 01, 2024 at 05:12:01PM CEST, pabeni@redhat.com wrote:
On 8/1/24 15:10, Jiri Pirko wrote:
quoted
Tue, Jul 30, 2024 at 10:39:45PM CEST, pabeni@redhat.com wrote:
quoted
+    type: enum
+    name: scope
+    doc: the different scopes where a shaper can be attached
+    render-max: true
+    entries:
+      - name: unspec
+        doc: The scope is not specified
+      -
+        name: port
+        doc: The root for the whole H/W
What is this "port"?
~ a wire plug.
What's "wire plug"? What of existing kernel objects this relates to? Is
it a devlink port?

quoted
quoted
+      -
+        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 is not attached to any user-visible network
+             device component and allows nesting and grouping of
+             queues or others detached shapers.
What is the purpose of the "detached" thing?
I fear I can't escape reusing most of the wording above. 'detached' nodes
goal is to create groups of other shapers. i.e. queue groups,
allowing multiple levels nesting, i.e. to implement this kind of hierarchy:

q1 ----- \
q2 - \SP / RR ------
q3 - /    	    \
q4 - \ SP -> (netdev)
q5 - /	    /
                  /
q6 - \ RR
q7 - /

where q1..q7 are queue-level shapers and all the SP/RR are 'detached' one.
The conf. does not necessary make any functional sense, just to describe the
things.
Can you "attach" the "detached" ones? They are "detached" from what?

quoted
quoted
+    -
+      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.
+        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.
I'm lost. Could this designt be described in details in the doc I asked
in the cover letter? :/ Please.
I'm unsure if the context information here and in the previous replies helped
somehow.

The group operation creates and configure a scheduling group, i.e. this

q1 ----- \
q2 - \SP / RR ------
q3 - /    	    \
q4 - \ SP -> (netdev)
q5 - /	    /
                  /
q6 - \ RR
q7 - /

can be create with:

group(inputs:[q6, q7], output:[detached,parent:netdev])
group(inputs:[q4, q5], output:[detached,parent:netdev])
group(inputs:[q1], output:[detached,parent:netdev])
group(inputs:[q2,q3], output:[detached,parent:<the detached shaper create
above>])
So by "inputs" and "output" you are basically building a tree. In
devlink rate, we have leaf and node, which is in sync with standard tree
terminology.

If what you are building is tree, why don't you use the same
terminology? If you are building tree, you just need to have the link to
upper noded (output in your terminology). Why you have "inputs"? Isn't
that redundant?

If this is not tree, what's that? Can for example q6 be input of 2
different groups? How is that supposed to work?

I'm unsure if this the kind of info you are looking for?
I'm trying to understand the design. Have to say I'm just confused :/

Thanks,

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help