-
Notifications
You must be signed in to change notification settings - Fork 1
FEAT: Single CC MPLB #500
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
base: main
Are you sure you want to change the base?
FEAT: Single CC MPLB #500
Conversation
ArtyomPeshkov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move AckInfo to utils and add on_ack overload
Think about MPLB packet distribution (delays management)
d0fe102 to
b9a6f09
Compare
Az3git
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all
| flow_weak.lock()->send( | ||
| std::vector<PacketInfo>(1, std::move(packet_info))); | ||
| }); | ||
| m_packets_in_flight++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m_packets_in_flight increases but does not decrease anywhere
| return; | ||
| } | ||
| auto mplb = mplb_weak.lock(); | ||
| mplb->m_cc->on_ack(info.rtt, info.avg_rtt, info.ecn_flag); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| mplb->m_cc->on_ack(info.rtt, info.avg_rtt, info.ecn_flag); | |
| mplb->m_cc->on_ack(info.rtt, info.avg_rtt, info.ecn_flag); | |
| mplb->m_packets_in_flight--; |
| TimeNs pacing_delay = m_cc->get_pacing_delay(); | ||
| TimeNs shift(0); | ||
|
|
||
| std::size_t packets_count = std::ceil(data.size / m_packet_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| std::size_t packets_count = std::ceil(data.size / m_packet_size); | |
| auto packets_count = (data.size + m_packet_size - SizeByte(1)) / m_packet_size; |
It's a safe option, but if everything is fine, leave it as is.
| std::weak_ptr<SingleCCMplb> mplb_weak = shared_from_this(); | ||
| PacketCallback packet_callback = [observer, mplb_weak, | ||
| flow_weak](PacketAckInfo info) { | ||
| observer->on_single_callback(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the CallbackObserver calls the final callback() on the last packet, the custom callback may be triggered before the CC/delivered/inflight update of the last packet. This can break tests/logic if the user immediately looks at get_context() in the callback.
Please check it
closes #496