On Tue, 5 Dec 2023 at 02:44, Andrew Zaborowski
<andrew.zaborow...@intel.com> wrote:
>  * if I stop a CMLDS client and rerun it, it will receive the CMLDS
> notifications twice until the old subscription expires.  If I restart
> it again quickly enough it'll receive each notification 3 times.  This
> is because pmc_recv doesn't filter by .targetPortIdentity.  It could
> but it wouldn't be bullet proof anyway because the PMC port's identity
> is based on the pid, which is not unique, so I'm not sure if it's
> worth doing.

On a second thought, if the pid ends up being reused, when the client
re-subscribes to the CMLDS notifications, the server will update the
existing subscription so duplicate notifications wouldn't be sent.  So
at least this specific use case would be covered.

Additionally we found we needed to exit early from port_capable() so
as not to overwrite the p->asCapable value set by process_cmlds().
Again feel free to include it or leave it for us to send separately.

@@ -700,6 +700,11 @@ int port_capable(struct port *p)
         goto capable;
     }

+    if (p->delayMechanism == DM_COMMON_P2P) {
+        /* asCapable is calculated by the CMLDS. */
+        return p->asCapable != NOT_CAPABLE ? 1 : 0;
+    }
+
     if (tmv_to_nanoseconds(p->peer_delay) >    p->neighborPropDelayThresh) {
         if (p->asCapable)
             pr_debug("%s: peer_delay (%" PRId64 ") > neighborPropDelayThresh "

Best regards


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

Reply via email to