• Jon Paul Maloy's avatar
    tipc: ensure sequential message delivery across dual bearers · 6f92ee54
    Jon Paul Maloy authored
    When we run broadcast packets over dual bearers/interfaces, the
    current transmission code is flipping bearers between each sent
    packet, with the purpose of leveraging the double bandwidth
    available. The receiving bclink is resequencing the packets if
    needed, so all messages are delivered upwards from the broadcast
    link in the correct order, even if they may arrive in concurrent
    interrupts.
    
    However, at the moment of delivery upwards to the socket, we release
    all spinlocks (bclink_lock, node_lock), so it is still possible
    that arriving messages bypass each other before they reach the socket
    queue.
    
    We fix this by applying the same technique we are using for unicast
    traffic. We use a link selector (i.e., the last bit of sending port
    number) to ensure that messages from the same sender socket always are
    sent over the same bearer. This guarantees sequential delivery between
    socket pairs, which is sufficient to satisfy the protocol spec, as well
    as all known user requirements.
    Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Reviewed-by: default avatarErik Hugne <erik.hugne@ericsson.com>
    Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6f92ee54
bcast.c 24.4 KB