API Reference Manual  1.48.0
odp_schedule_config_t Struct Reference

Schedule configuration. More...

#include <schedule_types.h>

Collaboration diagram for odp_schedule_config_t:
[legend]

Data Fields

uint32_t num_groups
 Maximum number of schedule groups to be supported. More...
 
uint32_t num_group_prios
 Maximum simultaneous number of group and priority combinations to be supported. More...
 
struct {
   odp_schedule_prio_t   min
 Minimum priority level to be supported. More...
 
   uint32_t   num
 Maximum number of priorities to be supported. More...
 
prio
 Priority range configuration. More...
 
uint32_t num_queues
 Maximum number of scheduled queues to be supported. More...
 
uint32_t queue_size
 Maximum number of events required to be stored simultaneously in scheduled queue. More...
 
uint32_t max_flow_id
 Maximum flow ID per queue. More...
 
struct {
   odp_bool_t   all
 ODP_SCHED_GROUP_ALL. More...
 
   odp_bool_t   control
 ODP_SCHED_GROUP_CONTROL. More...
 
   odp_bool_t   worker
 ODP_SCHED_GROUP_WORKER. More...
 
   odp_schedule_group_param_t   all_param
 Parameters for ODP_SCHED_GROUP_ALL schedule group.
 
   odp_schedule_group_param_t   control_param
 Parameters for ODP_SCHED_GROUP_CONTROL schedule group.
 
   odp_schedule_group_param_t   worker_param
 Parameters for ODP_SCHED_GROUP_WORKER schedule group.
 
sched_group
 Enable/disable predefined scheduling groups. More...
 

Detailed Description

Field Documentation

◆ num_groups

uint32_t odp_schedule_config_t::num_groups

Maximum number of schedule groups to be supported.

Can be used to optimize global group resource usage. The value includes the enabled predefined scheduling groups (ODP_SCHED_GROUP_ALL, ODP_SCHED_GROUP_WORKER, and ODP_SCHED_GROUP_CONTROL).

When configuring a value less than the number of predefined schedule groups, the unwanted groups must be disabled using 'sched_group'.

odp_schedule_capability_t::max_groups by default.

Definition at line 557 of file api/spec/schedule_types.h.

◆ num_group_prios

uint32_t odp_schedule_config_t::num_group_prios

Maximum simultaneous number of group and priority combinations to be supported.

Can be used to optimize global priority resource usage. Limits the maximum number of cumulative priority levels that can be assigned to all to-be-created groups. The value includes the enabled predefined scheduling group priorities (ODP_SCHED_GROUP_ALL, ODP_SCHED_GROUP_WORKER, and ODP_SCHED_GROUP_CONTROL).

For example, with the following global configuration:

  • 'num_groups' of 3
  • 'num_group_prios' of 10
  • 'prio.min' of 2 and 'prio.num' of 6 (a priority range from 2 to 7) The following could be a potential group setup (odp_schedule_group_param_t::prio):
  • a group with 1 priority
  • another group with 6 priorities
  • third group with 3 priorities
  • at most 3 groups (constrained by 'num_groups')
  • cumulative priority count of 10 (1 + 6 + 3, constrained by 'num_group_prios')
  • every priority within range of 2 to 7 (constrained by 'prio')

odp_schedule_capability_t::max_group_prios by default.

Definition at line 584 of file api/spec/schedule_types.h.

◆ min

odp_schedule_prio_t odp_schedule_config_t::min

Minimum priority level to be supported.

The priority range (from 'min' to 'min' + 'num' - 1) must fit within the implementation capabilities (from odp_schedule_capability_t::min_prio to odp_schedule_capability_t::max_prios - 1).

odp_schedule_capability_t::min_prio by default.

Definition at line 608 of file api/spec/schedule_types.h.

◆ num

uint32_t odp_schedule_config_t::num

Maximum number of priorities to be supported.

odp_schedule_capability_t::max_prios by default.

Definition at line 614 of file api/spec/schedule_types.h.

◆ 

struct { ... } odp_schedule_config_t::prio

Priority range configuration.

Can be used to optimize global priority resource usage. Forms a single global priority range which can be assumed to be continuous and spanning from the given 'min' minimum value up to a maximum value of 'min' + 'num' - 1.

The span of priorities within the global range can further be adjusted at group level with odp_schedule_group_param_t::prio. This enables a group to contain e.g. only a subset of priority levels from the global range.

◆ num_queues

uint32_t odp_schedule_config_t::num_queues

Maximum number of scheduled queues to be supported.

odp_schedule_capability_t::max_queues by default.

Examples
odp_cpu_bench.c.

Definition at line 622 of file api/spec/schedule_types.h.

◆ queue_size

uint32_t odp_schedule_config_t::queue_size

Maximum number of events required to be stored simultaneously in scheduled queue.

This number must not exceed 'max_queue_size' capability. A value of 0 configures default queue size supported by the implementation.

Examples
odp_cpu_bench.c, and odp_pktio_ordered.c.

Definition at line 630 of file api/spec/schedule_types.h.

◆ max_flow_id

uint32_t odp_schedule_config_t::max_flow_id

Maximum flow ID per queue.

This value must not exceed 'max_flow_id' capability. Flow aware mode of scheduling is enabled when the value is greater than 0. The default value is 0.

Application can assign events to specific flows by calling odp_event_flow_id_set() before enqueuing events into a scheduled queue. When in flow aware mode, the event flow id value affects scheduling of the event and synchronization is maintained per flow within each queue.

Depending on the implementation, there may be much more flows supported than queues, as flows are lightweight entities.

Examples
odp_bench_buffer.c, and odp_l2fwd.c.

Definition at line 647 of file api/spec/schedule_types.h.

◆ all

odp_bool_t odp_schedule_config_t::all

ODP_SCHED_GROUP_ALL.

0: Disable group 1: Enable group (default)

Examples
odp_stress.c.

Definition at line 660 of file api/spec/schedule_types.h.

◆ control

odp_bool_t odp_schedule_config_t::control

ODP_SCHED_GROUP_CONTROL.

0: Disable group 1: Enable group (default)

Examples
odp_stress.c.

Definition at line 667 of file api/spec/schedule_types.h.

◆ worker

odp_bool_t odp_schedule_config_t::worker

ODP_SCHED_GROUP_WORKER.

0: Disable group 1: Enable group (default)

Examples
odp_stress.c.

Definition at line 674 of file api/spec/schedule_types.h.

◆ 

struct { ... } odp_schedule_config_t::sched_group

Enable/disable predefined scheduling groups.

Application can additionally provide parameters for the to-be-enabled predefined schedule groups.

Examples
odp_stress.c.

The documentation for this struct was generated from the following file: