Ticket #13631: 0003-tcp-rfc-3042-implemented-limited-transmit.patch

File 0003-tcp-rfc-3042-implemented-limited-transmit.patch, 1.4 KB (added by a-star, 3 years ago)
  • src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp

    From b82564b0ac452355147bfb5a19be8710c663b3f6 Mon Sep 17 00:00:00 2001
    From: A-star-ayush <myselfthebest@yahoo.com>
    Date: Tue, 15 Aug 2017 01:25:04 +0530
    Subject: [PATCH] tcp: rfc 3042: implemented limited transmit
    
    ---
     src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp | 11 +++++++++--
     1 file changed, 9 insertions(+), 2 deletions(-)
    
    diff --git a/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp b/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp
    index 44dfc9b..af2027b 100644
    a b TCPEndpoint::_DuplicateAcknowledge(tcp_segment_header &segment)  
    12811281    if (fDuplicateAcknowledgeCount == 0)
    12821282        fPreviousFlightSize = (fSendMax - fSendUnacknowledged).Number();
    12831283
    1284     if (++fDuplicateAcknowledgeCount < 3)
    1285         return;
     1284    if (++fDuplicateAcknowledgeCount < 3) {
     1285        if (fSendQueue.Available(fSendMax) != 0  && fSendWindow != 0) {
     1286            fSendNext = fSendMax;
     1287            fCongestionWindow += fDuplicateAcknowledgeCount * fSendMaxSegmentSize;
     1288            _SendQueued();
     1289            TRACE("_DuplicateAcknowledge(): packet sent under limited transmit on receipt of dup ack");
     1290            fCongestionWindow -= fDuplicateAcknowledgeCount * fSendMaxSegmentSize;
     1291        }
     1292    }
    12861293
    12871294    if (fDuplicateAcknowledgeCount == 3) {
    12881295        fSlowStartThreshold = max_c(fPreviousFlightSize / 2, 2 * fSendMaxSegmentSize);