On Fri, 2026-05-15 at 16:40 +0000, Arthur Kiyanovski wrote:
> Add support for testing the new PTP_SYS_OFFSET_EXTENDED_ATTRS and
> PTP_SYS_OFFSET_PRECISE_ATTRS ioctls in the testptp utility.
> 
> New command-line options:
>   -a: Get extended offset with attributes (error_bound, clock_status,
>       timescale)
>   -A: Get precise cross-timestamp with attributes
> 
> These options allow testing and validation of PHC devices that provide
> clock quality information alongside timestamps.
> 
> Also display the new clock_attrs capability in the -c output, and
> update print_system_timestamp to print unrecognized clock types instead
> of silently dropping them.
> 
> Signed-off-by: Amit Bernstein <[email protected]>
> Signed-off-by: Arthur Kiyanovski <[email protected]>


...

> +                     printf("extended timestamp request returned %d 
> samples\n",
> +                            getextendedattrs);
> +
> +                     for (i = 0; i < getextendedattrs; i++) {
> +                             print_system_timestamp(i, ext_clockid,
> +                                                    soea->ts[i][0].pct.sec,
> +                                                    soea->ts[i][0].pct.nsec,
> +                                                    "before");
> +
> +                             printf("            phc time: %lld.%09u, error 
> bound: %u, clock status: %u, timescale: %u\n",
> +                                    soea->ts[i][1].pct.sec,
> +                                    soea->ts[i][1].pct.nsec,
> +                                    soea->ts[i][1].att.error_bound,
> +                                    soea->ts[i][1].att.status,
> +                                    soea->ts[i][1].att.timescale);
> +
> +                             if (soea->ts[i][1].att.counter_id)
> +                                     printf("            counter: %llu (id: 
> %u)\n",
> +                                            (unsigned long 
> long)soea->ts[i][1].att.counter_value,
> +                                            soea->ts[i][1].att.counter_id);
> +
> +                             print_system_timestamp(i, ext_clockid,
> +                                                    soea->ts[i][2].pct.sec,
> +                                                    soea->ts[i][2].pct.nsec,
> +                                                    "after");
> +                     }
> +             }

Again I want to see the counter for the sandwiching values [0] and [2]
not just [1]. But other than that,

Reviewed-by: David Woodhouse <[email protected]>

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to