DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: <changqing.li@windriver.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH V2] ethdev_trace.h: Update the trace point function when _TIME_BITS=64
Date: Wed, 23 Apr 2025 11:00:52 -0700	[thread overview]
Message-ID: <20250423110052.1b89ad1e@hermes.local> (raw)
In-Reply-To: <20250422122956.1217418-1-changqing.li@windriver.com>

On Tue, 22 Apr 2025 20:29:56 +0800
<changqing.li@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.

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

      reply	other threads:[~2025-04-23 18:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22 12:29 changqing.li
2025-04-23 18:00 ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250423110052.1b89ad1e@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=changqing.li@windriver.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).