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: <Z1yqANqrEGyvWboT@LQ3V64L9R2>
Date: Fri, 13 Dec 2024 13:41:20 -0800
From: Joe Damato <jdamato@...tly.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
	pabeni@...hat.com, almasrymina@...gle.com,
	amritha.nambiar@...el.com, sridhar.samudrala@...el.com
Subject: Re: [PATCH net 1/5] netdev: fix repeated netlink messages in queue
 dump

On Fri, Dec 13, 2024 at 07:22:40AM -0800, Jakub Kicinski wrote:
> The context is supposed to record the next queue do dump,

extremely minor nit: "next queue to dump" ?

[...]
 
> Fixes: 6b6171db7fc8 ("netdev-genl: Add netlink framework functions for queue")
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> CC: jdamato@...tly.com
> CC: almasrymina@...gle.com
> CC: amritha.nambiar@...el.com
> CC: sridhar.samudrala@...el.com
> ---
>  net/core/netdev-genl.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/net/core/netdev-genl.c b/net/core/netdev-genl.c
> index 9527dd46e4dc..9f086b190619 100644
> --- a/net/core/netdev-genl.c
> +++ b/net/core/netdev-genl.c
> @@ -488,24 +488,21 @@ netdev_nl_queue_dump_one(struct net_device *netdev, struct sk_buff *rsp,
>  			 struct netdev_nl_dump_ctx *ctx)
>  {
>  	int err = 0;
> -	int i;
>  
>  	if (!(netdev->flags & IFF_UP))
>  		return err;
>  
> -	for (i = ctx->rxq_idx; i < netdev->real_num_rx_queues;) {
> -		err = netdev_nl_queue_fill_one(rsp, netdev, i,
> +	for (; ctx->rxq_idx < netdev->real_num_rx_queues; ctx->rxq_idx++) {
> +		err = netdev_nl_queue_fill_one(rsp, netdev, ctx->rxq_idx,
>  					       NETDEV_QUEUE_TYPE_RX, info);
>  		if (err)
>  			return err;
> -		ctx->rxq_idx = i++;
>  	}
> -	for (i = ctx->txq_idx; i < netdev->real_num_tx_queues;) {
> -		err = netdev_nl_queue_fill_one(rsp, netdev, i,
> +	for (; ctx->txq_idx < netdev->real_num_tx_queues; ctx->txq_idx++) {
> +		err = netdev_nl_queue_fill_one(rsp, netdev, ctx->txq_idx,
>  					       NETDEV_QUEUE_TYPE_TX, info);
>  		if (err)
>  			return err;
> -		ctx->txq_idx = i++;
>  	}
>  
>  	return err;

Reviewed-by: Joe Damato <jdamato@...tly.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ