On Fri, Jun 03, 2022 at 05:00:24PM +0530, SyncMonk Technologies wrote:
> @@ -1996,8 +1996,10 @@ static void handle_state_decision_event(struct clock
> *c)
> if (c->sanity_check)
> clockcheck_reset(c->sanity_check);
> tsproc_reset(c->tsproc, 1);
> - if (!tmv_is_zero(c->initial_delay))
> + if (!tmv_is_zero(c->initial_delay) || (best &&
> + port_delay_mechanism(best->port) == DM_NO_MECHANISM)) {
Can you please explain what this extra test accomplishes?
> tsproc_set_delay(c->tsproc, c->initial_delay);
> + }
> c->ingress_ts = tmv_zero();
> c->path_delay = c->initial_delay;
> c->master_local_rr = 1.0;
> @@ -1195,7 +1195,7 @@ int port_set_announce_tmo(struct port *p)
>
> int port_set_delay_tmo(struct port *p)
> {
> - if (p->inhibit_delay_req) {
> + if (p->inhibit_delay_req || p->delayMechanism == DM_NO_MECHANISM) {
No need for an extra test here. Just let DM_NO_MECHANISM select
inhibit_delay_req during port initialization.
> return 0;
> }
>
> @@ -2031,7 +2031,10 @@ static int process_delay_req(struct port *p, struct
> ptp_message *m)
> return 0;
> }
>
> - if (p->delayMechanism == DM_P2P) {
> + if (p->delayMechanism == DM_NO_MECHANISM) {
> + pr_warning("port %hu: delay request not supported", portnum(p));
Please remove this. DM_NO_MECHANISM doesn't make any sense on the
server side. If a node receives a delay request, then it aught to
answer with a reply.
DM_NO_MECHANISM is solely about the client.
> + return 0;
> + } else if (p->delayMechanism == DM_P2P) {
> pr_warning("%s: delay request on P2P port", p->log_name);
> return 0;
> }
> @@ -43,7 +43,8 @@ static void usage(char *progname)
> " Delay Mechanism\n\n"
> " -A Auto, starting with E2E\n"
> " -E E2E, delay request-response (default)\n"
> - " -P P2P, peer delay mechanism\n\n"
> + " -P P2P, peer delay mechanism\n"
> + " -N NO_MECHANISM, no mechanism\n\n"
Please remove this. We a not adding any more command line options.
> " Network Transport\n\n"
> " -2 IEEE 802.3\n"
> " -4 UDP IPV4 (default)\n"
> @@ -89,7 +90,7 @@ int main(int argc, char *argv[])
> /* Process the command line arguments. */
> progname = strrchr(argv[0], '/');
> progname = progname ? 1+progname : argv[0];
> - while (EOF != (c = getopt_long(argc, argv, "AEP246HSLf:i:p:sl:mqvh",
> + while (EOF != (c = getopt_long(argc, argv, "AEPN246HSLf:i:p:sl:mqvh",
ditto
> opts, &index))) {
> switch (c) {
> case 0:
> @@ -108,6 +109,11 @@ int main(int argc, char *argv[])
> if (config_set_int(cfg, "delay_mechanism", DM_P2P))
> goto out;
> break;
> + case 'N':
> + if (config_set_int(cfg,
> + "delay_mechanism", DM_NO_MECHANISM))
> + goto out;
> + break;
ditto
Thanks,
Richard
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel