Subject: Re: [PATCH net v1 1/2] netlink: let len field used to parse type-not-care nested attrs

From: Leon Romanovsky <[email-masked]>
Date: Tue, 1 Aug 2023 22:49:49 +0300

On Tue, Aug 01, 2023 at 10:57:26AM -0700, Jakub Kicinski wrote:
> On Tue, 1 Aug 2023 11:11:17 +0300 Leon Romanovsky wrote:
> > IMHO, you are lowering too much the separation line between simple vs.
> > advanced use cases. 
> > 
> > I had no idea that my use-case of passing nested netlink array is counted
> > as advanced usage.
> 
> Agreed, that's a fair point. I'm guessing it was inspired by the
> ethtool stats? (Which in hindsight were a mistake on my part.)

I don't remember which part of kernel can be blamed for it. :)

> 
> For the longest time there was no docs or best practices for netlink.
> We have the documentation and more infrastructure in place now.
> I hope if you wrote the code today the distinction would have been
> clearer.
> 
> If we start adding APIs for various one-(two?)-offs from the past
> we'll never dig ourselves out of the "no idea what's the normal use
> of these APIs" hole..

I agree with this sentence, just afraid that it is unrealistic goal, due
to extensive flexibility in netlink UAPI toward user-space, which allows
you to shoot yourself in the foot without even noticing it.

Thanks