On Tue, Mar 17, 2015 at 11:28:20AM +0100, Miroslav Lichvar wrote:

> @@ -1623,6 +1627,7 @@ static void process_delay_resp(struct port *p, struct 
> ptp_message *m)
>       struct delay_req_msg *req;
>       struct delay_resp_msg *rsp = &m->delay_resp;
>       struct PortIdentity master;
> +     tmv_t c3, t3, t4, t4c;
>  
>       if (!p->delay_req)
>               return;
> @@ -1639,8 +1644,12 @@ static void process_delay_resp(struct port *p, struct 
> ptp_message *m)
>       if (!pid_eq(&master, &m->header.sourcePortIdentity))
>               return;
>  
> -     clock_path_delay(p->clock, p->delay_req->hwts.ts, m->ts.pdu,
> -                      m->header.correction);
> +     c3 = correction_to_tmv(m->header.correction);
> +     t3 = timespec_to_tmv(p->delay_req->hwts.ts);
> +     t4 = timestamp_to_tmv(m->ts.pdu);
> +     t4c = tmv_sub(t4, c3);
> +
> +     clock_path_delay(p->clock, t3, t4c);

Gripe: t4c doesn't deserve to be a separate own variable.  Just having
t4 = tmv_sub(t4, c3) is clear enough.

Thanks,
Richard



------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to