Wednesday, September 12, 2018 8:33 PM > Can you please explain the use case in detail?
If the ptpstack is started with a set of ports and during operational time ports are added and removed. If the stack by some reason is restarted, the clockIdentity needs to be the same even if the port that generated the first clockIdentity is no longer configured in the stack. The generate function does not make sure of that. Wednesday, September 12, 2018 3:07 AM > Man page updates? And it should probably make sure that if the clock identify > is all 0s we will autogenerate it. Yes, manpage should also be updated. And there is a check for all 0s, do you want the check in another way? > + if (strcmp(config_get_string(config, NULL, "clockIdentity"), > + "000000.0000.000000") == 0) { > + if (generate_clock_identity(&c->dds.clockIdentity, > + iface->name)) { > + pr_err("failed to generate a clock identity"); > + return NULL; > + } > + } else { > + if (str2cid(config_get_string(config, NULL, "clockIdentity"), > + &c->dds.clockIdentity)) { > + pr_err("failed to set clock identity"); > + return NULL; > + } /anders _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel