xref: /f-stack/config.ini (revision 73e135b8)
1[dpdk]
2# Hexadecimal bitmask of cores to run on.
3lcore_mask=1
4
5# Number of memory channels.
6channel=4
7
8# Specify base virtual address to map.
9#base_virtaddr=0x7f0000000000
10
11# Promiscuous mode of nic, defualt: enabled.
12promiscuous=1
13numa_on=1
14
15# TCP segment offload, default: disabled.
16tso=0
17
18# HW vlan strip, default: enabled.
19vlan_strip=1
20
21# sleep when no pkts incomming
22# unit: microseconds
23idle_sleep=0
24
25# sent packet delay time(0-100) while send less than 32 pkts.
26# default 100 us.
27# if set 0, means send pkts immediately.
28# if set >100, will dealy 100 us.
29# unit: microseconds
30pkt_tx_delay=100
31
32# enabled port list
33#
34# EBNF grammar:
35#
36#    exp      ::= num_list {"," num_list}
37#    num_list ::= <num> | <range>
38#    range    ::= <num>"-"<num>
39#    num      ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
40#
41# examples
42#    0-3       ports 0, 1,2,3 are enabled
43#    1-3,4,7   ports 1,2,3,4,7 are enabled
44#
45# If use bonding, shoule config the bonding port id in port_list
46# and not config slave port id in port_list
47# such as, port 0 and port 1 trank to a bonding port 2,
48# should set `port_list=2` and config `[port2]` section
49
50port_list=0
51
52# Number of vdev.
53nb_vdev=0
54
55# Number of bond.
56nb_bond=0
57
58# Port config section
59# Correspond to dpdk.port_list's index: port0, port1...
60[port0]
61addr=192.168.1.2
62netmask=255.255.225.0
63broadcast=192.168.1.255
64gateway=192.168.1.1
65
66# lcore list used to handle this port
67# the format is same as port_list
68#lcore_list=0
69
70# bonding slave port list used to handle this port
71# need to config while this port is a bonding port
72# the format is same as port_list
73#slave_port_list=0,1
74
75# Packet capture path, this will hurt performance
76#pcap=./a.pcap
77
78# Vdev config section
79# orrespond to dpdk.nb_vdev's index: vdev0, vdev1...
80#    iface : Shouldn't set always.
81#    path : The vuser device path in container. Required.
82#    queues : The max queues of vuser. Optional, default 1, greater or equal to the number of processes.
83#    queue_size : Queue size.Optional, default 256.
84#    mac : The mac address of vuser. Optional, default random, if vhost use phy NIC, it should be set to the phy NIC's mac.
85#    cq : Optional, if queues = 1, default 0; if queues > 1 default 1.
86#[vdev0]
87##iface=/usr/local/var/run/openvswitch/vhost-user0
88#path=/var/run/openvswitch/vhost-user0
89#queues=1
90#queue_size=256
91#mac=00:00:00:00:00:01
92#cq=0
93
94# bond config section
95# See http://doc.dpdk.org/guides/prog_guide/link_bonding_poll_mode_drv_lib.html
96[bond0]
97#mode=4
98#slave=0000:0a:00.0,slave=0000:0a:00.1
99#primary=0000:0a:00.0
100#mac=f0:98:38:xx:xx:xx
101## opt argument
102#socket_id=0
103#xmit_policy=l23
104#lsc_poll_period_ms=100
105#up_delay=10
106#down_delay=50
107
108# Kni config: if enabled and method=reject,
109# all packets that do not belong to the following tcp_port and udp_port
110# will transmit to kernel; if method=accept, all packets that belong to
111# the following tcp_port and udp_port will transmit to kernel.
112#[kni]
113#enable=1
114#method=reject
115# The format is same as port_list
116#tcp_port=80,443
117#udp_port=53
118
119# FreeBSD network performance tuning configurations.
120# Most native FreeBSD configurations are supported.
121[freebsd.boot]
122hz=100
123
124# Block out a range of descriptors to avoid overlap
125# with the kernel's descriptor space.
126# You can increase this value according to your app.
127fd_reserve=1024
128
129kern.ipc.maxsockets=262144
130
131net.inet.tcp.syncache.hashsize=4096
132net.inet.tcp.syncache.bucketlimit=100
133
134net.inet.tcp.tcbhashsize=65536
135
136kern.ncallout=262144
137
138kern.features.inet6=1
139net.inet6.ip6.auto_linklocal=1
140net.inet6.ip6.accept_rtadv=2
141net.inet6.icmp6.rediraccept=1
142net.inet6.ip6.forwarding=0
143
144[freebsd.sysctl]
145kern.ipc.somaxconn=32768
146kern.ipc.maxsockbuf=16777216
147
148net.link.ether.inet.maxhold=5
149
150net.inet.tcp.fast_finwait2_recycle=1
151net.inet.tcp.sendspace=16384
152net.inet.tcp.recvspace=8192
153#net.inet.tcp.nolocaltimewait=1
154net.inet.tcp.cc.algorithm=cubic
155net.inet.tcp.sendbuf_max=16777216
156net.inet.tcp.recvbuf_max=16777216
157net.inet.tcp.sendbuf_auto=1
158net.inet.tcp.recvbuf_auto=1
159net.inet.tcp.sendbuf_inc=16384
160net.inet.tcp.recvbuf_inc=524288
161net.inet.tcp.sack.enable=1
162net.inet.tcp.blackhole=1
163net.inet.tcp.msl=2000
164net.inet.tcp.delayed_ack=0
165
166net.inet.udp.blackhole=1
167net.inet.ip.redirect=0
168