Message ID | cover.1724165948.git.pabeni@redhat.com (mailing list archive) |
---|---|
Headers | show |
Series | net: introduce TX H/W shaping API | expand |
On Tue, 20 Aug 2024 17:12:21 +0200 Paolo Abeni wrote:
> tools: ynl: lift an assumption about spec file name
I'll pop this one in, no point carrying it around.
Double check other patches for trailing whitespace. There were some
warnings when I was pulling the series in.
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Tue, 20 Aug 2024 17:12:21 +0200 you wrote: > We have a plurality of shaping-related drivers API, but none flexible > enough to meet existing demand from vendors[1]. > > This series introduces new device APIs to configure in a flexible way > TX H/W shaping. The new functionalities are exposed via a newly > defined generic netlink interface and include introspection > capabilities. Some self-tests are included, on top of a dummy > netdevsim implementation, and a basic implementation for the iavf > driver. > > [...] Here is the summary with links: - [v4,net-next,01/12] tools: ynl: lift an assumption about spec file name https://git.kernel.org/netdev/net-next/c/f32c821ae019 - [v4,net-next,02/12] netlink: spec: add shaper YAML spec (no matching commit) - [v4,net-next,03/12] net-shapers: implement NL get operation (no matching commit) - [v4,net-next,04/12] net-shapers: implement NL set and delete operations (no matching commit) - [v4,net-next,05/12] net-shapers: implement NL group operation (no matching commit) - [v4,net-next,06/12] net-shapers: implement delete support for NODE scope shaper (no matching commit) - [v4,net-next,07/12] netlink: spec: add shaper introspection support (no matching commit) - [v4,net-next,08/12] net: shaper: implement introspection support (no matching commit) - [v4,net-next,09/12] testing: net-drv: add basic shaper test (no matching commit) - [v4,net-next,10/12] virtchnl: support queue rate limit and quanta size configuration (no matching commit) - [v4,net-next,11/12] ice: Support VF queue rate limit and quanta size configuration (no matching commit) - [v4,net-next,12/12] iavf: Add net_shaper_ops support (no matching commit) You are awesome, thank you!
On Tue, 20 Aug 2024 17:12:21 +0200 Paolo Abeni wrote: > * Delegation > > A containers wants to limit the aggregate B/W bandwidth of 2 of the 3 > queues it owns - the starting configuration is the one from the > previous point: > > SPEC=Documentation/netlink/specs/net_shaper.yaml > ./tools/net/ynl/cli.py --spec $SPEC \ > --do group --json '{"ifindex":'$IFINDEX', > "leaves": [ > {"handle": {"scope": "queue", "id":'$QID1' }, > "weight": '$W1'}, > {"handle": {"scope": "queue", "id":'$QID2' }, > "weight": '$W2'}], > "root": { "handle": {"scope": "node"}, > "parent": {"scope": "node", "id": 0}, In the delegation use case I was hoping "parent" would be automatic.
On 8/23/24 02:43, Jakub Kicinski wrote: > On Tue, 20 Aug 2024 17:12:21 +0200 Paolo Abeni wrote: >> * Delegation >> >> A containers wants to limit the aggregate B/W bandwidth of 2 of the 3 >> queues it owns - the starting configuration is the one from the >> previous point: >> >> SPEC=Documentation/netlink/specs/net_shaper.yaml >> ./tools/net/ynl/cli.py --spec $SPEC \ >> --do group --json '{"ifindex":'$IFINDEX', >> "leaves": [ >> {"handle": {"scope": "queue", "id":'$QID1' }, >> "weight": '$W1'}, >> {"handle": {"scope": "queue", "id":'$QID2' }, >> "weight": '$W2'}], >> "root": { "handle": {"scope": "node"}, >> "parent": {"scope": "node", "id": 0}, > > In the delegation use case I was hoping "parent" would be automatic. Currently the parent is automatic/implicit when creating a node directly nested to the the netdev shaper. I now see we can use as default parent the current leaves' parent, when that is the same for all the to-be-grouped leaves. Actually, if we restrict the group operation to operate only on set of leaves respecting the above, I *guess* we will not lose generality and we could simplify a bit the spec. WDYT? Thanks, Paolo
On Fri, 23 Aug 2024 09:51:24 +0200 Paolo Abeni wrote: > On 8/23/24 02:43, Jakub Kicinski wrote: > > On Tue, 20 Aug 2024 17:12:21 +0200 Paolo Abeni wrote: > >> * Delegation > >> > >> A containers wants to limit the aggregate B/W bandwidth of 2 of the 3 > >> queues it owns - the starting configuration is the one from the > >> previous point: > >> > >> SPEC=Documentation/netlink/specs/net_shaper.yaml > >> ./tools/net/ynl/cli.py --spec $SPEC \ > >> --do group --json '{"ifindex":'$IFINDEX', > >> "leaves": [ > >> {"handle": {"scope": "queue", "id":'$QID1' }, > >> "weight": '$W1'}, > >> {"handle": {"scope": "queue", "id":'$QID2' }, > >> "weight": '$W2'}], > >> "root": { "handle": {"scope": "node"}, > >> "parent": {"scope": "node", "id": 0}, > > > > In the delegation use case I was hoping "parent" would be automatic. > > Currently the parent is automatic/implicit when creating a node directly > nested to the the netdev shaper. > > I now see we can use as default parent the current leaves' parent, when > that is the same for all the to-be-grouped leaves. > > Actually, if we restrict the group operation to operate only on set of > leaves respecting the above, I *guess* we will not lose generality and > we could simplify a bit the spec. WDYT? I remember having a use case in mind where specifying parent would be very useful. I think it may have been related to atomic changes. I'm not sure if what I describe below is exactly that case... Imagine: Qx -{hierarchy}---\ \{hierarchy}-- netdev Q0-------P0\ SP----/ Q1--\ RR-P1/ Q2--/ Let's say we own queues 0,1,2 and want to remove the SP layer. It's convenient to do: $node = get($SP-node) group(leaves: [Q0, Q1, Q2], parent=$node.parent) And have the kernel "garbage collect" the old RR node and the old SP node (since they will now have no children). We want to avoid the situations where user space has to do complex transitions thru states which device may not support (make sure Q1, Q2 have right prios, delete old RR, now we have SP w/ 3 inputs, delete the SP, create a new group). For the case above we could technically identify the correct parent by skipping the nodes which will be garbage collected later. But imagine that instead of deleting the hierarchy we wanted to move Q1 from P1 to P0: group(leaves: [Q0, Q1], parent=SP, prio=P0) does the job. I admit this are somewhat contrived, and I agree that we won't lose generality, but I think it will narrow the range of hierarchies we can transition between atomically.
On 8/27/24 04:14, Jakub Kicinski wrote: > On Fri, 23 Aug 2024 09:51:24 +0200 Paolo Abeni wrote: >> On 8/23/24 02:43, Jakub Kicinski wrote: >>> On Tue, 20 Aug 2024 17:12:21 +0200 Paolo Abeni wrote: >>>> * Delegation >>>> >>>> A containers wants to limit the aggregate B/W bandwidth of 2 of the 3 >>>> queues it owns - the starting configuration is the one from the >>>> previous point: >>>> >>>> SPEC=Documentation/netlink/specs/net_shaper.yaml >>>> ./tools/net/ynl/cli.py --spec $SPEC \ >>>> --do group --json '{"ifindex":'$IFINDEX', >>>> "leaves": [ >>>> {"handle": {"scope": "queue", "id":'$QID1' }, >>>> "weight": '$W1'}, >>>> {"handle": {"scope": "queue", "id":'$QID2' }, >>>> "weight": '$W2'}], >>>> "root": { "handle": {"scope": "node"}, >>>> "parent": {"scope": "node", "id": 0}, >>> >>> In the delegation use case I was hoping "parent" would be automatic. >> >> Currently the parent is automatic/implicit when creating a node directly >> nested to the the netdev shaper. >> >> I now see we can use as default parent the current leaves' parent, when >> that is the same for all the to-be-grouped leaves. >> >> Actually, if we restrict the group operation to operate only on set of >> leaves respecting the above, I *guess* we will not lose generality and >> we could simplify a bit the spec. WDYT? > > I remember having a use case in mind where specifying parent would be > very useful. I think it may have been related to atomic changes. > I'm not sure if what I describe below is exactly that case... > > Imagine: > > Qx -{hierarchy}---\ > \{hierarchy}-- netdev > Q0-------P0\ SP----/ > Q1--\ RR-P1/ > Q2--/ > > Let's say we own queues 0,1,2 and want to remove the SP layer. > It's convenient to do: > > $node = get($SP-node) > group(leaves: [Q0, Q1, Q2], parent=$node.parent) > > And have the kernel "garbage collect" the old RR node and the old SP > node (since they will now have no children). We want to avoid the > situations where user space has to do complex transitions thru > states which device may not support (make sure Q1, Q2 have right prios, > delete old RR, now we have SP w/ 3 inputs, delete the SP, create a new > group). FTR, while updating the group() implementation to infer the root's parent handle in most cases, I stumbled upon a similar scenario. > For the case above we could technically identify the correct parent by > skipping the nodes which will be garbage collected later. I think that implementation would be quite non trivial/error prone, and I think making the new root's parent explicit would be more clear from user-space perspective. What I have now in my local tree is a group() implementation the inherits the newly created root's parent handle from the leaves, if all of them have the same parent prior to the group() invocation. Otherwise it requires the user to specify the root's parent handle. In any case, the user-specified root's parent handle value overrides the 'inherited'/guessed one. It will cover the above and will not require an explicit parent in most case. Would that be good enough? Thanks, Paolo
On Tue, 27 Aug 2024 09:54:52 +0200 Paolo Abeni wrote: > > For the case above we could technically identify the correct parent by > > skipping the nodes which will be garbage collected later. > > I think that implementation would be quite non trivial/error prone, and > I think making the new root's parent explicit would be more clear from > user-space perspective. > > What I have now in my local tree is a group() implementation the > inherits the newly created root's parent handle from the leaves, if all > of them have the same parent prior to the group() invocation. Otherwise > it requires the user to specify the root's parent handle. In any case, > the user-specified root's parent handle value overrides the > 'inherited'/guessed one. > > It will cover the above and will not require an explicit parent in most > case. Would that be good enough? Yes, that's great.