[PATCH V2] ethdev_trace.h: Update the trace point function when _TIME_BITS=64

Changqing Li changqing.li at windriver.com
Sun Apr 27 04:06:07 CEST 2025


On 4/24/25 02:00, Stephen Hemminger wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Tue, 22 Apr 2025 20:29:56 +0800
> <changqing.li at windriver.com>  wrote:
>
>> +#if defined(_TIME_BITS) && _TIME_BITS == 64
>>   RTE_TRACE_POINT(
>>        rte_eth_trace_timesync_write_time,
>>        RTE_TRACE_POINT_ARGS(uint16_t port_id, const struct timespec *time,
>>                int ret),
>>        rte_trace_point_emit_u16(port_id);
>> +     rte_trace_point_emit_u64(time->tv_sec);
>> +     rte_trace_point_emit_long(time->tv_nsec);
>> +     rte_trace_point_emit_int(ret);
>> +)
>> +#else
>> +RTE_TRACE_POINT(
>> +     rte_eth_trace_timesync_write_time,
>> +     RTE_TRACE_POINT_ARGS(uint16_t port_id, const struct timespec *time,
>> +       int ret),
>> +     rte_trace_point_emit_u16(port_id);
>>        rte_trace_point_emit_size_t(time->tv_sec);
>>        rte_trace_point_emit_long(time->tv_nsec);
>>        rte_trace_point_emit_int(ret);
>>   )
>> +#endif
> No. Do not start adding #ifdef to trace points.
> Instead, add new hook rte_trace_point_emit_time_t and that can handle
> any ABI changes like this.

Hi, Stephen

Thanks,  I will try to add this.

>
> Best to wait until 25.11 release since could be ABI change.

Do you mean I should not send V3 patch? Send the patch after 25.11 is 
release?

Regards

Changqing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20250427/9b358ce9/attachment-0001.htm>


More information about the dev mailing list