On Fri, Aug 05, 2022 at 07:56:11PM +0300, Vladimir Oltean wrote:

> Can't I just delete "case PS_INITIALIZING:" ... "case PS_GRAND_MASTER:"
> since I have to put "default:" anyway (we may get arbitrary input over
> the management messages)?

sure
 
> I'm also wondering if PS_PRE_MASTER and PS_UNCALIBRATED (which are
> transient states) couldn't be treated as PS_DISABLED too (as an
> admittedly unsolicited change).

makes sense

> Also, I'd like to share this helper between phc2sys and ts2phc.
> Is fsm.{c,h} a good place to put it?

how about util.c ?

> The problem is that, even though the logic is identical, the data
> structures are not ("struct clock" vs "struct ts2phc_clock",
> "struct port" vs "struct ts2phc_port").

oh, I guess we would need embedded shared struct with the common fields.
 
> I could probably add micro helper blocks to pmc_agent.c like
> pmc_agent_wait_ptp4l() and pmc_agent_enumerate_port_properties(), the
> latter having an int (*cb) for each MID_PORT_PROPERTIES_NP response.
> Is that in line with what you're thinking?

I was hoping for something more elegant.  Just leave it as is for now.

Thanks,
Richard



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to