perf: add batch packet processing with recvmmsg/sendmmsg#10
perf: add batch packet processing with recvmmsg/sendmmsg#10
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Previously, only ACKs were sent to all connections while NAKs and other control packets were sent only to the last active connection. If that connection was dead, NAKs would be lost and retransmissions would fail. Now ACKs and NAKs are broadcast to all connections, matching Moblin's approach. Other control packets still go to last_address(). Co-authored-by: servusrene <48084558+servusrene@users.noreply.github.com>
- Use recvmmsg to receive up to 64 packets in a single syscall - Use sendmmsg to broadcast to all connections in a single syscall - Reduces syscall overhead under high packet rates - Improves CPU efficiency for high-throughput scenarios
ffb3c0a to
ee49693
Compare
Summary
recvmmsgto receive up to 64 packets in a single syscallsendmmsgto broadcast to all connections in a single syscallChanges
Receive batching (
srtla_handler.cpp):process_packets()function usingrecvmmsgto receive up to 64 packets at onceprocess_single_packet()helperSend batching (
srt_handler.cpp):sendmmsginstead of individualsendtocallsBenefits
Dependencies
This PR is based on #9 (broadcast control packets to all connections)