Subject: Re: [PATCH net-next v14 03/13] rtase: Implement the rtase_down function

From: Jakub Kicinski <[email-masked]>
Date: Tue, 12 Dec 2023 11:27:35 -0800

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);
> +	}