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: <20250722141426.GK2459@horms.kernel.org>
Date: Tue, 22 Jul 2025 15:14:26 +0100
From: Simon Horman <horms@...nel.org>
To: Dong Yibo <dong100@...se.com>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, corbet@....net,
	gur.stavi@...wei.com, maddy@...ux.ibm.com, mpe@...erman.id.au,
	danishanwar@...com, lee@...ger.us, gongfan1@...wei.com,
	lorenzo@...nel.org, geert+renesas@...der.be,
	Parthiban.Veerasooran@...rochip.com, lukas.bulwahn@...hat.com,
	alexanderduyck@...com, richardcochran@...il.com,
	netdev@...r.kernel.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 14/15] net: rnpgbe: Add base rx function

On Mon, Jul 21, 2025 at 07:32:37PM +0800, Dong Yibo wrote:
> Initialize rx clean function.
> 
> Signed-off-by: Dong Yibo <dong100@...se.com>

...

> diff --git a/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_lib.c b/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_lib.c

...

> @@ -299,12 +707,27 @@ static int rnpgbe_poll(struct napi_struct *napi, int budget)
>  	struct mucse_q_vector *q_vector =
>  		container_of(napi, struct mucse_q_vector, napi);
>  	struct mucse *mucse = q_vector->mucse;
> +	int per_ring_budget, work_done = 0;
>  	bool clean_complete = true;
>  	struct mucse_ring *ring;
> -	int work_done = 0;
> +	int cleaned_total = 0;

cleaned_total is set but otherwise unused in this function.

Flagged by Clang 20.1.8 builds with KCFLAGS=-Wunused-but-set-variable.

>  
>  	mucse_for_each_ring(ring, q_vector->tx)
>  		clean_complete = rnpgbe_clean_tx_irq(q_vector, ring, budget);
> +	if (q_vector->rx.count > 1)
> +		per_ring_budget = max(budget / q_vector->rx.count, 1);
> +	else
> +		per_ring_budget = budget;
> +
> +	mucse_for_each_ring(ring, q_vector->rx) {
> +		int cleaned = 0;
> +
> +		cleaned = rnpgbe_clean_rx_irq(q_vector, ring, per_ring_budget);
> +		work_done += cleaned;
> +		cleaned_total += cleaned;
> +		if (cleaned >= per_ring_budget)
> +			clean_complete = false;
> +	}
>  
>  	if (!netif_running(mucse->netdev))
>  		clean_complete = true;

...

> @@ -871,6 +1323,8 @@ static int rnpgbe_setup_rx_resources(struct mucse_ring *rx_ring,
>  	memset(rx_ring->desc, 0, rx_ring->size);
>  	rx_ring->next_to_clean = 0;
>  	rx_ring->next_to_use = 0;
> +	if (mucse_alloc_page_pool(rx_ring)

There is a trailing ')' missing from the line above.

> +		goto err;
>  
>  	return 0;
>  err:

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ