[][src]Struct dpdk_unix::android_linux::ProcessCommonConfiguration

pub struct ProcessCommonConfiguration {
    pub logging_configuration: LoggingConfiguration,
    pub locale: &'static [u8],
    pub process_niceness: ProcessNiceness,
    pub system_control_settings: HashMap<String, u64>,
    pub warnings_to_suppress: WarningsToSuppress,
    pub daemonize: Option<Daemonize>,
    pub proc_path: ProcPath,
    pub sys_path: SysPath,
    pub dev_path: DevPath,
}

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]

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 of isolcpus.
  • 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]

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]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]