RE: [EXT] Re: [PATCH v3 1/1] net: fec: add initial XDP support

From: Shenwei Wang
Date: Thu Nov 03 2022 - 10:53:58 EST




> -----Original Message-----
> From: Paolo Abeni <pabeni@xxxxxxxxxx>
> > + if (unlikely(index < 0))
> > + index = 0;
> > +
> > + while (index >= fep->num_tx_queues)
> > + index -= fep->num_tx_queues;
>
> Not a big deal, but I think kind of optimizations are not worthy and potentially
> dangerous since late '90 ;)
>
> You could consider switching to a simpler '%', but IMHO it's not blocking.

Agree. Will optimize it in next patch of adding xdp statistics.

Thanks,
Shenwei

>
>
> Cheers,
>
> Paolo