• Tuong Lien's avatar
    tipc: fix large latency in smart Nagle streaming · c7268589
    Tuong Lien authored
    Currently when a connection is in Nagle mode, we set the 'ack_required'
    bit in the last sending buffer and wait for the corresponding ACK prior
    to pushing more data. However, on the receiving side, the ACK is issued
    only when application really  reads the whole data. Even if part of the
    last buffer is received, we will not do the ACK as required. This might
    cause an unnecessary delay since the receiver does not always fetch the
    message as fast as the sender, resulting in a large latency in the user
    message sending, which is: [one RTT + the receiver processing time].
    
    The commit makes Nagle ACK as soon as possible i.e. when a message with
    the 'ack_required' arrives in the receiving side's stack even before it
    is processed or put in the socket receive queue...
    This way, we can limit the streaming latency to one RTT as committed in
    Nagle mode.
    Acked-by: default avatarYing Xue <ying.xue@windriver.com>
    Acked-by: default avatarJon Maloy <jmaloy@redhat.com>
    Signed-off-by: default avatarTuong Lien <tuong.t.lien@dektech.com.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c7268589
socket.c 102 KB