[Intel-wired-lan] [PATCH 7/9] igc: Add support for XDP_TX action

Andre Guedes andre.guedes at intel.com
Thu Oct 22 18:04:55 UTC 2020


Hi Maciej,

Quoting Maciej Fijalkowski (2020-10-22 03:10:03)
> > > > +
> > > > +     buffer->next_to_watch = desc;
> > > > +
> > > > +     ring->next_to_use = (ring->next_to_use + 1) % ring->count;
> > > 
> > > Please avoid modulos.
> > 
> > Sure, I'll do it. Just out of curiosity, why modulo operation should be
> > avoided?
> 
> Just because it's slow and you're in fast path :p but you can take it as a
> suggestion.

Thanks, it makes sense. Also, looking at other Intel drivers, they handle
wrapping with an if-clause. I'll do the same here.

Cheers,
Andre


More information about the Intel-wired-lan mailing list