• Jon Paul Maloy's avatar
    tipc: fix problem with parallel link synchronization mechanism · 0d699f28
    Jon Paul Maloy authored
    Currently, we try to accumulate arrived packets in the links's
    'deferred' queue during the parallel link syncronization phase.
    
    This entails two problems:
    
    - With an unlucky combination of arriving packets the algorithm
      may go into a lockstep with the out-of-sequence handling function,
      where the synch mechanism is adding a packet to the deferred queue,
      while the out-of-sequence handling is retrieving it again, thus
      ending up in a loop inside the node_lock scope.
    
    - Even if this is avoided, the link will very often send out
      unnecessary protocol messages, in the worst case leading to
      redundant retransmissions.
    
    We fix this by just dropping arriving packets on the upcoming link
    during the synchronization phase, thus relying on the retransmission
    protocol to resolve the situation once the two links have arrived to
    a synchronized state.
    Reviewed-by: default avatarErik Hugne <erik.hugne@ericsson.com>
    Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
    Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0d699f28
link.c 60.3 KB