Skip to content

Commit

Permalink
Disable segmentation offload
Browse files Browse the repository at this point in the history
Sending messages with segmentation offload seems to consistently
produce EIO in the interop runner's docker environment. Reported
upstream at
quic-interop/quic-interop-runner#397.
  • Loading branch information
Ralith committed Jul 23, 2024
1 parent d688e99 commit ebda346
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion quinn-interop/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ fn config(alpn: &str, suites: CipherSuite) -> Result<ClientConfig, Box<dyn std::
let mut transport_config = quinn::TransportConfig::default();
transport_config
.max_idle_timeout(Some(Duration::from_millis(9000).try_into()?))
.initial_rtt(Duration::from_millis(100));
.initial_rtt(Duration::from_millis(100))
// https://github.com/quic-interop/quic-interop-runner/issues/397
.enable_segmentation_offload(false);
let tls_config = quinn::crypto::rustls::QuicClientConfig::with_initial(
Arc::new(tls_config),
TLS13_AES_128_GCM_SHA256
Expand Down
6 changes: 5 additions & 1 deletion quinn-interop/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
crypto.alpn_protocols = ALPN.iter().map(|a| a[..].to_vec()).collect();
crypto.key_log = Arc::new(KeyLogFile::new());
let crypto = quinn::crypto::rustls::QuicServerConfig::try_from(crypto)?;
let server_config = h3_quinn::quinn::ServerConfig::with_crypto(Arc::new(crypto));
let mut transport_config = quinn::TransportConfig::default();
// https://github.com/quic-interop/quic-interop-runner/issues/397
transport_config.enable_segmentation_offload(false);
let mut server_config = h3_quinn::quinn::ServerConfig::with_crypto(Arc::new(crypto));
server_config.transport_config(Arc::new(transport_config));

let addr = "[::]:443".parse()?;
let endpoint = quinn::Endpoint::server(server_config, addr)?;
Expand Down

0 comments on commit ebda346

Please sign in to comment.