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: <20250218175700.4493dc49@kernel.org>
Date: Tue, 18 Feb 2025 17:57:00 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Sean Anderson <sean.anderson@...ux.dev>
Cc: Nicolas Ferre <nicolas.ferre@...rochip.com>, Claudiu Beznea
 <claudiu.beznea@...on.dev>, netdev@...r.kernel.org, "David S . Miller"
 <davem@...emloft.net>, Andrew Lunn <andrew+netdev@...n.ch>,
 linux-kernel@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>, Eric Dumazet
 <edumazet@...gle.com>
Subject: Re: [PATCH net-next] net: cadence: macb: Implement BQL

On Fri, 14 Feb 2025 16:16:43 -0500 Sean Anderson wrote:
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 48496209fb16..63c65b4bb348 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -1081,6 +1081,9 @@ static void macb_tx_error_task(struct work_struct *work)
>  						      tx_error_task);
>  	bool			halt_timeout = false;
>  	struct macb		*bp = queue->bp;
> +	u32			queue_index = queue - bp->queues;

nit: breaking reverse xmas tree here

> +	u32			packets = 0;
> +	u32			bytes = 0;
>  	struct macb_tx_skb	*tx_skb;
>  	struct macb_dma_desc	*desc;
>  	struct sk_buff		*skb;


> @@ -3019,6 +3033,7 @@ static int macb_close(struct net_device *dev)
>  	netif_tx_stop_all_queues(dev);
>  
>  	for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) {
> +		netdev_tx_reset_queue(netdev_get_tx_queue(dev, q));
>  		napi_disable(&queue->napi_rx);
>  		napi_disable(&queue->napi_tx);

I think you should reset after napi_disable()? 
Lest NAPI runs after the reset and tries to complete on an empty queue..
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ