Skip to main content

sof_gossip_tuning/application/
ports.rs

1//! Output ports for applying SOF-supported tuning into host-specific adapters.
2
3use crate::domain::{
4    model::{GossipChannelTuning, IngestQueueMode},
5    value_objects::{CpuCoreIndex, QueueCapacity, ReceiverCoalesceWindow, TvuReceiveSocketCount},
6};
7
8/// Output port that can receive the SOF-supported subset of one gossip tuning profile.
9pub trait RuntimeTuningPort {
10    /// Applies the ingest queue mode.
11    fn set_ingest_queue_mode(&mut self, mode: IngestQueueMode);
12    /// Applies the ingest queue capacity.
13    fn set_ingest_queue_capacity(&mut self, capacity: QueueCapacity);
14    /// Applies the UDP batch size.
15    fn set_udp_batch_size(&mut self, batch_size: u16);
16    /// Applies the receiver coalesce window.
17    fn set_receiver_coalesce_window(&mut self, window: ReceiverCoalesceWindow);
18    /// Applies the optional fixed receiver core.
19    fn set_udp_receiver_core(&mut self, core: Option<CpuCoreIndex>);
20    /// Applies port-based receiver pinning.
21    fn set_udp_receiver_pin_by_port(&mut self, enabled: bool);
22    /// Applies the TVU receive socket count.
23    fn set_tvu_receive_sockets(&mut self, sockets: TvuReceiveSocketCount);
24    /// Applies the gossip worker drain budget.
25    fn set_gossip_channel_consume_capacity(&mut self, capacity: QueueCapacity);
26    /// Applies the gossip socket-consume worker count.
27    fn set_gossip_consume_threads(&mut self, thread_count: usize);
28    /// Applies the gossip listen worker count.
29    fn set_gossip_listen_threads(&mut self, thread_count: usize);
30    /// Applies the gossip run/push-pull worker count.
31    fn set_gossip_run_threads(&mut self, thread_count: usize);
32    /// Applies the semantic shred dedupe capacity.
33    fn set_shred_dedup_capacity(&mut self, dedupe_capacity: usize);
34    /// Applies gossip backend queue capacities.
35    fn set_gossip_channel_tuning(&mut self, tuning: GossipChannelTuning);
36}