On Tue, Feb 21, 2017 at 5:38 PM, Bruce Richardson <bruce.richard...@intel.com> wrote: > On Tue, Feb 21, 2017 at 05:12:12PM +0100, Jan Blunck wrote: >> >> Access through PMD specific function pointers should be relatively >> fast on access. Modern architecture optimize that use case well >> enough. >> > The cost of doing a function call per packet to access data starts to > add up very, very fast. For the app, once the data is written to the > mbuf, it should be in the L1 cache, giving very fast access to it in a > few cycles. However, if a function call has to be made in order to do > the read, that makes the read of that field many times more expensive. >
Exactly. Right now the timestamp normalization is done before writing to each mbuf. Timestamps are usually read at most once ... if at all. If you look at the analysis use cases they are read to be written to persistent storage. My impression is we optimize this on the wrong end.