Re: [Linuxptp-devel] [PATCH v4 2/9] ts2phc: instantiate a full clock structure for every slave PHC
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
|
From: Vladimir O. <ol...@gm...> - 2021-11-15 14:20:14
|
On Mon, Nov 15, 2021 at 06:06:48AM -0800, Richard Cochran wrote:
> On Sat, Oct 09, 2021 at 05:11:53PM +0300, Vladimir Oltean wrote:
>
> > diff --git a/ts2phc.c b/ts2phc.c
> > index 67df5a532559..ca7684b314a4 100644
> > --- a/ts2phc.c
> > +++ b/ts2phc.c
> > @@ -7,9 +7,14 @@
> > * @note SPDX-License-Identifier: GPL-2.0+
> > */
> > #include <stdlib.h>
> > +#include <net/if.h>
> > +#include <sys/types.h>
> > +#include <unistd.h>
>
> Alphabetical order please.
>
> > +#include "clockadj.h"
> > #include "config.h"
> > #include "interface.h"
> > +#include "phc.h"
> > #include "print.h"
> > #include "ts2phc.h"
> > #include "version.h"
> > @@ -27,6 +32,80 @@ static void ts2phc_cleanup(struct ts2phc_private *priv)
> > config_destroy(priv->cfg);
> > }
> >
> > +static struct servo *servo_add(struct ts2phc_private *priv, struct clock *clock)
> > +{
>
> This really wants a prefix in the name, like ts2phc_add_servo();
Ok.
> > +struct clock {
>
> How about ts2phc_clock ?
I was thinking about doing that, but I wanted to hear it from you first.
> > + LIST_ENTRY(clock) list;
> > + LIST_ENTRY(clock) dst_list;
> > + clockid_t clkid;
> > + int phc_index;
> > + int state;
> > + int new_state;
> > + struct servo *servo;
> > + enum servo_state servo_state;
> > + char *name;
> > + bool no_adj;
> > +};
|