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: <66746ac265e37_2bed87294ba@willemb.c.googlers.com.notmuch>
Date: Thu, 20 Jun 2024 13:45:38 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Eric Dumazet <edumazet@...gle.com>, 
 "David S . Miller" <davem@...emloft.net>, 
 Jakub Kicinski <kuba@...nel.org>, 
 Paolo Abeni <pabeni@...hat.com>
Cc: Ziwei Xiao <ziweixiao@...gle.com>, 
 Praveen Kaligineedi <pkaligineedi@...gle.com>, 
 Harshitha Ramamurthy <hramamurthy@...gle.com>, 
 Willem de Bruijn <willemb@...gle.com>, 
 Jeroen de Borst <jeroendb@...gle.com>, 
 Shailend Chand <shailend@...gle.com>, 
 netdev@...r.kernel.org, 
 eric.dumazet@...il.com, 
 Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net-next 6/6] net: ethtool: add the ability to run
 ethtool_[gs]et_rxnfc() without RTNL

Eric Dumazet wrote:
> For better scalability, drivers can prefer to implement their own locking schem
> (for instance one mutex per port or queue) instead of relying on RTNL.
> 
> This patch adds a new boolean field in ethtool_ops : rxnfc_parallel
> 
> Drivers can opt-in to this new behavior.
> 
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> ---
>  include/linux/ethtool.h |  2 ++
>  net/ethtool/ioctl.c     | 43 +++++++++++++++++++++++++++--------------
>  2 files changed, 31 insertions(+), 14 deletions(-)
> 
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index 6fd9107d3cc010dd2f1ecdb005c412145c461b6c..ee9b8054165361c9236186ff61f886e53cfa6b49 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -748,6 +748,7 @@ struct ethtool_rxfh_param {
>   *	error code or zero.
>   * @set_rxnfc: Set RX flow classification rules.  Returns a negative
>   *	error code or zero.
> + * @rxnfc_parallel: true if @set_rxnfc, @get_rxnfc and @get_rxfh do not need RTNL.
>   * @flash_device: Write a firmware image to device's flash memory.
>   *	Returns a negative error code or zero.
>   * @reset: Reset (part of) the device, as specified by a bitmask of
> @@ -907,6 +908,7 @@ struct ethtool_ops {
>  	int	(*get_rxnfc)(struct net_device *,
>  			     struct ethtool_rxnfc *, u32 *rule_locs);
>  	int	(*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *);
> +	bool	rxnfc_parallel;

Would it make sense to make this a bit, as there already are u32 bits
at the start of the struct, with a 29-bit gap?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ