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 gossip backend queue capacities.
25    fn set_gossip_channel_tuning(&mut self, tuning: GossipChannelTuning);
26}