onload_stack_opt_set_int - onload_stack_opt_set_int - UG1586

Onload User Guide (UG1586)

Document ID
UG1586
Release Date
2026-01-22
Revision
1.4 English

Description

Set/modify per-stack options for all subsequently created stacks. These override any global per-stack environment options already set. When using this function, check the scope field on the environment variable, for example:

EF_CTPIO

Name: ctpio

Default: 1

Minimum: 0

Maximum: 2

Scope: Per-stack

The onload_stack_opt_set_int() function has no effect for per-process, per-thread options which should be set with onload_thread_set_spin().

Definition

int onload_stack_opt_set_int(const char* name, int64_t value)

Formal Parameters

name
Stack option to modify.
value
New value for the stack option.

Example

onload_stack_opt_set_int("EF_CTPIO", 1);

Return Value

0 on success.

errno set to EINVAL if the requested option is not found or ENOMEM.

Notes

  • Cannot be used to modify options on existing stacks - only for new stacks.
  • Cannot be used to modify per-process options - only per-stack options.
  • Modified options will be used for all newly created stacks until onload_stack_opt_reset() is called.