[dpdk-dev] [PATCH 12/15] app/testpmd: switch timestamp to dynamic mbuf field

Andrew Rybchenko andrew.rybchenko at oktetlabs.ru
Thu Oct 29 11:52:45 CET 2020


On 10/29/20 1:43 PM, Thomas Monjalon wrote:
> 29/10/2020 11:20, Andrew Rybchenko:
>> On 10/29/20 12:27 PM, Thomas Monjalon wrote:
>>> The mbuf timestamp is moved to a dynamic field
>>> in order to allow removal of the deprecated static field.
>>> The related mbuf flag is also replaced.
>>>
>>> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
>>> ---
>>> --- a/app/test-pmd/util.c
>>> +++ b/app/test-pmd/util.c
>>> +static inline bool
>>> +is_timestamp_enabled(const struct rte_mbuf *mbuf)
>>> +{
>>> +	static uint64_t timestamp_rx_dynflag;
>>> +
>>> +	int timestamp_rx_dynflag_offset;
>>> +
>>> +	if (timestamp_rx_dynflag == 0) {
>>> +		timestamp_rx_dynflag_offset = rte_mbuf_dynflag_lookup(
>>> +				RTE_MBUF_DYNFLAG_RX_TIMESTAMP_NAME, NULL);
>>
>> If the flag is not registered, it will try to lookup on every
>> call. I'm not sure that it is good.
> 
> I don't see the problem.
> It is a dump in a test application.
> The idea is to have a fresh dump whatever was updated recently.

OK, makes sense.




More information about the dev mailing list