forked from iqiyi/dpvs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dpvs.conf.items
283 lines (261 loc) · 9.3 KB
/
dpvs.conf.items
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! All dpvs configuration items and corresponding attributes are listed in this file.
! The attributes including:
! * item type: <init> | <normal> default
! * item default value
! * item value range
! Note that dpvs configuration file supports the following comment type:
! * line comment: using '#" or '!'
! * inline range comment: using '<' and '>', put comment in between
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! global config
global_defs {
#daemon <disalbe>
log_level INFO <none>
log_file /var/log/dpvs.log <none>
log_with_timestamp off <off, on|off> # note: only effective for async log now
<init> log_async_mode off <off, on|off>
<init> log_async_pool_size 16383 <16383, 1023-unlimited>
<init> pdump off <off, on|off>
<init> kni on <on, on|off>
}
! netif config
netif_defs {
<init> pktpool_size 2097151 <65535, 1023-134217728>
<init> pktpool_cache 256 <256, 32-8192>
<init> fdir_mode perfect <perfect, perfect|signature> # only for ixgbe
<init> device dpdk0 {
rx {
#max_burst_size 32
queue_number 6 <16, 0-16>
descriptor_number 256 <256, 16-8192>
rss all <all, all|ip|tcp|udp|sctp|ether|port|tunnel>
}
tx {
queue_number 6 <16, 0-16>
descriptor_number 512 <512, 16-8192>
}
! mtu 1500 <1500,0-9000>
! promisc_mode <disable>
! allmulticast <disable>
! kni_name dpdk0.kni <char[32]>
}
<init> device dpdk1 {
rx {
#max_burst_size 32
queue_number 4
descriptor_number 128
rss all
}
tx {
queue_number 4
descriptor_number 256
}
! mtu 1500
! promisc_mode
! allmulticast <disable>
! kni_name dpdk1.kni
}
<init> bonding bond0 {
mode 4 <0-6>
slave dpdk0 <device name>
slave dpdk1 <device name>
primary dpdk0 <device name, use primary slave queue conf for bond>
numa_node 0 <0, int value from /sys/bus/pci/devices/[pci_bus]/numa_node>
kni_name bond0.kni <char[32]>
! supported options:
! dedicated_queues=on|enable|off|disable, default on
options OPT1=VAL1;OPT2=VAL2;...
}
}
! worker config (lcores)
! notes:
! 1. rx(tx) queue ids MUST start from 0 and continous
! 2. cpu ids and rx(tx) queue ids MUST be unique, repeated ids is forbidden
! 3. cpu ids identify dpvs workers only, and not correspond to physical cpu cores.
! If you are to specify cpu cores on which to run dpvs, please use dpdk eal options,
! such as "-c", "-l", "--lcores". Use "dpvs -- --help" for supported eal options.
worker_defs {
<init> worker cpu0 {
cpu_id 0
type master
}
<init> worker cpu1 {
type slave <salve, master|slave>
cpu_id 1 which cpu the worker thread runs on
port dpdk0 {
rx_queue_ids 0 4 <0, 0-16, space separated list>
tx_queue_ids 0 <0, 0-16, space separated list>
isol_rx_cpu_ids 8 8 <cpu id, forbid isol_rx if invalid>
isol_rxq_ring_sz 1048576 <1048576, 1024-2147483648, for all queues>
}
port dpdk1 {
rx_queue_ids 0
tx_queue_ids 0
}
}
<init> worker cpu2 {
type slave
cpu_id 2
port dpdk0 {
rx_queue_ids 1 5
tx_queue_ids 1
}
port dpdk1 {
rx_queue_ids 1
tx_queue_ids 1
}
}
<init> worker cpu3 {
type slave
cpu_id 3
port dpdk0 {
rx_queue_ids 2
tx_queue_ids 2 4 5
isol_rx_cpu_ids 9 [invalid id] 10
}
port dpdk1 {
rx_queue_ids 2
tx_queue_ids 2
}
}
<init> worker cpu4 {
type slave
cpu_id 4
port dpdk0 {
rx_queue_ids 3
tx_queue_ids 3
}
port dpdk1 {
rx_queue_ids 3
tx_queue_ids 3
}
}
! kni worker config, optional
! if not configure, kni packets are processed on master lcore
<init> worker cpu5 {
type kni
cpu_id 5
icmp_redirect_core
port dpdk0 {
rx_queue_ids 4
tx_queue_ids 6
}
port dpdk1 {
rx_queue_ids 4
tx_queue_ids 4
}
}
}
! timer config
timer_defs {
# time interval(us) to schedule dpdk timer management
schedule_interval 500 <10, 1-10000000>
}
! dpvs neighbor config
neigh_defs {
<init> unres_queue_length 128 <128, 16-8192>
timeout 60 <60, 1-3600>
}
! dpvs ipset config
ipset_defs {
<init> ipset_hash_pool_size 131072 <131072, 65536-524288>
}
! dpvs ipv4 config
ipv4_defs {
forwarding off <off, on/off>
<init> default_ttl 64 <64, 0-255>
fragment {
<init> bucket_number 4096 <4096, 32-65536>
<init> bucket_entries 16 <16, 1-256>
<init> max_entries 409600 <4096, 32-65536>
<init> ttl 1 <1, 1-255>
}
}
! dpvs ipv6 config
ipv6_defs {
disable off <off, on/off>
forwarding off <off, on/off>
route6 {
<init> method "hlist" <"hlist"/"lpm">
recycle_time 10 <10, 1-36000>
lpm {
<init> lpm6_max_rules 1024 <1024, 16-2147483647>
<init> lpm6_num_tbl8s 65536 <65536, 16-2147483647>
<init> rt6_array_size 65536 <65536, 16-2147483647>
<init> rt6_hash_bucket 256 <256, 2-2147483647>
}
}
}
! control plane config
ctrl_defs {
lcore_msg {
#bucket_number 256
<init> ring_size 4096 <4096, 256-524288>
sync_msg_timeout_us 2000 <2000, 1-∞>
priority_level low <low, low|norm|high|ign>
}
}
! ipvs config
ipvs_defs {
conn {
<init> conn_pool_size 2097152 <2097152, 65536-∞>
<init> conn_pool_cache 256 <256, 1-∞>
conn_init_timeout 3 <3, 1-31535999>
expire_quiescent_template <disable>
<init> fast_xmit_close <disable>
<init> redirect off <off/on: disable/enable packet redirect>
}
udp {
defence_udp_drop <enable>
uoa_mode opp <opp for private protocol by default, or ipo for IP-option mode>
uoa_max_trail 3 <max trails for send UOA for a connection>
timeout { <1-31535999>
oneway 300 <300>
normal 300 <300>
last 3 <3>
}
}
tcp {
defence_tcp_drop <enable>
timeout { <1-31535999>
none 3 <2>
established 91 <90>
syn_sent 4 <3>
syn_recv 31 <30>
fin_wait 8 <7>
time_wait 8 <7>
close 4 <3>
close_wait 8 <7>
last_ack 8 <7>
listen 121 <120>
synack 31 <30>
last 3 <2>
}
synproxy {
synack_options {
mss 1452 <1452, 1-65535>
ttl 63 <63, 1-255>
sack <enable>
! wscale <0, 0-14>
! timestamp <disable>
}
!close_client_window <disable>
!defer_rs_syn <disable>
rs_syn_max_retry 3 <3, 1-99>
ack_storm_thresh 10 <10, 1-999>
max_ack_saved 3 <1, 63>
conn_reuse_state {
close <enable>
time_wait <enable>
! fin_wait <disable>
! close_wait <disable>
! last_ack <disable>
}
}
}
}
sa_pool {
<init> pool_hash_size 16 <16, 1-128>
<init> flow_enable on <on, on|off>
}