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: <aAfCIq6ktXXCOp-9@mini-arch>
Date: Tue, 22 Apr 2025 09:21:54 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
	pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
	donald.hunter@...il.com, sdf@...ichev.me, almasrymina@...gle.com,
	dw@...idwei.uk, asml.silence@...il.com, ap420073@...il.com,
	jdamato@...tly.com, dtatulea@...dia.com, michael.chan@...adcom.com
Subject: Re: [RFC net-next 18/22] net: wipe the setting of deactived queues

On 04/21, Jakub Kicinski wrote:
> Clear out all settings of deactived queues when user changes
> the number of channels. We already perform similar cleanup
> for shapers.
> 
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
>  net/core/dev.h           |  2 ++
>  net/core/dev.c           |  5 +++++
>  net/core/netdev_config.c | 13 +++++++++++++
>  3 files changed, 20 insertions(+)
> 
> diff --git a/net/core/dev.h b/net/core/dev.h
> index e0d433fb6325..4cdd8ac7df4f 100644
> --- a/net/core/dev.h
> +++ b/net/core/dev.h
> @@ -101,6 +101,8 @@ void __netdev_queue_config(struct net_device *dev, int rxq,
>  			   struct netdev_queue_config *qcfg, bool pending);
>  int netdev_queue_config_revalidate(struct net_device *dev,
>  				   struct netlink_ext_ack *extack);
> +void netdev_queue_config_update_cnt(struct net_device *dev, unsigned int txq,
> +				    unsigned int rxq);
>  
>  /* netdev management, shared between various uAPI entry points */
>  struct netdev_name_node {
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 7930b57d1767..c1f9b6ce6500 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -3188,6 +3188,8 @@ int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq)
>  		if (dev->num_tc)
>  			netif_setup_tc(dev, txq);
>  
> +		netdev_queue_config_update_cnt(dev, txq,
> +					       dev->real_num_rx_queues);
>  		net_shaper_set_real_num_tx_queues(dev, txq);
>  
>  		dev_qdisc_change_real_num_tx(dev, txq);
> @@ -3234,6 +3236,9 @@ int netif_set_real_num_rx_queues(struct net_device *dev, unsigned int rxq)
>  						  rxq);
>  		if (rc)
>  			return rc;
> +
> +		netdev_queue_config_update_cnt(dev, dev->real_num_tx_queues,
> +					       rxq);
>  	}
>  
>  	dev->real_num_rx_queues = rxq;
> diff --git a/net/core/netdev_config.c b/net/core/netdev_config.c
> index ede02b77470e..c5ae39e76f40 100644
> --- a/net/core/netdev_config.c
> +++ b/net/core/netdev_config.c
> @@ -64,6 +64,19 @@ int netdev_reconfig_start(struct net_device *dev)
>  	return -ENOMEM;
>  }
>  
> +void netdev_queue_config_update_cnt(struct net_device *dev, unsigned int txq,
> +				    unsigned int rxq)
> +{

Presumably txq argument is here for some potential future use cases?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ