# =============================================================================
# teto-dpdk / F-Stack configuration
# Active settings for Docker + TAP development. All other supported keys are
# shown as comments. See docs/config-reference.md for full documentation.
# =============================================================================
[dpdk]
# --- Core assignment ---
# Hexadecimal bitmask of CPU cores DPDK may use. 1 = core 0 only.
lcore_mask=1
# --- Memory ---
# Use anonymous memory instead of hugepages. Required in Docker.
# Remove on bare metal and configure real hugepages instead.
# Note: must be "no_huge" (underscore) — "no-huge" is silently ignored.
no_huge=1
memory=512
# Number of memory channels. Set to match your hardware (typical: 2 or 4).
# Omit when using no_huge=1.
#channel=4
# Specify base virtual address for DPDK memory mapping.
#base_virtaddr=0x7f0000000000
# --- NIC / port ---
# PCI address of the NIC to use (bare metal / AWS SR-IOV only).
# When set, remove the --vdev TAP injection from fstack_wrapper.cpp.
#allow=0000:00:1f.6
# Comma-separated list of DPDK port IDs F-Stack will manage.
port_list=0
# Put the NIC in promiscuous mode (accept all Ethernet frames).
promiscuous=1
# NUMA-aware memory allocation. Set to 0 in Docker or single-socket systems.
#numa_on=1
# --- Offloading ---
# Skip TX checksum offload. Required for TAP devices (no HW offload).
tx_csum_offoad_skip=1
# TCP Segmentation Offload. 0 = disabled (default).
#tso=0
# TX checksum offload skip for individual packet types. See DPDK docs.
#tx_csum_offoad_skip=0
# Strip VLAN tags in HW. 1 = enabled (default).
#vlan_strip=1
# VLAN filter IDs to enable. Comma/range separated, e.g. 1,2,4-6.
#vlan_filter=1,2,4-6
# --- Pacing ---
# Sleep this many microseconds when no packets are incoming (reduces CPU burn).
# 0 = never sleep (maximum throughput / minimum latency).
#idle_sleep=0
# Delay in microseconds before flushing TX burst when < 32 packets queued.
# 0 = send immediately. Range: 0–100.
#pkt_tx_delay=100
# --- RSS ---
# Use symmetric RSS hash key (makes bidirectional flows hash to the same queue).
#symmetric_rss=0
# --- Multi-process ---
# Unique file prefix for DPDK shared memory, needed when running multiple
# F-Stack processes on the same host.
#file_prefix=myapp
# --- Logging ---
# DPDK log verbosity: 1=EMERG … 8=DEBUG.
#log_level=7
# F-Stack internal log level (same scale). 0 = disable (output to stderr).
#fstack_log_level=0
# Prefix for F-Stack log files (e.g. "./f-stack" produces ./f-stack-0.log).
#fstack_log_file_prefix=./f-stack
# --- Virtual / bonded devices ---
# Number of [vdevN] sections below. Used for virtio-user / vhost-user setups.
#nb_vdev=0
# Number of [bondN] sections below.
#nb_bond=0
# =============================================================================
# Port configuration — one [portN] per entry in port_list
# =============================================================================
[port0]
# IP address F-Stack assigns to this port's FreeBSD interface.
addr=10.0.0.1
netmask=255.255.255.0
broadcast=10.0.0.255
# For TAP: the kernel-side TAP IP. For bare metal: your actual gateway.
gateway=10.0.0.2
# CPU cores that handle RX/TX for this port. Must be within lcore_mask.
lcore_list=0
# Override the FreeBSD interface name (default: f-stack-0, f-stack-1, ...).
#if_name=eth0
# Virtual IP addresses hosted on this port (semicolon-separated, max 64).
#vip_addr=10.0.0.3;10.0.0.4
# Interface name for VIP aliases.
#vip_ifname=lo0
# Slave ports when this port is a bonding master (comma-separated).
#slave_port_list=1,2
# IPv6 (requires F-Stack compiled with INET6)
#addr6=fd00::1
#prefix_len=64
#gateway6=fd00::ff
#vip_addr6=fd00::2;fd00::3
#vip_prefix_len=64
# =============================================================================
# Virtual device — only needed if using F-Stack's vdev config (nb_vdev > 0).
# teto-dpdk injects the TAP vdev directly as an EAL arg; this section is shown
# for completeness and for vhost-user / virtio-user setups.
# =============================================================================
#[vdev0]
# Path to the vhost-user socket (required for virtio-user).
#path=/var/run/openvswitch/vhost-user0
# Override the kernel-visible interface name.
#iface=
# Number of queues (default 1). Must be >= number of processes.
#queues=1
#queue_size=256
# MAC address (default: random).
#mac=00:00:00:00:00:01
# Enable completion queue (required when queues > 1).
#cq=0
# =============================================================================
# Bonding — only needed if using NIC bonding (nb_bond > 0)
# =============================================================================
#[bond0]
# Bonding mode: 0=round-robin, 1=active-backup, 2=balance-xor,
# 3=broadcast, 4=802.3ad LACP, 5=balance-tlb, 6=balance-alb
#mode=4
# PCI addresses of slave ports (comma-separated).
#slave=0000:0a:00.0,0000:0a:00.1
# Primary slave for active-backup mode.
#primary=0000:0a:00.0
#mac=f0:98:38:xx:xx:xx
#socket_id=0
#xmit_policy=l23
#lsc_poll_period_ms=100
#up_delay=10
#down_delay=50
# =============================================================================
# VLAN — only needed when vlan_filter is set in [dpdk]
# One [vlanN] per VLAN ID listed in dpdk.vlan_filter.
# When VLAN sections are present, [portN] IP config is ignored entirely.
# =============================================================================
#[vlan1]
#portid=0
#addr=192.168.1.2
#netmask=255.255.255.0
#broadcast=192.168.1.255
#gateway=192.168.1.1
#vip_addr=192.168.1.3;192.168.1.4
# =============================================================================
# KNI — Kernel NIC Interface
# When enabled, packets not handled by F-Stack can be forwarded to the kernel.
# =============================================================================
#[kni]
# Enable KNI.
#enable=1
# "accept": forward only the listed ports to kernel.
# "reject": forward everything EXCEPT the listed ports to kernel.
#method=reject
#tcp_port=80,443
#udp_port=53
# Forwarding action for all packets when method is not port-based.
# alltokni: send all to kernel. alltoff: drop all. default: use method above.
#kni_action=default
# Per-process KNI rate limits (packets per second). 0 = disabled.
#console_packets_ratelimit=9000
#general_packets_ratelimit=1000
#kernel_packets_ratelimit=20000
# =============================================================================
# PCAP capture
# =============================================================================
#[pcap]
#enable=0
# Bytes to capture per packet (minimum 94).
#snaplen=96
# Max pcap file size in bytes before rotating (minimum ~8MB).
#savelen=16777216
#savepath=.
# =============================================================================
# RSS check table — optimises local port selection for outbound connections.
# Useful when F-Stack connects to remote servers at high rate.
# =============================================================================
#[rss_check]
#enable=0
# Format: port_id local_ip remote_ip remote_port; semicolon-separated.
#rss_tbl=0 192.168.1.1 192.168.2.1 80;0 192.168.1.1 192.168.2.1 443
# =============================================================================
# FreeBSD kernel boot parameters
# =============================================================================
[freebsd.boot]
# Kernel tick rate in Hz. 100 is standard. Use 1000000 for RACK/BBR (1µs tick).
hz=100
# Reserve this many low-numbered fds to avoid collisions with C library fds.
#fd_reserve=1024
# Physical memory to report to FreeBSD (bytes). Default: 256 MB.
#physmem=268435456
# Memory size for FreeBSD heap in MB. Default: 256.
#memsz_MB=256
# =============================================================================
# FreeBSD sysctl — any valid FreeBSD sysctl name is accepted here
# =============================================================================
[freebsd.sysctl]
# Disable UDP RX checksum validation. Required for TAP (partial checksums).
# Remove on bare metal — real NICs compute correct checksums.
net.inet.udp.checksum=0
# --- Socket buffers ---
#kern.ipc.maxsockets=262144
#kern.ipc.somaxconn=32768
#kern.ipc.maxsockbuf=16777216
# --- TCP tuning ---
#net.inet.tcp.syncache.hashsize=4096
#net.inet.tcp.syncache.bucketlimit=100
#net.inet.tcp.tcbhashsize=65536
#net.inet.tcp.recvspace=8192
#net.inet.tcp.sendspace=16384
#net.inet.tcp.recvbuf_max=16777216
#net.inet.tcp.sendbuf_max=16777216
#net.inet.tcp.recvbuf_auto=1
#net.inet.tcp.sendbuf_auto=1
#net.inet.tcp.recvbuf_inc=524288
#net.inet.tcp.sendbuf_inc=16384
#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.tcp.fast_finwait2_recycle=1
#net.inet.tcp.finwait2_timeout=5000
#net.inet.tcp.maxtcptw=128
#net.inet.tcp.nolocaltimewait=1
# Congestion control: freebsd (default), cubic, rack, bbr
#net.inet.tcp.cc.algorithm=cubic
# Required when using bbr
#net.inet.tcp.hpts.skip_swi=1
#net.inet.tcp.hpts.minsleep=250
#net.inet.tcp.hpts.maxsleep=51200
#net.inet.tcp.functions_default=freebsd
# --- UDP / IP ---
#net.inet.udp.blackhole=1
#net.inet.ip.redirect=0
#net.inet.ip.forwarding=0
#net.inet.ip.portrange.randomized=1
#net.inet.ip.portrange.randomtime=0
# --- IPv6 ---
#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
# --- Misc ---
#kern.ncallout=262144
#net.link.ether.inet.maxhold=5
#net.add_addr_allfibs=1