Signed-off-by: Michael Brown <[email protected]>
---
clock.c | 2 +-
tsproc.c | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/clock.c b/clock.c
index 7af87fc..e9e5d74 100644
--- a/clock.c
+++ b/clock.c
@@ -419,7 +419,7 @@ static int clock_management_fill_response(struct clock *c,
struct port *p,
break;
case TLV_TIME_STATUS_NP:
tsn = (struct time_status_np *) tlv->data;
- tsn->master_offset = c->master_offset;
+ tsn->master_offset = tmv_to_nanoseconds(c->master_offset);
tsn->ingress_time = tmv_to_nanoseconds(c->ingress_ts);
tsn->cumulativeScaledRateOffset =
(Integer32) (c->status.cumulativeScaledRateOffset +
diff --git a/tsproc.c b/tsproc.c
index b50c8e5..91bae37 100644
--- a/tsproc.c
+++ b/tsproc.c
@@ -134,10 +134,11 @@ tmv_t get_raw_delay(struct tsproc *tsp)
delay = tmv_div(tmv_add(t23, t41), 2);
if (delay < 0) {
- pr_debug("negative delay %10" PRId64, delay);
+ pr_debug("negative delay %10" PRId64,
+ tmv_to_nanoseconds(delay));
pr_debug("delay = (t2 - t3) * rr + (t4 - t1)");
- pr_debug("t2 - t3 = %+10" PRId64, t23);
- pr_debug("t4 - t1 = %+10" PRId64, t41);
+ pr_debug("t2 - t3 = %+10" PRId64, tmv_to_nanoseconds(t23));
+ pr_debug("t4 - t1 = %+10" PRId64, tmv_to_nanoseconds(t41));
pr_debug("rr = %.9f", tsp->clock_rate_ratio);
}
@@ -156,7 +157,8 @@ int tsproc_update_delay(struct tsproc *tsp, tmv_t *delay)
tsp->filtered_delay_valid = 1;
pr_debug("delay filtered %10" PRId64 " raw %10" PRId64,
- tsp->filtered_delay, raw_delay);
+ tmv_to_nanoseconds(tsp->filtered_delay),
+ tmv_to_nanoseconds(raw_delay));
if (!delay) {
return 0;
--
2.9.5
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel