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

From: Jakub Kicinski <[email-masked]>
Date: Mon, 12 Aug 2024 10:42:21 -0700

On Mon, 12 Aug 2024 18:50:06 +0200 Jiri Pirko wrote:
> Mon, Aug 12, 2024 at 05:25:44PM CEST, [email-masked] wrote:
> >I think the confusion is primarily about the parent / child.
> >input and output should be very clear, IMO.  
> 
> For me, "inputs" and "output" in this context sounds very odd. It should
> be children and parent, isn't it. Confused...

Parent / child is completely confusing. Let's not.

User will classify traffic based on 'leaf' attributes.
Therefore in my mind traffic enters the tree at the "leaves", 
and travels towards the root (whether or not that's how HW 
evaluates the hierarchy).

This is opposite to how trees as an data structure are normally
traversed. Hence I find the tree analogy to be imperfect.
But yes, root and leaf are definitely better than parent / child.

> >> Also while at it, I think renaming the 'group()' operation as 
> >> 'node_set()' could be clearer (or at least less unclear), WDYT?  
> >
> >No idea how we arrived at node_set(), and how it can possibly   
> 
> subtree_set() ?

The operation is grouping inputs and creating a scheduler node.

> >represent a grouping operation.
> >The operations is grouping inputs and creating a scheduler node.
> >  
> >> Note: I think it's would be more user-friendly to keep a single 
> >> delete/get/dump operation for 'nodes' and leaves.  
> >
> >Are you implying that nodes and leaves are different types of objects?
> >Aren't leaves nodes without any inputs?  
> 
> Agree. Same op would be nice for both.