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

JustinLai0215
2023-12-14T12:54:33Z

>
> 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.

Thanks for your suggestion, I will modify it.
>
> > + netif_carrier_off(dev);
> > +
> > + for (i = 0; i < tp->int_nums; i++) {
> > + ivec = &tp->int_vector[i];
> > + synchronize_irq(ivec->irq);
>
> Why?

This is redundant code, I will remove it.
>
> > + /* wait for any pending NAPI task to complete */
> > + napi_disable(&ivec->napi);
> > + }