-
Notifications
You must be signed in to change notification settings - Fork 951
Expand file tree
/
Copy pathconfig.ini
More file actions
338 lines (295 loc) · 10.7 KB
/
config.ini
File metadata and controls
338 lines (295 loc) · 10.7 KB
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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
[dpdk]
# Hexadecimal bitmask of cores to run on.
lcore_mask=1
# Number of memory channels.
channel=4
# Specify base virtual address to map.
#base_virtaddr=0x7f0000000000
# Promiscuous mode of nic, defualt: enabled.
promiscuous=1
numa_on=1
# TX checksum offload skip, default: disabled.
# We need this switch enabled in the following cases:
# -> The application want to enforce wrong checksum for testing purposes
# -> Some cards advertize the offload capability. However, doesn't calculate checksum.
tx_csum_offoad_skip=0
# TCP segment offload, default: disabled.
tso=0
# HW vlan strip, default: enabled.
vlan_strip=1
# Set [vlanN]'s addrs like [portN] later
# the format is same as port_list
# Set vlan filter id, to enable L3/L4 RSS below vlan hdr is not enable after f-stack-1.22.
vlan_filter=1,2,4-6
# sleep when no pkts incomming
# unit: microseconds
idle_sleep=0
# sent packet delay time(0-100) while send less than 32 pkts.
# default 100 us.
# if set 0, means send pkts immediately.
# if set >100, will dealy 100 us.
# unit: microseconds
pkt_tx_delay=100
# use symmetric Receive-side Scaling(RSS) key, default: disabled.
symmetric_rss=0
# PCI device enable list.
# And driver options
#allow=02:00.0
# for multiple PCI devices
#allow=02:00.0,03:00.0
# enabled port list
#
# EBNF grammar:
#
# exp ::= num_list {"," num_list}
# num_list ::= <num> | <range>
# range ::= <num>"-"<num>
# num ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
#
# examples
# 0-3 ports 0, 1,2,3 are enabled
# 1-3,4,7 ports 1,2,3,4,7 are enabled
#
# If use bonding, shoule config the bonding port id in port_list
# and not config slave port id in port_list
# such as, port 0 and port 1 trank to a bonding port 2,
# should set `port_list=2` and config `[port2]` section
port_list=0
# Number of vdev.
nb_vdev=0
# Number of bond.
nb_bond=0
# log level for dpdk, optional
#log_level=8
# Log file level and prefix of F-Stack lib and FreeBSD.
# fstack_log_level: 0-8, default 0.
# 0 : means disable log file, and output to stdout/stderr/syslog(/var/log/message), etc.
# 1-8 : log level, same to DPDK's log level, equal to system's log levle + 1.
# 1 = EMERG
# 2 = ALERT
# 3 = CRIT
# 4 = ERR
# 5 = WARNING
# 6 = NOTICE
# 7 = INFO
# 8 = DEBUG
# fstack_log_file_prefix : log file prefix, and <proc_id> will splice with prefix, such as "./f-stack-0".
#fstack_log_level=0
#fstack_log_file_prefix=./f-stack-
# Each core write into own pcap file, which is open one time, close one time if enough.
# Support dump the first snaplen bytes of each packet.
# if pcap file is lager than savelen bytes, it will be closed and next file was dumped into.
[pcap]
enable=0
snaplen=96
savelen=16777216
savepath=.
# Port config section
# Correspond to dpdk.port_list's index: port0, port1...
[port0]
addr=192.168.1.2
netmask=255.255.255.0
broadcast=192.168.1.255
gateway=192.168.1.1
# set interface name, Optional parameter.
#if_name=eno7
# IPv6 net addr, Optional parameters.
#addr6=ff::02
#prefix_len=64
#gateway6=ff::01
# Multi virtual IPv4/IPv6 net addr, Optional parameters.
# `vip_ifname`: default `f-stack-x`
# `vip_addr`: Separated by semicolons, MAX number 64;
# Only support netmask 255.255.255.255, broadcast x.x.x.255 now, hard code in `ff_veth_setvaddr`.
# `ipfw_pr`: Set simplest policy routing, Optional parameters.
# Such as the cmd `ff_ipfw -P 0 add 100 setfib 0 ip from 192.168.0.0/24 to any out`
# can set parameter`192.168.0.0 255.255.255.0`, cidr and netmask separated by space.
# Multi cidr separated by semicolons.
# IPv4 only now, and if you want set more complex policy routing, should use tool `ff_ipfw`.
# `vip_addr6`: Separated by semicolons, MAX number 64.
# `vip_prefix_len`: All addr6 use the same prefix now, default 64.
#vip_ifname=lo0
#vip_addr=192.168.0.3;192.168.0.4;192.168.0.5;192.168.0.6
#ipfw_pr=192.168.0.0 255.255.255.0;192.168.10.0 255.255.255.0
#vip_addr6=ff::03;ff::04;ff::05;ff::06;ff::07
#vip_prefix_len=64
# lcore list used to handle this port
# the format is same as port_list
#lcore_list=0
# bonding slave port list used to handle this port
# need to config while this port is a bonding port
# the format is same as port_list
#slave_port_list=0,1
# Vlan config section, Must set after all [portN]
# NOTE1: Must enable dpdk.vlan_filter first, and match it.
# NOTE2: If enable vlan config, all [PortN] config will be ignored!
#[vlan1]
#portid=0
#addr=192.169.0.2
#netmask=255.255.255.0
#broadcast=192.169.0.255
#gateway=192.169.0.1
#
#vip_addr=192.169.0.3;192.169.0.4;192.169.0.5;192.169.0.6
#ipfw_pr=192.169.0.0 255.255.255.0;192.169.10.0 255.255.255.0
#
#[vlan2]
#portid=0
#addr=192.169.1.2
#netmask=255.255.255.0
#broadcast=192.169.1.255
#gateway=192.169.1.1
#
#vip_addr=192.169.1.3;192.169.1.4;192.169.1.5;192.169.1.6
#ipfw_pr=192.169.1.0 255.255.255.0;192.169.11.0 255.255.255.0
#
#[vlan4]
#portid=0
#addr=192.169.2.2
#netmask=255.255.255.0
#broadcast=192.169.2.255
#gateway=192.169.2.1
#
#vip_addr=192.169.2.3;192.169.2.4;192.169.2.5;192.169.2.6
#ipfw_pr=192.169.2.0 255.255.255.0;192.169.12.0 255.255.255.0
#
#[vlan5]
#portid=0
#addr=192.169.3.2
#netmask=255.255.255.0
#broadcast=192.169.3.255
#gateway=192.169.3.1
#
#addr6=fe::32
#prefix_len=64
#gateway6=fe::31
#
#vip_addr=192.169.3.3;192.169.3.4;192.169.3.5;192.169.3.6
#ipfw_pr=192.169.3.0 255.255.255.0;192.169.13.0 255.255.255.0
#vip_addr6=fe::33;fe::34;fe::35;fe::36;fe::37
#vip_prefix_len=64
# Vdev config section
# orrespond to dpdk.nb_vdev's index: vdev0, vdev1...
# iface : Shouldn't set always.
# path : The vuser device path in container. Required.
# queues : The max queues of vuser. Optional, default 1, greater or equal to the number of processes.
# queue_size : Queue size.Optional, default 256.
# mac : The mac address of vuser. Optional, default random, if vhost use phy NIC, it should be set to the phy NIC's mac.
# cq : Optional, if queues = 1, default 0; if queues > 1 default 1.
#[vdev0]
##iface=/usr/local/var/run/openvswitch/vhost-user0
#path=/var/run/openvswitch/vhost-user0
#queues=1
#queue_size=256
#mac=00:00:00:00:00:01
#cq=0
# bond config section
# See http://doc.dpdk.org/guides/prog_guide/link_bonding_poll_mode_drv_lib.html
#[bond0]
#mode=4
#slave=0000:0a:00.0,slave=0000:0a:00.1
#primary=0000:0a:00.0
#mac=f0:98:38:xx:xx:xx
## opt argument
#socket_id=0
#xmit_policy=l23
#lsc_poll_period_ms=100
#up_delay=10
#down_delay=50
# ff_rss_check table config section
# To enable or disable static ff_rss_check table.
# If enable it, F-Stack will init the table while the APP is starting.
# Then the APP connect to a sever as client, it will try select a local port from the inited table first.
#
# This feature will greatly improve the performance of selecting local port
# when the F-Stack application actively access remote services as a client and not set keep-alive.
# If the local port is idle, it only needs to be selected once,
# and no longer needs to be selected multiple times (the average number of times is about the total number of processes).
# And the performance of selecting available local ports at a time is also improved compared to ff_rss_check().
# If get rss local port failed, it will be fallback to ff_rss_check().
#
# enable : 0 means disable, 1 means enable. Default 0.
# rss_tbl : Set 4-tuple for ff_rss_check table, Required argumnet.
# <porit_id> <daddr(local addr)> <saddr(remote addr)> <sport(remote port)>
# Separated by space in one 4-tuple, and separated by semicolon between multi 4-tuples.
# The max supported num of 2-tuple with saddr and sport is 4 * 4 = 16.
# The max supported num of daddr with one same saddr and sport is 4.
# So the max combination num of 4-tuple is 16 * 4 = 64, other config will be ignored.
[rss_check]
enable=0
rss_tbl=0 192.168.1.1 192.168.2.1 80;0 192.168.1.1 192.168.2.1 443
# Kni config: if enabled and method=reject,
# all packets that do not belong to the following tcp_port and udp_port
# will transmit to kernel; if method=accept, all packets that belong to
# the following tcp_port and udp_port will transmit to kernel.
#[kni]
#enable=1
#method=reject
# The format is same as port_list
#tcp_port=80,443
#udp_port=53
# KNI ratelimit value, default: 0, means disable ratelimit.
# example:
# The total speed limit for a single process entering the kni ring is 10,000 QPS,
# 1000 QPS for general packets, 9000 QPS for console packets (ospf/arp, etc.)
# The total speed limit for kni forwarding to the kernel is 20,000 QPS.
#console_packets_ratelimit=0
#general_packets_ratelimit=0
#kernel_packets_ratelimit=0
# FreeBSD network performance tuning configurations.
# Most native FreeBSD configurations are supported.
[freebsd.boot]
# If use rack/bbr which depend HPTS, you should set a greater value of hz, such as 1000000 means a tick is 1us.
hz=100
# Block out a range of descriptors to avoid overlap
# with the kernel's descriptor space.
# You can increase this value according to your app.
fd_reserve=1024
kern.ipc.maxsockets=262144
net.inet.tcp.syncache.hashsize=4096
net.inet.tcp.syncache.bucketlimit=100
net.inet.tcp.tcbhashsize=65536
kern.ncallout=262144
kern.features.inet6=1
[freebsd.sysctl]
kern.ipc.somaxconn=32768
kern.ipc.maxsockbuf=16777216
net.add_addr_allfibs=1
net.link.ether.inet.maxhold=5
net.inet.tcp.fast_finwait2_recycle=1
net.inet.tcp.finwait2_timeout=5000
net.inet.tcp.maxtcptw=128
net.inet.tcp.sendspace=16384
net.inet.tcp.recvspace=8192
#net.inet.tcp.nolocaltimewait=1
net.inet.tcp.cc.algorithm=cubic
net.inet.tcp.sendbuf_max=16777216
net.inet.tcp.recvbuf_max=16777216
net.inet.tcp.sendbuf_auto=1
net.inet.tcp.recvbuf_auto=1
net.inet.tcp.sendbuf_inc=16384
#net.inet.tcp.recvbuf_inc=524288
net.inet.tcp.sack.enable=1
net.inet.tcp.blackhole=1
net.inet.tcp.msl=2000
net.inet.tcp.delayed_ack=1
net.inet.tcp.rfc1323=1
net.inet.udp.blackhole=1
net.inet.ip.redirect=0
net.inet.ip.forwarding=0
net.inet.ip.portrange.randomized=1
# Always do random while connect to remote server.
# In some scenarios of F-Stack application, the performance can be improved to a certain extent, ablout 5%.
net.inet.ip.portrange.randomtime=0
net.inet6.ip6.auto_linklocal=1
net.inet6.ip6.accept_rtadv=2
net.inet6.icmp6.rediraccept=1
net.inet6.ip6.forwarding=0
# set default stacks:freebsd, rack or bbr, may be you need increase the value of parameter 'freebsd.boot.hz' while use rack or bbr.
net.inet.tcp.functions_default=freebsd
# need by bbr, should enable it.
net.inet.tcp.hpts.skip_swi=1
# Interval between calls to hpts_timeout_dir. default min 250us, max 256-512ms, default 512ms.
net.inet.tcp.hpts.minsleep=250
# [25600-51200]
net.inet.tcp.hpts.maxsleep=51200