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

- From: Paolo Abeni \<pabeni@redhat.com\>
- Date: 2024-07-02 14:22:07 
- List: netdev
- Page: https://ratatoskr.run/netdev/2024/07/11299559
- Thread: https://ratatoskr.run/netdev/2024/06/11299230/t.md

```text
On Mon, 2024-07-01 at 19:54 -0700, Jakub Kicinski wrote:
> On Mon, 01 Jul 2024 12:14:32 +0200 Paolo Abeni wrote:
> > > > +      -
> > > > +        name: shapers
> > > > +        type: nest
> > > > +        multi-attr: true
> > > > +        nested-attributes: ns-info  
> > > 
> > > How do shapers differ from shaping attrs in this scope? :S  
> > 
> > the set() operation must configure multiple shapers with a single
> > command - to allow the 'atomic configuration changes' need for Andrew's
> > use-case.
> > 
> > Out-of-sheer ignorance on my side, the above was the most straight-
> > forward way to provide set() with an array of shapers.
> > 
> > Do you mean there are better way to achieve the goal, or "just" that
> > the documentation here is missing and _necessary_?
> 
> I see, I had a look at patch 2 now.
> But that's really "Andrew's use-case" it doesn't cover deletion, right?
> Sorry that I don't have a perfect suggestion either but it seems like
> a half-measure. It's a partial support for transactions. If we want
> transactions we should group ops like nftables. Have normal ops (add,
> delete, modify) and control ops (start, commit) which clone the entire
> tree, then ops change it, and commit presents new tree to the device.

Yes, it does not cover deletion _and_ update/add/move within the same
atomic operation.

Still any configuration could be reached from default/initial state
with set(<possibly many shapers>). Additionally, given any arbitrary
configuration, the default/initial state could be restored with a
single delete(<possibly many handlers>).

The above covers any possible limitation enforced by the H/W, not just
the DSA use-case.

Do you have a strong feeling for atomic transactions from any arbitrary
state towards any other? If so, I’d like to understand why?

Dealing with transactions allowing arbitrary any state <> any state
atomic changes will involve some complex logic that seems better
assigned to user-space.

Thanks,

Paolo

```
