[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 12 Dec 2023 11:27:35 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Justin Lai <justinlai0215@...ltek.com>
Cc: <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>, <andrew@...n.ch>,
<pkshih@...ltek.com>, <larry.chiu@...ltek.com>
Subject: Re: [PATCH net-next v14 03/13] rtase: Implement the rtase_down
function
On Fri, 8 Dec 2023 17:47:23 +0800 Justin Lai wrote:
> + netif_stop_queue(dev);
You most likely want to stop the napi before you call this.
Otherwise NAPI can do some clean up and restart the queue.
> + /* give a racing hard_start_xmit a few cycles to complete */
> + synchronize_rcu();
Call netif_tx_disable() instead of stop_queue(), it takes the tx lock
so you don't have to worry about in-flight packets.
> + netif_carrier_off(dev);
> +
> + for (i = 0; i < tp->int_nums; i++) {
> + ivec = &tp->int_vector[i];
> + synchronize_irq(ivec->irq);
Why?
> + /* wait for any pending NAPI task to complete */
> + napi_disable(&ivec->napi);
> + }
Powered by blists - more mailing lists