Trait caminos_lib::policies::VirtualChannelPolicy [−][src]
pub trait VirtualChannelPolicy {
fn filter(
&self,
candidates: Vec<CandidateEgress>,
router: &dyn Router,
info: &RequestInfo<'_>,
topology: &dyn Topology,
rng: &RefCell<StdRng>
) -> Vec<CandidateEgress>;
fn need_server_ports(&self) -> bool;
fn need_port_average_queue_length(&self) -> bool;
fn need_port_last_transmission(&self) -> bool;
}
Expand description
How virtual channels are selected for a packet
They provide the function filter(Vec
Required methods
fn filter(
&self,
candidates: Vec<CandidateEgress>,
router: &dyn Router,
info: &RequestInfo<'_>,
topology: &dyn Topology,
rng: &RefCell<StdRng>
) -> Vec<CandidateEgress>
fn filter(
&self,
candidates: Vec<CandidateEgress>,
router: &dyn Router,
info: &RequestInfo<'_>,
topology: &dyn Topology,
rng: &RefCell<StdRng>
) -> Vec<CandidateEgress>
Apply the policy over a list of candidates and return the candidates that fulfil the policy requirements. candidates: the list to be filtered. router: the router in which the decision is being made. topology: The network topology. rng: the global random number generator.