A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Haivision/srt/commit/477530ff1a754bc9af9654e298208d67c6dd221b below:

[core] Drop packets in the new RCV buffer by group RCV base (#2207) · Haivision/srt@477530f · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+46

-0

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+46

-0

lines changed Original file line number Diff line number Diff line change

@@ -5352,6 +5352,10 @@ void srt::CUDT::setInitialRcvSeq(int32_t isn)

5352 5352 5353 5353

int srt::CUDT::rcvDropTooLateUpTo(int seqno)

5354 5354

{

5355 +

// Make sure that it would not drop over m_iRcvCurrSeqNo, which may break senders.

5356 +

if (CSeqNo::seqcmp(seqno, CSeqNo::incseq(m_iRcvCurrSeqNo)) > 0)

5357 +

seqno = CSeqNo::incseq(m_iRcvCurrSeqNo);

5358 + 5355 5359

const int seq_gap_len = CSeqNo::seqoff(m_iRcvLastSkipAck, seqno);

5356 5360 5357 5361

// seq_gap_len can be <= 0 if a packet has been dropped by the sender.

@@ -7731,6 +7735,38 @@ void srt::CUDT::ackDataUpTo(int32_t ack)

7731 7735

#endif

7732 7736

}

7733 7737 7738 +

#if ENABLE_EXPERIMENTAL_BONDING && ENABLE_NEW_RCVBUFFER

7739 +

void srt::CUDT::dropToGroupRecvBase() {

7740 +

int32_t group_recv_base = SRT_SEQNO_NONE;

7741 +

if (m_parent->m_GroupOf)

7742 +

{

7743 +

// Check is first done before locking to avoid unnecessary

7744 +

// mutex locking. The condition for this field is that it

7745 +

// can be either never set, already reset, or ever set

7746 +

// and possibly dangling. The re-check after lock eliminates

7747 +

// the dangling case.

7748 +

ScopedLock glock (uglobal().m_GlobControlLock);

7749 + 7750 +

// Note that getRcvBaseSeqNo() will lock m_GroupOf->m_GroupLock,

7751 +

// but this is an intended order.

7752 +

if (m_parent->m_GroupOf)

7753 +

group_recv_base = m_parent->m_GroupOf->getRcvBaseSeqNo();

7754 +

}

7755 +

if (group_recv_base == SRT_SEQNO_NONE)

7756 +

return;

7757 + 7758 +

ScopedLock lck(m_RcvBufferLock);

7759 +

int cnt = rcvDropTooLateUpTo(CSeqNo::incseq(group_recv_base));

7760 +

if (cnt > 0)

7761 +

{

7762 +

HLOGC(grlog.Debug,

7763 +

log << "dropToGroupRecvBase: " << CONID() << " dropped " << cnt << " packets before ACK: group_recv_base="

7764 +

<< group_recv_base << " m_iRcvLastSkipAck=" << m_iRcvLastSkipAck

7765 +

<< " m_iRcvCurrSeqNo=" << m_iRcvCurrSeqNo << " m_bTsbPd=" << m_bTsbPd);

7766 +

}

7767 +

}

7768 +

#endif

7769 + 7734 7770

namespace srt {

7735 7771

#if ENABLE_HEAVY_LOGGING

7736 7772

static void DebugAck(string hdr, int prev, int ack)

@@ -7926,6 +7962,10 @@ int srt::CUDT::sendCtrlAck(CPacket& ctrlpkt, int size)

7926 7962

string reason = "first lost"; // just for "a reason" of giving particular % for ACK

7927 7963

#endif

7928 7964 7965 +

#if ENABLE_EXPERIMENTAL_BONDING && ENABLE_NEW_RCVBUFFER

7966 +

dropToGroupRecvBase();

7967 +

#endif

7968 + 7929 7969

{

7930 7970

// If there is no loss, the ACK is the current largest sequence number plus 1;

7931 7971

// Otherwise it is the smallest sequence number in the receiver loss list.

Original file line number Diff line number Diff line change

@@ -1084,6 +1084,12 @@ class CUDT

1084 1084

/// @param seq first unacknowledged packet sequence number.

1085 1085

void ackDataUpTo(int32_t seq);

1086 1086 1087 +

#if ENABLE_EXPERIMENTAL_BONDING && ENABLE_NEW_RCVBUFFER

1088 +

/// @brief Drop packets in the recv buffer behind group_recv_base.

1089 +

/// Updates m_iRcvLastSkipAck if it's behind group_recv_base.

1090 +

void dropToGroupRecvBase();

1091 +

#endif

1092 + 1087 1093

void handleKeepalive(const char* data, size_t lenghth);

1088 1094 1089 1095

/// Locks m_RcvBufferLock and retrieves the available size of the receiver buffer.

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4