On Tue, 23 Jun 2026 10:10:11 -0400
Dawid Wesierski <[email protected]> wrote:

> +/*
> + * Compatibility wrapper: captures current TSC (converted at write time).
> + * Equivalent to rte_pcapng_copy_ts(..., 0).
> + */
> +RTE_EXPORT_SYMBOL(rte_pcapng_copy)
> +struct rte_mbuf *
> +rte_pcapng_copy(uint16_t port_id, uint32_t queue,
> +             const struct rte_mbuf *md,
> +             struct rte_mempool *mp,
> +             uint32_t length,
> +             enum rte_pcapng_direction direction,
> +             const char *comment)
> +{
> +     return rte_pcapng_copy_ts(port_id, queue, md, mp, length, direction,
> +                               comment, 0);
> +}
> +
> +/*
> + * Convert a TSC value to nanoseconds since the Unix epoch using the
> + * calibrated clock of the capture file. Uses the same pre-computed
> + * reciprocal multiplier as the internal write path (no integer division).
> + */
> +RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pcapng_tsc_to_ns, 26.07)
> +uint64_t
> +rte_pcapng_tsc_to_ns(const rte_pcapng_t *self, uint64_t tsc)
> +{
> +     return tsc_to_ns_epoch(&self->clock, tsc);
> +}

Why not just use function versioning on rte_pcapng_copy() to add new parameter?

Also should add a coverage test app/test/test_pcapng.c

Reply via email to