[−][src]Struct dpdk_unix::android_linux::ProcessCommonConfiguration
Process common configuration.
Fields
logging_configuration: LoggingConfiguration
Logging configuration.
locale: &'static [u8]
Locale.
process_niceness: ProcessNiceness
Process niceness.
system_control_settings: HashMap<String, u64>
System control settings (sysctl
).
By default turns off swapping.
warnings_to_suppress: WarningsToSuppress
Suppress any unwanted warnings about ideal CPU features or the Linux Kernel command line parameters.
daemonize: Option<Daemonize>
Should we daemonize? (Default, yes).
proc_path: ProcPath
Location of /proc
.
sys_path: SysPath
Location of /sys
.
dev_path: DevPath
Location of /dev
.
Methods
impl ProcessCommonConfiguration
[src]
pub fn execute(
self,
load_kernel_modules: impl Fn() -> Result<(), String>,
uses_enhanced_intel_speedstep_technology: bool,
isolated_cpus_required: bool,
additional_kernel_command_line_validations: impl FnOnce(&LinuxKernelCommandLineParameters) -> Result<(), String>,
main_loop: impl Fn(BTreeSet<HyperThread>, BTreeSet<HyperThread>, BTreeSet<HyperThread>, HyperThread) -> Result<Option<SignalNumber>, String>
) -> Result<(), ProcessCommonConfigurationExecutionError>
[src]
self,
load_kernel_modules: impl Fn() -> Result<(), String>,
uses_enhanced_intel_speedstep_technology: bool,
isolated_cpus_required: bool,
additional_kernel_command_line_validations: impl FnOnce(&LinuxKernelCommandLineParameters) -> Result<(), String>,
main_loop: impl Fn(BTreeSet<HyperThread>, BTreeSet<HyperThread>, BTreeSet<HyperThread>, HyperThread) -> Result<Option<SignalNumber>, String>
) -> Result<(), ProcessCommonConfigurationExecutionError>
Executes a program.
It is recommended that Linux run with at least 2 cores assigned to the Kernel; one of these will be used as a master logical core, and the other will be used for control threads as necessary. Neither usage is particularly high or critical.
If running interactively SIGINT
and SIGQUIT
are intercepted and will be re-raised (using libc's raise()
) after handling so that any parent shell can behave correctly.
Always returns normally; panics are handled and returned as ProcessCommonConfigurationExecutionError::ExecutionPanicked
.
Notes:-
- The daemon
irqbalance
should not really be run when this program is running. It isn't incompatible per se, but it isn't useful. - It is recommended to boot the kernel with the command line parameter
irqaffinity
set to the inverse ofisolcpus
. - If running causes Linux Kernel modules to load, these are not unloaded at process exit as we no longer have the permissions to do so.
- Likewise, if we mount
hugeltbfs
it is not unmounted (and, if we created its mount point folder, this is not deleted) at process exit.
pub fn lock_down_security()
[src]
- Removes most capabilities, except for those locking memory, binding ports, raw I/O, raw network ports and changing
nice
like values. - Disables dumpable.
- Removes the right to new privileges.
- Removes ambient capabilities.
- Locks all secure bits and removes the ability to raise or keep ambient capabilities.
pub fn lock_down_security_after_memory_locked()
[src]
Removes the ability to lock memory.
pub fn lock_down_thread_nice_value_setting()
[src]
Removes the ability to change a thread's nice value.
pub fn lock_down_raw_network_and_other_input_and_output()
[src]
Removes the ability to change a thread's nice value.
pub fn running_interactively(&self) -> bool
[src]
Are we running interactively?
pub fn disable_transparent_huge_pages(
&self
) -> Result<(), ProcessCommonConfigurationExecutionError>
[src]
&self
) -> Result<(), ProcessCommonConfigurationExecutionError>
Disable transparent huge pages (THP).
pub fn verify_hugetlbfs_is_supported(&self)
[src]
Verify hugetlbfs is supported.
Trait Implementations
impl Default for ProcessCommonConfiguration
[src]
impl Debug for ProcessCommonConfiguration
[src]
impl Deserialize<'static> for ProcessCommonConfiguration where
ProcessCommonConfiguration: Default,
[src]
ProcessCommonConfiguration: Default,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'static>,
[src]
__D: Deserializer<'static>,
Auto Trait Implementations
impl Send for ProcessCommonConfiguration
impl Sync for ProcessCommonConfiguration
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,