aboutsummaryrefslogtreecommitdiff
path: root/config/odp-linux-dpdk.conf
blob: 0c541fdd54134e79c6b2f2592020eeb927e79fc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# ODP runtime configuration options
#
# This template configuration file (odp-linux-dpdk.conf) is hardcoded
# during configure/build phase and the values defined here are used if
# optional ODP_CONFIG_FILE is not set. This configuration file MUST
# include all configuration options.
#
# ODP_CONFIG_FILE can be used to override default values and it doesn't
# have to include all available options. The missing options are
# replaced with hardcoded default values.
#
# The options defined here are implementation specific and valid option
# values should be checked from the implementation code.
#
# See libconfig syntax: https://hyperrealm.github.io/libconfig/libconfig_manual.html#Configuration-Files

# Mandatory fields
odp_implementation = "linux-dpdk"
config_file_version = "0.1.11"

# System options
system: {
	# CPU frequency value returned by odp_cpu_hz() and odp_cpu_hz_id()
	# calls on platforms where frequency isn't available using standard
	# Linux methods.
	cpu_mhz = 0

	# CPU max frequency value returned by odp_cpu_hz_max() and
	# odp_cpu_hz_max_id() calls on platforms where max frequency isn't
	# available using standard Linux methods.
	cpu_mhz_max = 1400

	# Maximum number of ODP threads that can be created.
	# odp_thread_count_max() returns this value or the build time
	# maximum ODP_THREAD_COUNT_MAX, whichever is lower. This setting
	# can be used to reduce thread related resource usage.
	thread_count_max = 256
}

# DPDK options
dpdk: {
	# Amount of preallocated memory for process mode usage in megabytes
	#
	# NOTE: Process mode is not officially supported by DPDK. Application
	# should reserve all shared resources and configure the system before
	# forking child processes for the best success probability.
	process_mode_memory_mb = 512
}

# Pool options
pool: {
	# Packet pool options
	pkt: {
		# Maximum number of packets per pool. Power of two minus one
		# results optimal memory usage (e.g. (256 * 1024) - 1).
		max_num = 262143
	}
}

# General pktio options
pktio: {
	# Not supported by ODP-DPDK!
	pktin_frame_offset = 0
}

# DPDK pktio options
pktio_dpdk: {
	# Default options
	num_rx_desc = 128
	num_tx_desc = 256
	rx_drop_en = 0

	# Enable receipt of Ethernet frames sent to any multicast group
	multicast_en = 1

	# Driver specific options (use PMD names from DPDK)
	net_ixgbe: {
		rx_drop_en = 1
	}
}

queue_basic: {
	# Maximum queue size. Power of two minus one results optimal memory
	# usage (e.g. (8 * 1024) - 1).
	max_queue_size = 8191

	# Default queue size. Power of two minus one results optimal memory
	# usage (e.g. (4 * 1024) - 1).
	default_queue_size = 4095
}

sched_basic: {
	# Priority level spread
	#
	# Each priority level is spread into multiple scheduler internal queues.
	# This value defines the number of those queues. Minimum value is 1.
	# Each thread prefers one of the queues over other queues. A higher
	# spread value typically improves parallelism and thus is better for
	# high thread counts, but causes uneven service level for low thread
	# counts. Typically, optimal value is the number of threads using
	# the scheduler.
	prio_spread = 4

	# Weight of the preferred scheduler internal queue
	#
	# Each thread prefers one of the internal queues over other queues.
	# This value controls how many times the preferred queue is polled
	# between a poll to another internal queue. Minimum value is 1. A higher
	# value typically improves parallelism as threads work mostly on their
	# preferred queues, but causes uneven service level for low thread
	# counts as non-preferred queues are served less often
	prio_spread_weight = 63

	# Burst size configuration per priority. The first array element
	# represents the highest queue priority. The scheduler tries to get
	# burst_size_default[prio] events from a queue and stashes those that
	# cannot be passed to the application immediately. More events than the
	# default burst size may be returned from application request, but no
	# more than burst_size_max[prio].
	#
	# Large burst sizes improve throughput, but decrease application
	# responsiveness to higher priority events due to head of line blocking
	# caused by a burst of lower priority events.
	burst_size_default = [ 32,  32,  32,  32,  32, 16,  8, 4]
	burst_size_max     = [255, 255, 255, 255, 255, 16, 16, 8]

	# Automatically updated schedule groups
	#
	# DEPRECATED: use odp_schedule_config() API instead
	#
	# API specification defines that ODP_SCHED_GROUP_ALL,
	# _WORKER and _CONTROL are updated automatically. These options can be
	# used to disable these group when not used. Set value to 0 to disable
	# a group. Performance may improve when unused groups are disabled.
	group_enable: {
		all     = 1
		worker  = 1
		control = 1
	}
}

sched_eventdev: {
	# Eventdev supports up to RTE_EVENT_MAX_QUEUES_PER_DEV queues and these
	# have to be mapped to ODP's scheduled queue types at startup. If the
	# combined number of queues is zero, eventdev queues are divined evenly
	# amongst the ODP queue types.
	num_atomic_queues = 0
	num_ordered_queues = 0
	num_parallel_queues = 0

	# Number of event ports (zero = all available). Each ODP worker
	# calling scheduler or doing queue enqueue requires a private event
	# port.
	num_ports = 0
}

timer: {
	# Inline timer poll interval
	#
	# When set to 1 inline timers are polled during every schedule round.
	# Increasing the value reduces timer processing overhead while
	# decreasing accuracy.
	inline_poll_interval = 10

	# Inline timer poll interval in nanoseconds
	#
	# When inline_poll_interval is larger than 1, use this option to limit
	# inline timer polling rate in nanoseconds. By default, this defines the
	# maximum rate a thread may poll timers. If a timer pool is created with
	# a higher resolution than this, the polling rate is increased
	# accordingly.
	inline_poll_interval_nsec = 500000
}