2017-04-21 10:43:26 +00:00
|
|
|
[dpdk]
|
2018-11-13 13:54:13 +00:00
|
|
|
# Hexadecimal bitmask of cores to run on.
|
2020-01-08 13:13:12 +00:00
|
|
|
lcore_mask=1
|
2018-11-13 13:54:13 +00:00
|
|
|
|
|
|
|
# Number of memory channels.
|
2017-04-21 10:43:26 +00:00
|
|
|
channel=4
|
2018-11-13 13:54:13 +00:00
|
|
|
|
|
|
|
# Specify base virtual address to map.
|
|
|
|
#base_virtaddr=0x7f0000000000
|
|
|
|
|
|
|
|
# Promiscuous mode of nic, defualt: enabled.
|
2017-04-21 10:43:26 +00:00
|
|
|
promiscuous=1
|
|
|
|
numa_on=1
|
2018-11-13 13:54:13 +00:00
|
|
|
|
2019-11-04 05:00:17 +00:00
|
|
|
# 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
|
|
|
|
|
2018-11-13 13:54:13 +00:00
|
|
|
# TCP segment offload, default: disabled.
|
2017-05-06 13:52:25 +00:00
|
|
|
tso=0
|
2018-11-13 13:54:13 +00:00
|
|
|
|
|
|
|
# HW vlan strip, default: enabled.
|
2017-08-09 08:52:16 +00:00
|
|
|
vlan_strip=1
|
2017-04-21 10:43:26 +00:00
|
|
|
|
2023-09-26 07:31:56 +00:00
|
|
|
# Set vlan filter id, to enable L3/L4 RSS below vlan hdr.
|
|
|
|
# the format is same as port_list
|
|
|
|
#vlan_filter=1,2,4-6
|
|
|
|
|
2018-08-17 17:45:11 +00:00
|
|
|
# sleep when no pkts incomming
|
|
|
|
# unit: microseconds
|
2019-06-26 10:37:55 +00:00
|
|
|
idle_sleep=0
|
2018-08-17 17:45:11 +00:00
|
|
|
|
2019-06-27 09:44:19 +00:00
|
|
|
# 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
|
|
|
|
|
2020-08-29 16:55:08 +00:00
|
|
|
# use symmetric Receive-side Scaling(RSS) key, default: disabled.
|
|
|
|
symmetric_rss=0
|
|
|
|
|
2017-09-14 11:51:07 +00:00
|
|
|
# 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
|
2017-12-01 08:53:57 +00:00
|
|
|
# 0-3 ports 0, 1,2,3 are enabled
|
2017-09-14 11:51:07 +00:00
|
|
|
# 1-3,4,7 ports 1,2,3,4,7 are enabled
|
2019-09-04 13:17:10 +00:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
2024-09-06 12:20:44 +00:00
|
|
|
#pci_whitelist=af:00.0
|
2017-09-14 11:51:07 +00:00
|
|
|
port_list=0
|
|
|
|
|
2019-06-26 10:37:55 +00:00
|
|
|
# Number of vdev.
|
|
|
|
nb_vdev=0
|
|
|
|
|
2019-09-04 13:17:10 +00:00
|
|
|
# Number of bond.
|
2019-09-04 13:56:15 +00:00
|
|
|
nb_bond=0
|
2019-09-04 13:17:10 +00:00
|
|
|
|
2020-01-08 12:38:15 +00:00
|
|
|
# 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
|
|
|
|
|
2018-11-13 13:54:13 +00:00
|
|
|
# Port config section
|
|
|
|
# Correspond to dpdk.port_list's index: port0, port1...
|
2017-04-21 10:43:26 +00:00
|
|
|
[port0]
|
2020-01-07 13:07:57 +00:00
|
|
|
addr=192.168.1.2
|
2022-04-08 06:54:34 +00:00
|
|
|
netmask=255.255.255.0
|
2020-01-07 13:07:57 +00:00
|
|
|
broadcast=192.168.1.255
|
|
|
|
gateway=192.168.1.1
|
2024-09-06 12:20:44 +00:00
|
|
|
# set interface name, Optional parameter.
|
|
|
|
#if_name=f-stack-0
|
2021-01-21 14:53:48 +00:00
|
|
|
# IPv6 net addr
|
|
|
|
# Optional parameters
|
|
|
|
#addr6=ff::02
|
|
|
|
#prefix_len=64
|
|
|
|
#gateway6=ff::01
|
2017-09-14 11:51:07 +00:00
|
|
|
|
2024-09-06 12:20:44 +00:00
|
|
|
# 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
|
|
|
|
|
2018-11-13 13:54:13 +00:00
|
|
|
# lcore list used to handle this port
|
|
|
|
# the format is same as port_list
|
2019-09-04 13:17:10 +00:00
|
|
|
#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
|
2017-09-14 11:51:07 +00:00
|
|
|
|
2024-09-06 12:20:44 +00:00
|
|
|
# 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
|
2019-06-26 10:37:55 +00:00
|
|
|
|
|
|
|
# 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
|
2018-11-26 18:02:38 +00:00
|
|
|
|
2019-09-04 13:17:10 +00:00
|
|
|
# bond config section
|
|
|
|
# See http://doc.dpdk.org/guides/prog_guide/link_bonding_poll_mode_drv_lib.html
|
2019-12-11 12:23:47 +00:00
|
|
|
#[bond0]
|
2019-09-04 13:17:10 +00:00
|
|
|
#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
|
|
|
|
|
2018-11-13 13:54:13 +00:00
|
|
|
# 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.
|
2019-06-26 10:37:55 +00:00
|
|
|
#[kni]
|
|
|
|
#enable=1
|
|
|
|
#method=reject
|
2018-11-13 13:54:13 +00:00
|
|
|
# The format is same as port_list
|
2019-06-26 10:37:55 +00:00
|
|
|
#tcp_port=80,443
|
2017-04-21 10:43:26 +00:00
|
|
|
#udp_port=53
|
2024-10-11 03:19:02 +00:00
|
|
|
# KNI ratelimit value, default: 0, means disable ratelimit.
|
|
|
|
# example:
|
2024-10-10 09:48:40 +00:00
|
|
|
# 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.
|
2024-10-11 03:19:02 +00:00
|
|
|
#console_packets_ratelimit=0
|
|
|
|
#general_packets_ratelimit=0
|
|
|
|
#kernel_packets_ratelimit=0
|
2017-04-21 10:43:26 +00:00
|
|
|
|
2018-11-13 13:54:13 +00:00
|
|
|
# FreeBSD network performance tuning configurations.
|
|
|
|
# Most native FreeBSD configurations are supported.
|
2017-04-21 10:43:26 +00:00
|
|
|
[freebsd.boot]
|
|
|
|
hz=100
|
|
|
|
|
2018-11-13 13:54:13 +00:00
|
|
|
# Block out a range of descriptors to avoid overlap
|
|
|
|
# with the kernel's descriptor space.
|
|
|
|
# You can increase this value according to your app.
|
2017-08-08 14:36:49 +00:00
|
|
|
fd_reserve=1024
|
|
|
|
|
2017-04-21 10:43:26 +00:00
|
|
|
kern.ipc.maxsockets=262144
|
|
|
|
|
|
|
|
net.inet.tcp.syncache.hashsize=4096
|
|
|
|
net.inet.tcp.syncache.bucketlimit=100
|
|
|
|
|
|
|
|
net.inet.tcp.tcbhashsize=65536
|
|
|
|
|
2018-03-01 08:07:35 +00:00
|
|
|
kern.ncallout=262144
|
|
|
|
|
2019-07-12 12:56:01 +00:00
|
|
|
kern.features.inet6=1
|
|
|
|
net.inet6.ip6.auto_linklocal=1
|
|
|
|
net.inet6.ip6.accept_rtadv=2
|
|
|
|
net.inet6.icmp6.rediraccept=1
|
|
|
|
net.inet6.ip6.forwarding=0
|
|
|
|
|
2017-04-21 10:43:26 +00:00
|
|
|
[freebsd.sysctl]
|
|
|
|
kern.ipc.somaxconn=32768
|
|
|
|
kern.ipc.maxsockbuf=16777216
|
|
|
|
|
2017-11-08 09:45:08 +00:00
|
|
|
net.link.ether.inet.maxhold=5
|
|
|
|
|
2017-04-21 10:43:26 +00:00
|
|
|
net.inet.tcp.fast_finwait2_recycle=1
|
|
|
|
net.inet.tcp.sendspace=16384
|
|
|
|
net.inet.tcp.recvspace=8192
|
2019-08-11 10:28:07 +00:00
|
|
|
#net.inet.tcp.nolocaltimewait=1
|
2017-09-21 06:57:01 +00:00
|
|
|
net.inet.tcp.cc.algorithm=cubic
|
2017-04-21 10:43:26 +00:00
|
|
|
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
|
2017-09-21 06:57:01 +00:00
|
|
|
net.inet.tcp.sack.enable=1
|
2017-04-21 10:43:26 +00:00
|
|
|
net.inet.tcp.blackhole=1
|
|
|
|
net.inet.tcp.msl=2000
|
2022-04-08 06:52:25 +00:00
|
|
|
net.inet.tcp.delayed_ack=1
|
2017-04-21 10:43:26 +00:00
|
|
|
|
|
|
|
net.inet.udp.blackhole=1
|
|
|
|
net.inet.ip.redirect=0
|
2019-12-11 12:23:47 +00:00
|
|
|
net.inet.ip.forwarding=0
|