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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240328094847.1af51a8d@kernel.org>
Date: Thu, 28 Mar 2024 09:48:47 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
Cc: Heng Qi <hengqi@...ux.alibaba.com>, <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>
Subject: Re: [PATCH net-next v2 2/2] virtio-net: support dim profile
 fine-tuning

On Thu, 28 Mar 2024 10:12:10 +0800 Xuan Zhuo wrote:
> For netdim, I think profiles are an aspect. In many cases, this can solve many
> problems.

Okay, but then you should try harder to hide all the config in the core.
The driver should be blissfully unaware that the user is changing 
the settings. It should just continue calling net_dim_get_*moderation().

You can create proper dim_init(), dim_destroy() functions for drivers
to call, instead of doing

	INIT_WORK(&bla->dim.work, my_driver_do_dim_work);

directly. In dim_init() you can hook the dim structure to net_device
and then ethtool code can operation on it without driver involvement.

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ