8000 [MAINT] Rework queuing functionality around multiplexer and snd/rcv queues by ethouris · Pull Request #3164 · Haivision/srt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[MAINT] Rework queuing functionality around multiplexer and snd/rcv queues #3164

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

Draft
wants to merge 31 commits into
base: dev
Choose a base branch
from

Conversation

ethouris
Copy link
Collaborator
@ethouris ethouris commented Apr 10, 2025

The aim of this changeset is to rework the queuing of sent and received packets to allow more flexible send scheduling.

  • 1. Remove the blocking mode connect procedure. That is, all that is done beyond the point where the non-blocking mode connection should be done, is removed, and replaced with the waiting on a m_SendBlockCond CV. This CV has been used because it's not used at the time when the connection is not yet established and it corresponds with the rule that the epoll OUT event is used as a signal for connection readiness.
  • 2. Remove the use of specific queues keeping CUDT pointers and replace with the list of all sockets pinned into the multiplexer, together with its state that should represent the previous case of existence in these queues.
  • 3. Introduce delivery time in the packets stored in the sender buffer. The sender queue should pick up packets and get waiting time basing on the nearest packet ready to be scheduled.
  • 4. Add a special socket option that will require using the declared time in the srt_sendmsg2 call as the sending time.

Further changes embrace: update the tests and testing apps by fixing some problems connected to too early socket closing.

@ethouris ethouris changed the base branch from master to dev April 10, 2025 15:03
@ethouris ethouris changed the title [MAINT] Rework work queuing around multiplexer and snd/rcv queues [MAINT] Rework queuing functionality around multiplexer and snd/rcv queues Apr 11, 2025
…or in-muxer list). Added in-muxer socket list. Fixed tests to close all sockets. Tests socket complete wipeout.
@@ -11255,7 +11096,7 @@
// XXX Make this function return EConnectStatus enum type (extend if needed),
// and this will be directly passed to the caller.

// [[using locked(m_pRcvQueue->m_LSLock)]];
// [[using locked(m_RcvQueue.m_LSLock)]];

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
/// Remove UDT instance from the list.
/// @param [in] u pointer to the UDT instance
void remove(const CUDT* u);// EXCLUDES(m_ListLock);
void remove(const CUDT* u);
void remove(CSNode* u);// EXCLUDES(m_ListLock);

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Comment on lines +669 to +679
/*
* XXX TEMPTING, but this breaks the rule that a socket moved to
* the dead region may still send out packets, if there is any left.

CUDTUnited::SocketKeeper sk (CUDT::uglobal(), u->id());
if (!sk.socket)
{
HLOGC(qslog.Debug, log << "Socket to be processed was deleted in the meantime, not packing");
continue;
}
*/

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Comment on lines 1071 to 1080
/*
CUDTUnited::SocketKeeper sk (CUDT::uglobal(), i->id);
if (!sk.socket)
{
// Socket deleted already, so stop this and proceed to the next loop.
LOGC(cnlog.Error, log << "updateConnStatus: IPE: socket @" << i->id << " already closed, proceed to only removal from lists");
toRemove.push_back(*i);
continue;
}

*/

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0