Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added balancing groups and common group receiver #2885

Draft
wants to merge 100 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
463085c
First trial version
Jul 29, 2022
7fbca8a
Completed balancing code (compiled, not tested)
Aug 1, 2022
6602b15
Updated to latest master
Aug 4, 2022
29735ff
First version compiled with new recv buffer. Nothing tested.
Aug 19, 2022
3549bb8
Merged last upstream. Fixed compiling against ENABLE_NEW_RCVBUFFER
Aug 22, 2022
027072a
Fixed referring to buffer pointer in the socket
Aug 24, 2022
7a5853b
Fixed some bux during the first run
Aug 24, 2022
44803f2
Merge remote-tracking branch 'origin/master' into dev-add-group-balan…
Aug 24, 2022
6862b97
Fixed getting group status with the reading function
Aug 25, 2022
087b8db
Fixed bux in receiver buffer. Fixed handshake resource creation order…
Aug 30, 2022
b5d95d2
Added a workaround to read-ready check for a group-member socket
Aug 31, 2022
f03b09e
Added specific algorithm for tracking group loss for balancing groups
Sep 2, 2022
38510ab
Fixed broken release build
ethouris Sep 2, 2022
23dec40
Fixed bug: wrong loss range found in the buffer. Added broadcast grou…
ethouris Sep 2, 2022
e739133
Added common group losses handling
Sep 22, 2022
92639ad
Implemented receiver loss management for new bonding
ethouris Sep 22, 2022
2de148e
Cosmetics
ethouris Sep 22, 2022
047f126
Merge branch 'master' into dev-add-group-balancing
ethouris Sep 22, 2022
d07e71a
Minor bugfixes. Some line reordering and comment fixes
ethouris Sep 22, 2022
496e6a7
Exported fragment to a separate function
Sep 22, 2022
dbc3729
Fixed one deadlock. Added verification in snd-loss-removal procedure
Sep 23, 2022
b514108
Added handling of balancing group for srt-test-live. Fixed permissions.
ethouris Sep 26, 2022
03214ff
Applied changes from PR 2467-before merging
Sep 30, 2022
a1bb540
Fixed balancing mode sending. Fixed loss list selective extraction. A…
Oct 5, 2022
1f8faac
Improved and fixed balancing loss detection
ethouris Oct 24, 2022
faf9bec
Merged against latest master
Oct 25, 2022
96e92dd
Adjusted to the latest changes in the group branch, per changes in ma…
Oct 25, 2022
bdc6fff
Updated and post-fixed
Oct 25, 2022
deeaf05
Some cosmetic fixes after the update
Oct 26, 2022
a68d5cf
Updated for latest master
Oct 26, 2022
d2d1c90
Merge branch 'master' into dev-processdata-refax
Oct 26, 2022
89e927f
Added lacking fix for AEAD
Oct 26, 2022
a56c84d
Fixed: block static variable that might be unused when no logging (tr…
Oct 27, 2022
974a6ed
Merged with master (changes for AEAD)
Oct 27, 2022
0168c5e
Fixed after PR comments
Nov 1, 2022
870509f
Renamed getPacketPTS. Moved call to obtain PTS under belated condition
Nov 3, 2022
c103433
Updated taking pts for stats and logs only where needed. Added more e…
Nov 3, 2022
b3f768f
Improved logging for the receiver side
ethouris Nov 3, 2022
e979a68
Updated from master and post-fixed
Nov 3, 2022
a5d0e73
Merge remote-tracking branch 'refs/remotes/ethouris/dev-add-group-bal…
Nov 3, 2022
b15876e
Added some comments regarding the new TSBPD triggering rules
Nov 7, 2022
9f5174c
Merge branch 'dev-processdata-refax' into dev-refax-buffer-tsbpd-trig…
Nov 7, 2022
652e35d
Applied changes for improved TSBPD and receiver buffer
Nov 7, 2022
37ec000
Updated to the latest master and fixed
Nov 8, 2022
6295cb9
Updated and fixed
Nov 8, 2022
36c1f67
Updated usage of shortcuts and new names
Nov 8, 2022
1fbd754
Merge branch 'master' into dev-refax-buffer-tsbpd-triggers
Nov 9, 2022
478ca41
Merge branch 'master' into dev-refax-buffer-tsbpd-triggers
Nov 10, 2022
8335cbe
Fixed some logs formatting
ethouris Nov 10, 2022
e217b7d
Updated to latest upstream
Nov 23, 2022
df46c57
Updated to latest upstream
Nov 23, 2022
251c9c5
Updated, part 1. Not tested (only UT)
Dec 6, 2022
4b39b7b
Merge branch 'master' into dev-add-group-balancing
Dec 6, 2022
1df7e40
Updated and fixed
Dec 6, 2022
631adb0
Some cosmetics and updates from upstream
Dec 7, 2022
26d11de
Updated to latest upstream
Dec 7, 2022
db18435
Fixed atomic operator bug (reported by gcc-11)
Dec 7, 2022
9f7db49
Fixed: for backup link sync use the common group buffer start sequence
Dec 8, 2022
35450ca
Fixed deadlock on 2L locked GroupLock. Fixed crash when discarding a …
Dec 15, 2022
a826e3c
Trial fix for the rogue ACK in backup groups
Dec 16, 2022
b116838
Some cosmetic log fixes
ethouris Dec 16, 2022
eaf51e4
Updated to latest upstream
ethouris Dec 19, 2022
0b515e8
Updated
Dec 23, 2022
f636ce7
Updated and fixed
Feb 22, 2023
dc2dcdf
Updated lock info in the comment
Jul 18, 2023
ae914e5
Merged and stabilized
Sep 19, 2023
519cb7e
Merge branch 'master' into dev-refax-buffer-tsbpd-triggers
Sep 19, 2023
4bb7b47
Added mutex spec to a function
Sep 19, 2023
d179878
Added more thread check entries
Sep 19, 2023
94fb676
Updated to latest upstream
Feb 15, 2024
8ad69ed
Fixed a suggested uninitialized variable
Feb 15, 2024
bbced79
Renamed eclipsed variable
Feb 16, 2024
5136ca2
Added doxy description for some functions. Applied NonOrder in names …
Feb 16, 2024
f6e0271
Removed wrong fix. Fixed C++11 style initialization of PacketInfo
Feb 16, 2024
072a8c4
Refax: CRcvBuffer extracted some parts of insert() to separate functions
Feb 16, 2024
4302615
Updated and fixed
Feb 21, 2024
1830e3a
Merge branch 'master' into dev-refax-buffer-tsbpd-triggers
Feb 22, 2024
7bdd82c
Merged and post-fixed
Feb 22, 2024
432b0c7
Fixed some problems around macros that caused build breaks
Feb 22, 2024
f416392
Fixed gcc extension causing BB on Windows
Feb 22, 2024
5b99754
Fixed some build breaks reported by CI
Feb 26, 2024
328c359
Fixed C++03 incompat case
Feb 26, 2024
283021e
Apply suggestions from code review
ethouris Feb 28, 2024
b969a83
Remaining post-review fixes
Feb 28, 2024
df237d6
Merge branch 'master' into dev-refax-buffer-tsbpd-triggers
Feb 29, 2024
d8f485a
Merge branch 'master' into dev-refax-buffer-tsbpd-triggers
Mar 11, 2024
d9f079a
Turned integer-based values to strong types. CHECKPOINT: tests passed
Jun 3, 2024
ab469d6
Fixed previous problems with receiver buffer
Jun 10, 2024
a2b1b44
First working version with end/drop as offset
ethouris Jun 17, 2024
ff16e68
Blocked development support types and fixed the test
Jun 17, 2024
1f6ac3d
Updated to latest upstream
Jun 18, 2024
fa70fda
Merged changes
Jun 18, 2024
1bf93ff
Cleanup of the commented-out code
Jun 18, 2024
f4f22ba
Cleaning up other temporary development entries
Jun 18, 2024
2e182a8
Updated with latest changes in receiver buffer. NOT TESTED, one IPE i…
Jun 20, 2024
0a88fdf
Updated and fixed
Aug 14, 2024
74a27ed
Updated and fixed
Aug 29, 2024
cb00cce
Added option to disable test discovery (off by default)
Sep 3, 2024
5bc71e9
BUGFIX: the buffer info extraction function wasn't mutex-protected
Sep 4, 2024
498d980
Updated and fixed
Sep 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed some build breaks reported by CI
Mikołaj Małecki committed Feb 26, 2024
commit 5b9975454a0d771b5e669ae00e8bfb9e08b4db88
2 changes: 1 addition & 1 deletion srtcore/core.cpp
Original file line number Diff line number Diff line change
@@ -9762,7 +9762,7 @@ void srt::CUDT::updateAfterSrtHandshake(int hsv)
}
}

int srt::CUDT::packLostData(CPacket& w_packet, int32_t exp_seq)
int srt::CUDT::packLostData(CPacket& w_packet, int32_t exp_seq SRT_ATR_UNUSED)
{
// protect m_iSndLastDataAck from updating by ACK processing
UniqueLock ackguard(m_RecvAckLock);
9 changes: 5 additions & 4 deletions srtcore/group.cpp
Original file line number Diff line number Diff line change
@@ -991,7 +991,7 @@ CRcvBuffer::InsertInfo CUDTGroup::addDataUnit(groups::SocketData* member, CUnit*

if (info.result == CRcvBuffer::InsertInfo::INSERTED)
{
w_have_loss = checkPacketArrivalLoss(member, u->m_Packet, (w_losses));
w_have_loss = checkPacketArrivalLoss(member, rpkt, (w_losses));
}
}

@@ -5726,15 +5726,15 @@ int CUDTGroup::packLostData(CUDT* core, CPacket& w_packet, int32_t exp_seq)

// XXX This is temporarily used for broadcast with common loss list.
bool have_extracted = false;
const char* as = "FIRST FOUND";
IF_HEAVY_LOGGING(const char* as = "FIRST FOUND");
if (exp_seq == SRT_SEQNO_NONE)
{
exp_seq = m_pSndLossList->popLostSeq();
have_extracted = (exp_seq != SRT_SEQNO_NONE);
}
else
{
as = "EXPECTED";
IF_HEAVY_LOGGING(as = "EXPECTED");
have_extracted = m_pSndLossList->popLostSeq(exp_seq);
}

@@ -5966,8 +5966,9 @@ void* CUDTGroup::tsbpd(void* param)
// follow the drop, but this must be done outside the lock on the buffer.
synch_loss_after_drop = iDropCnt;

#if ENABLE_LOGGING
const int64_t timediff_us = count_microseconds(tnow - info.tsbpd_time);

#endif
#if ENABLE_HEAVY_LOGGING
HLOGC(tslog.Debug,
log << self->CONID() << "grp/tsbpd: DROPSEQ: up to seqno %" << CSeqNo::decseq(info.seqno) << " ("
2 changes: 1 addition & 1 deletion srtcore/queue.cpp
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@
using namespace srt::sync;
using namespace srt_logging;

srt::CUnitQueue::CUnitQueue(int initNumUnits, int mss, UDPSOCKET owner)
srt::CUnitQueue::CUnitQueue(int initNumUnits, int mss, SRTSOCKET owner)
: m_iNumTaken(0)
, m_iMSS(mss)
, m_iBlockSize(initNumUnits)
@@ -127,7 +127,7 @@
for (int i = 0; i < iNumUnits; ++i)
{
tempu[i].m_bTaken = false;
tempu[i].m_pParentQueue = this;

Check warning

Code scanning / CodeQL

Local variable address stored in non-local memory Warning

A stack address which arrived via a
parameter
may be assigned to a non-local variable.
tempu[i].m_Packet.m_pcData = tempb + i * mss;
}


Unchanged files with check annotations Beta

return 0;
}
//const bool canReadInOrder = m_iFirstNonreadPos != m_iStartPos;

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
const int readPos = canReadInOrder ? m_iStartPos : m_iFirstNonOrderMsgPos;
const bool isReadingFromStart = (readPos == m_iStartPos); // Indicates if the m_iStartPos can be changed
return m_pRcvBuffer->getPktTsbPdTime(usPktTimestamp);
}
/*
int32_t getOldestRcvSeqNo() const
{
return m_pRcvBuffer->getStartSeqNo();
}
*/

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
// Property accessors
SRTU_PROPERTY_RW_CHAIN(CUDTGroup, SRTSOCKET, id, m_GroupID);