30/10/2020 13:41, Jerin Jacob:
> On Thu, Oct 29, 2020 at 5:22 PM Slava Ovsiienko <viachesl...@nvidia.com> 
> wrote:
> > From: Andrew Rybchenko <andrew.rybche...@oktetlabs.ru>
> >
> > Just five cents -  exporting the offset (making it global) might have side 
> > effect impacting the performance.
> 
> I agree with Slava. The offset value should be stored in the PMD structure.
> IMO, We can have an ethdev API to get the offset and store it in PMD's
> fastpath structures in the slow path
> to use in fastpath.
> 
> > Offset might be located in some memory sharing the cacheline with some 
> > other variables.
> > If these variables are writable and are being updated frequently - we might 
> > get the cache contention.
> > I'd prefer to keep all dynamic offsets In the PMD and entirely control 
> > memory allocation
> > attributes for these ones. Hence, exporting is OK, but practical usage in 
> > datapath is questionable.

Yes this is a major design point:
the field offsets are preferably stored in a hot cache line
which depends on the driver, library or application context.



Reply via email to