forked from iqiyi/dpvs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dpvs.conf.items
executable file
·223 lines (205 loc) · 6.65 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
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! 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>
}
! netif config
netif_defs {
<init> pktpool_size 524287 <65535, 1023-134217728>
<init> pktpool_cache 256 <256, 32-8192>
<init> device dpdk0 {
rx {
#max_burst_size 32
queue_number 6 <16, 0-16>
descriptor_number 128 <64, 16-8192>
rss ip <tcp, tcp|ip>
}
tx {
queue_number 6 <16, 0-16>
descriptor_number 256 <128, 16-8192>
}
! promisc_mode <disable>
! kni_name dpdk0.kni <char[32]>
}
<init> device dpdk1 {
rx {
#max_burst_size 32
queue_number 4
descriptor_number 128
rss tcp
}
tx {
queue_number 4
descriptor_number 256
}
! promisc_mode
! kni_name dpdk1.kni
}
<init> device bond0 {
mode 4 <0-6>
slave dpdk0 <device name>
slave dpdk1 <device name>
primary dpdk0 <device name, use primary slave queue conf for bond>
kni_name bond0.kni <char[32]>
}
}
! worker config (lcores)
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
}
}
}
! timer config
timer_defs {
# cpu job loops to schedule dpdk timer management
schedule_interval 500 <10, 1-10000000>
}
! dpvs neighbor config
neigh_defs {
<init> unres_queue_length 128 <128, 16-8192>
<init> pktpool_size 1023 <1023, 63-32767>
<init> pktpool_cache default <32, 2-512>
<init> timeout 60 <60, 1-3600>
}
! dpvs ipv4 config
ipv4_defs {
<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>
}
}
! control plane config
ctrl_defs {
lcore_msg {
#bucket_number 256
<init> ring_size 4096 <4096, 256-524288>
<init> multicast_queue_length 257 <256, 16-32768>
sync_msg_timeout_us 2000 <2000, 1-∞>
}
ipc_msg {
<init> unix_domain /var/run/dpvs_ctrl </var/run/dpvs_ctrl, max chars: 256>
}
}
! 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>
fast_xmit_close <disable>
}
udp {
defence_udp_drop <enable>
timeout { <1-31535999>
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 <disable>
! timestamp <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>
}