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