mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
udp: config: rename ring_entries to ring_size
This commit is contained in:
parent
0f333d4755
commit
63c705fd17
2 changed files with 3 additions and 3 deletions
|
|
@ -93,7 +93,7 @@ pub struct NetworkConfig {
|
||||||
///
|
///
|
||||||
/// Will be rounded to next power of two if not already one
|
/// Will be rounded to next power of two if not already one
|
||||||
#[cfg(feature = "io-uring")]
|
#[cfg(feature = "io-uring")]
|
||||||
pub ring_entries: u16,
|
pub ring_size: u16,
|
||||||
/// Store this many responses at most for retrying (once) on send failure
|
/// Store this many responses at most for retrying (once) on send failure
|
||||||
///
|
///
|
||||||
/// Useful on operating systems that do not provide an udp send buffer,
|
/// Useful on operating systems that do not provide an udp send buffer,
|
||||||
|
|
@ -120,7 +120,7 @@ impl Default for NetworkConfig {
|
||||||
poll_event_capacity: 4096,
|
poll_event_capacity: 4096,
|
||||||
poll_timeout_ms: 50,
|
poll_timeout_ms: 50,
|
||||||
#[cfg(feature = "io-uring")]
|
#[cfg(feature = "io-uring")]
|
||||||
ring_entries: 1024,
|
ring_size: 1024,
|
||||||
resend_buffer_max_len: 0,
|
resend_buffer_max_len: 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ impl SocketWorker {
|
||||||
response_receiver: Receiver<(ConnectedResponse, CanonicalSocketAddr)>,
|
response_receiver: Receiver<(ConnectedResponse, CanonicalSocketAddr)>,
|
||||||
priv_dropper: PrivilegeDropper,
|
priv_dropper: PrivilegeDropper,
|
||||||
) {
|
) {
|
||||||
let ring_entries = config.network.ring_entries.next_power_of_two();
|
let ring_entries = config.network.ring_size.next_power_of_two();
|
||||||
// Try to fill up the ring with send requests
|
// Try to fill up the ring with send requests
|
||||||
let send_buffer_entries = ring_entries;
|
let send_buffer_entries = ring_entries;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue