On Fri, Feb 17, 2017 at 3:17 PM, Olivier Matz <olivier.m...@6wind.com> wrote:
>
> Sorry, I don't really get your point. My comprehension of the timestamp
> usage in a PMD is as following:
>
> rx_burst(struct rxq *rxq, ...)
> {
>         unsigned long factor = rxq->timestamp_factor;
>         unsigned port = rxq->port;
>
>         for each hw_desc {
>                 m = rte_pktmbuf_alloc(rxq->pool);
>                 m->len = hw_desc->len;
>                 m->port = port;
>                 m->ol_flags =
>                 ...
>                 m->timestamp = hw_desc->timestamp * factor;
>         }
>         ...
> }
>
> In that case, I think it deserves to be in the 1st cache line.
>

Timestamps are non-functional data. I believe they don't deserve to be
data normalized.

It would be beneficial to normalize the access of non-functional data.
That would require some kind of extension or feature flags, e.g. like
some uverb structures support extensions. This would allow the NICs
that support timestamps to do the minimal amount of work during burst
and defer data normalization to the time of access. That would also
safe everyone from wasting 64bit in the first cacheline in case
timestamps are not supported or unused.

Reply via email to