Re: [Linuxptp-devel] [PATCHv2 2/6] Refactor time stamp processing.

2015-03-25 Thread Miroslav Lichvar
On Wed, Mar 25, 2015 at 09:55:49AM +0100, Richard Cochran wrote: > > +int tsproc_update_delay(struct tsproc *tsp, tmv_t *delay) > > +int tsproc_update_offset(struct tsproc *tsp, tmv_t *offset) > > + if (!offset) > > + return 0; > > What is point of allowing 'offset' to be a null poin

Re: [Linuxptp-devel] [PATCHv2 2/6] Refactor time stamp processing.

2015-03-25 Thread Richard Cochran
On Wed, Mar 25, 2015 at 09:55:49AM +0100, Richard Cochran wrote: > > +int tsproc_update_delay(struct tsproc *tsp, tmv_t *delay) > > +{ > > + tmv_t raw_delay; > > + > > + if (!tsp->t1 || !tsp->t2 || !tsp->t3 || !tsp->t4) > > + return -1; > > Use tmv_zero() here ... Rather, tmv_is_zer

Re: [Linuxptp-devel] [PATCHv2 2/6] Refactor time stamp processing.

2015-03-25 Thread Richard Cochran
Few gripes, and a question... On Tue, Mar 17, 2015 at 11:28:21AM +0100, Miroslav Lichvar wrote: > +struct tsproc { > + /* Current ratio between remote and local clock frequency */ > + double clock_rate_ratio; > + > + /* Latest down measurement */ > + tmv_t t1, t2; > + /* Latest