lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240329081804.1b7de830@kernel.org>
Date: Fri, 29 Mar 2024 08:18:04 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Heng Qi <hengqi@...ux.alibaba.com>
Cc: netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, Vladimir Oltean <vladimir.oltean@....com>, "David S.
 Miller" <davem@...emloft.net>, Jason Wang <jasowang@...hat.com>, "Michael
 S. Tsirkin" <mst@...hat.com>, vadim.fedorenko@...ux.dev, Alexander Lobakin
 <aleksander.lobakin@...el.com>, Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
Subject: Re: [PATCH net-next v2 2/2] virtio-net: support dim profile
 fine-tuning

On Fri, 29 Mar 2024 16:56:12 +0800 Heng Qi wrote:
> > About the uAPI - please make sure you add the new stuff to
> > Documentation/netlink/specs/ethtool.yaml
> > see: https://docs.kernel.org/next/userspace-api/netlink/specs.html
> >
> > And break up the attributes, please, no raw C structs of this nature:
> >
> > +	return nla_put(skb, attr_type, sizeof(struct dim_cq_moder) *
> > +		       NET_DIM_PARAMS_NUM_PROFILES, profs);
> >
> > They are hard to extend.  
> 
> Sorry, I don't seem to get your point, why does this make extending hard?

It's not possible to make some fields optional later on.
It's also possible that user space will make assumptions about the size
of this struct so we won't be able to add fields.

So it's preferred to render the C struct members as individual netlink 
attributes. Look around ethtool netlink, you'll see there are no
structs dumped.

> Are you referring to specifying ETHTOOL_A_COALESCE_RX_EQE_PROFILE
> as a nested array, i.e. having each element explicitly have an attr 
> name? or passing the u16 pointer and length as arguments?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ