xref: /f-stack/config.ini (revision c211a249)
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# TX checksum offload skip, default: disabled.
16# We need this switch enabled in the following cases:
17# -> The application want to enforce wrong checksum for testing purposes
18# -> Some cards advertize the offload capability. However, doesn't calculate checksum.
19tx_csum_offoad_skip=0
20
21# TCP segment offload, default: disabled.
22tso=0
23
24# HW vlan strip, default: enabled.
25vlan_strip=1
26
27# sleep when no pkts incomming
28# unit: microseconds
29idle_sleep=0
30
31# sent packet delay time(0-100) while send less than 32 pkts.
32# default 100 us.
33# if set 0, means send pkts immediately.
34# if set >100, will dealy 100 us.
35# unit: microseconds
36pkt_tx_delay=100
37
38# use symmetric Receive-side Scaling(RSS) key, default: disabled.
39symmetric_rss=0
40
41# PCI device enable list.
42# And driver options
43#pci_whitelist=02:00.0
44# for multiple PCI devices
45#pci_whitelist=02:00.0,03:00.0
46
47# enabled port list
48#
49# EBNF grammar:
50#
51#    exp      ::= num_list {"," num_list}
52#    num_list ::= <num> | <range>
53#    range    ::= <num>"-"<num>
54#    num      ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
55#
56# examples
57#    0-3       ports 0, 1,2,3 are enabled
58#    1-3,4,7   ports 1,2,3,4,7 are enabled
59#
60# If use bonding, shoule config the bonding port id in port_list
61# and not config slave port id in port_list
62# such as, port 0 and port 1 trank to a bonding port 2,
63# should set `port_list=2` and config `[port2]` section
64
65port_list=0
66
67# Number of vdev.
68nb_vdev=0
69
70# Number of bond.
71nb_bond=0
72
73# Each core write into own pcap file, which is open one time, close one time if enough.
74# Support dump the first snaplen bytes of each packet.
75# if pcap file is lager than savelen bytes, it will be closed and next file was dumped into.
76[pcap]
77enable=0
78snaplen=96
79savelen=16777216
80savepath=.
81
82# Port config section
83# Correspond to dpdk.port_list's index: port0, port1...
84[port0]
85addr=192.168.1.2
86netmask=255.255.225.0
87broadcast=192.168.1.255
88gateway=192.168.1.1
89# set interface name, Optional parameter.
90#if_name=eno7
91
92# IPv6 net addr, Optional parameters.
93#addr6=ff::02
94#prefix_len=64
95#gateway6=ff::01
96
97# Multi virtual IPv4/IPv6 net addr, Optional parameters.
98#	`vip_ifname`: default `f-stack-x`
99#	`vip_addr`: Separated by semicolons, MAX number 64;
100#		    Only support netmask 255.255.255.255, broadcast x.x.x.255 now, hard code in `ff_veth_setvaddr`.
101#	`vip_addr6`: Separated by semicolons, MAX number 64.
102#	`vip_prefix_len`: All addr6 use the same prefix now, default 64.
103#vip_ifname=lo0
104#vip_addr=192.168.1.3;192.168.1.4;192.168.1.5;192.168.1.6
105#vip_addr6=ff::03;ff::04;ff::05;ff::06;ff::07
106#vip_prefix_len=64
107
108# lcore list used to handle this port
109# the format is same as port_list
110#lcore_list=0
111
112# bonding slave port list used to handle this port
113# need to config while this port is a bonding port
114# the format is same as port_list
115#slave_port_list=0,1
116
117# Vdev config section
118# orrespond to dpdk.nb_vdev's index: vdev0, vdev1...
119#    iface : Shouldn't set always.
120#    path : The vuser device path in container. Required.
121#    queues : The max queues of vuser. Optional, default 1, greater or equal to the number of processes.
122#    queue_size : Queue size.Optional, default 256.
123#    mac : The mac address of vuser. Optional, default random, if vhost use phy NIC, it should be set to the phy NIC's mac.
124#    cq : Optional, if queues = 1, default 0; if queues > 1 default 1.
125#[vdev0]
126##iface=/usr/local/var/run/openvswitch/vhost-user0
127#path=/var/run/openvswitch/vhost-user0
128#queues=1
129#queue_size=256
130#mac=00:00:00:00:00:01
131#cq=0
132
133# bond config section
134# See http://doc.dpdk.org/guides/prog_guide/link_bonding_poll_mode_drv_lib.html
135#[bond0]
136#mode=4
137#slave=0000:0a:00.0,slave=0000:0a:00.1
138#primary=0000:0a:00.0
139#mac=f0:98:38:xx:xx:xx
140## opt argument
141#socket_id=0
142#xmit_policy=l23
143#lsc_poll_period_ms=100
144#up_delay=10
145#down_delay=50
146
147# Kni config: if enabled and method=reject,
148# all packets that do not belong to the following tcp_port and udp_port
149# will transmit to kernel; if method=accept, all packets that belong to
150# the following tcp_port and udp_port will transmit to kernel.
151#[kni]
152#enable=1
153#method=reject
154# The format is same as port_list
155#tcp_port=80,443
156#udp_port=53
157
158# FreeBSD network performance tuning configurations.
159# Most native FreeBSD configurations are supported.
160[freebsd.boot]
161hz=100
162
163# Block out a range of descriptors to avoid overlap
164# with the kernel's descriptor space.
165# You can increase this value according to your app.
166fd_reserve=1024
167
168kern.ipc.maxsockets=262144
169
170net.inet.tcp.syncache.hashsize=4096
171net.inet.tcp.syncache.bucketlimit=100
172
173net.inet.tcp.tcbhashsize=65536
174
175kern.ncallout=262144
176
177kern.features.inet6=1
178net.inet6.ip6.auto_linklocal=1
179net.inet6.ip6.accept_rtadv=2
180net.inet6.icmp6.rediraccept=1
181net.inet6.ip6.forwarding=0
182
183[freebsd.sysctl]
184kern.ipc.somaxconn=32768
185kern.ipc.maxsockbuf=16777216
186
187net.link.ether.inet.maxhold=5
188
189net.inet.tcp.fast_finwait2_recycle=1
190net.inet.tcp.sendspace=16384
191net.inet.tcp.recvspace=8192
192#net.inet.tcp.nolocaltimewait=1
193net.inet.tcp.cc.algorithm=cubic
194net.inet.tcp.sendbuf_max=16777216
195net.inet.tcp.recvbuf_max=16777216
196net.inet.tcp.sendbuf_auto=1
197net.inet.tcp.recvbuf_auto=1
198net.inet.tcp.sendbuf_inc=16384
199#net.inet.tcp.recvbuf_inc=524288
200net.inet.tcp.sack.enable=1
201net.inet.tcp.blackhole=1
202net.inet.tcp.msl=2000
203net.inet.tcp.delayed_ack=0
204
205net.inet.udp.blackhole=1
206net.inet.ip.redirect=0
207net.inet.ip.forwarding=0
208
209#set default stacks:freebsd, rack or bbr
210net.inet.tcp.functions_default=freebsd
211