I think this SM is optimized for behaving as you suggest, with the assumption 
all sync intervals are the same. However, a port’s syncInterval, or some 
fraction of it, must be adhered to. Also, if a Sync event is not received 
within a syncInterval for a given port, that port will still transition to 
‘SEND_MD_SYNC’ and send a Sync event.

On 6/7/17, 12:16 PM, "Richard Cochran" <richardcoch...@gmail.com> wrote:

    On Wed, Jun 07, 2017 at 04:51:03PM +0000, Rodney Greenstreet wrote:
    > Please review this state machine again. The syncInterval is used to govern
    > the transition back to the ‘SEND_MD_SYNC’ state. This transition only 
occurs
    > if the the syncInterval has elapsed and the received Sync message is not 
from
    > ourselves and the port is enabled and the port is asCapable and the port 
is
    > in the master role.
    
    No, you are really not paying attention.
    
    Here is the condition on the lower left of Figure 10-8:
    
        ( ( ( rcvdPSSync &&
        (currentTime ­ lastSyncSentTime >= 0.5*syncInterval) &&
        rcvdPSSyncPtr->localPortNumber != thisPort) )
         || ( (currentTime ­ lastSyncSentTime >= syncInterval) &&
        (lastRcvdPortNum != thisPort) ) )
        && portEnabled && pttPortEnabled && asCapable &&
        selectedRole[thisPort] == MasterPort
    
    Lets make this more readable:
    
     1  (
     2          (
     3                  (rcvdPSSync &&
     4                   (currentTime ­ lastSyncSentTime >= 0.5*syncInterval) &&
     5                   rcvdPSSyncPtr->localPortNumber != thisPort)
     6          ) || (
     7                  (currentTime ­ lastSyncSentTime >= syncInterval) &&
     8                  (lastRcvdPortNum != thisPort)
     9          )
    10  )
    11  && portEnabled
    12  && pttPortEnabled
    13  && asCapable
    14  && selectedRole[thisPort] == MasterPort
    
    The outer expression (lines 1, 10, and 11-14) checks whether the port
    is allow to send at all.
    
    The inner expression has two conditions with a logical OR (line 6).
    
    The first condition triggers immediately on "rcvdPSSync", provided
    that the interval is not too short.  There is no timer, but rather the
    interval from the last transmission is used.
    
    See?
    
    Thanks,
    Richard
    

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to