Repository navigation
votor: use af_xdp for both client and server egress traffic - #15347
Conversation
31dc0e7 to
c11d8ae
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #15347 +/- ##
=========================================
- Coverage 82.3% 82.3% -0.1%
=========================================
Files 930 930
Lines 370022 370048 +26
=========================================
- Hits 304746 304740 -6
- Misses 65276 65308 +32 🚀 New features to boost your workflow:
|
AshwinSekar
left a comment
There was a problem hiding this comment.
Changes to the votor crate look fine to me will defer to networking for the rest of the review.
Also mind sharing results from your testing? Did you notice any change in finalization times with this change?
| } | ||
|
|
||
| fn into_quic_sockets( | ||
| sockets: impl IntoIterator<Item = UdpSocket>, |
There was a problem hiding this comment.
moved this function to quic_socket.rs to reuse it
|
|
||
| let endpoints = sockets | ||
| .into_iter() | ||
| .map(|sock| match sock { |
There was a problem hiding this comment.
extracted this code into helper function create_endpoint to reuse it
Will check.
We are not talking about a significant amount of syscalls here, if anything changed at all it would be unmeasurable in finalization times, we are talking submillisecond differences. |
alexpyattaev
left a comment
There was a problem hiding this comment.
Functionality looks correct, but very fragile:
- No way to disable XDP for voting path. XDP is not necessary for votor-transport, and if we have any issues with it we'd have to disable it wholesale (including turbine and TPU).
- Mixing TPU and votor may not be a great idea with config file coming (we may want to segregate consensus traffic more, and this coupling will make it harder)
- Do we need to tell quinn to disable segmentation offload? we have config.enable_segmentation_offload(false) in streamer (though for unrelated reasons - but those same reasons seemingly apply to votor as well). I suspect disabling GSO explicitly would be a good call for votor-transport given all datagrams are << MTU.
Non-functional nit:
- Votor-transport depending on streamer is something I'd try to avoid. Right now it is a "leaf" crate and can be compiled before everything else.
33a3eb5 to
2efb918
Compare
|
@claude review once |
bdbfa78 to
b2a2325
Compare
|
@alexpyattaev addressed comments. |
alexpyattaev
left a comment
There was a problem hiding this comment.
This mostly LGTM, few small things to clean up.
| ) | ||
| } else { | ||
| (None, None, None, None, None) | ||
| (None, None, None, None, None, None) |
There was a problem hiding this comment.
This code is ugly... we should fix it in a followup (not this PR)
8157946 to
e14b73a
Compare
|
LGTM lets squash before merge. |
Votor doesn't use AF_XDP for egress like other network components. This PR adds support of AF_XPD to votor: * for server egress traffic * for client egress traffic It also moves quic_socket module from streamer to net-utitls because it is used now in votor crate as well.
e14b73a to
1bcb748
Compare
alexpyattaev
left a comment
There was a problem hiding this comment.
LGTM! Before merging give it another spin on the AG test cluster though to confirm nothing regressed.
Problem
Votor doesn't use AF_XDP for egress like other network components.
Summary of Changes
This PR adds support of AF_XPD to votor:
It also moves quic_socket module from streamer to net-utitls because it is used now in votor crate as well.
Testing
AG cluster with 39 nodes with master and one node with this branch.
Double checked that traffic doesn't go through kernel stack.
Checked that even if i generate excessive TPU load, metrics for votes over votor are not affected.
Votor metrics looks exactly the same:
Finalization time looks good as well: