Skip to content

votor: use af_xdp for both client and server egress traffic - #15347

Merged
KirillLykov merged 1 commit into
anza-xyz:masterfrom
KirillLykov:klykov/xdp-votor
Sep 21, 2026
Merged

KirillLykov merged 1 commit into
anza-xyz:masterfrom
KirillLykov:klykov/xdp-votor

Conversation

@KirillLykov

@KirillLykov KirillLykov commented Sep 17, 2026 •

Copy link
Copy Markdown

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:

  • 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.

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:

  • client/server send/received datagrams are the same
  • no errors in both cases
Screenshot 2026-09-18 at 13 51 54 Screenshot 2026-09-18 at 13 52 16

Finalization time looks good as well:

chrono-3-average-finalized-ms-by-validator-prefix

@KirillLykov
KirillLykov force-pushed the klykov/xdp-votor branch 2 times, most recently from 31dc0e7 to c11d8ae Compare September 17, 2026 16:44
@codecov-commenter

codecov-commenter commented Sep 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.59091% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.3%. Comparing base (07f3bf4) to head (1bcb748).

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KirillLykov
KirillLykov marked this pull request as ready for review September 17, 2026 18:07
@KirillLykov
KirillLykov requested review from a team as code owners September 17, 2026 18:07
@alexpyattaev
alexpyattaev self-requested a review September 17, 2026 18:14
AshwinSekar
AshwinSekar previously approved these changes Sep 17, 2026

@AshwinSekar AshwinSekar left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread core/src/tpu.rs
}

fn into_quic_sockets(
sockets: impl IntoIterator<Item = UdpSocket>,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved this function to quic_socket.rs to reuse it


let endpoints = sockets
.into_iter()
.map(|sock| match sock {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extracted this code into helper function create_endpoint to reuse it

@alexpyattaev

Copy link
Copy Markdown

Changes to the votor crate look fine to me will defer to networking for the rest of the review.

Will check.

Also mind sharing results from your testing? Did you notice any change in finalization times with this change?

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 alexpyattaev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread votor-transport/Cargo.toml Resolved
Comment thread net-utils/src/quic_socket.rs Resolved
Comment thread streamer/src/quic_socket.rs Resolved
Comment thread streamer/src/quic_socket.rs Resolved
Comment thread streamer/src/quic_socket.rs Resolved
Comment thread local-cluster/src/cluster_tests.rs Resolved
Comment thread core/src/validator.rs Resolved
Comment thread core/src/validator.rs Resolved
@KirillLykov

Copy link
Copy Markdown
Author

@claude review once

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Comment thread votor-transport/src/transport.rs Resolved
@KirillLykov

Copy link
Copy Markdown
Author

@alexpyattaev addressed comments.

@alexpyattaev alexpyattaev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This mostly LGTM, few small things to clean up.

Comment thread streamer/Cargo.toml Resolved
Comment thread net-utils/src/quic_socket.rs Resolved
Comment thread net-utils/src/quic_socket.rs Resolved
Comment thread core/src/validator.rs
)
} else {
(None, None, None, None, None)
(None, None, None, None, None, None)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is ugly... we should fix it in a followup (not this PR)

Comment thread local-cluster/src/cluster_tests.rs Resolved
@alexpyattaev

Copy link
Copy Markdown

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.

@alexpyattaev alexpyattaev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Before merging give it another spin on the AG test cluster though to confirm nothing regressed.

@KirillLykov
KirillLykov added this pull request to the merge queue Sep 21, 2026
Merged via the queue into anza-xyz:master with commit e7afbf5 Sep 21, 2026
53 checks passed
@KirillLykov
KirillLykov deleted the klykov/xdp-votor branch September 21, 2026 14:31
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.

5 participants