aboutsummaryrefslogtreecommitdiffstats
path: root/stacks/fstack/config
diff options
context:
space:
mode:
Diffstat (limited to 'stacks/fstack/config')
-rw-r--r--stacks/fstack/config/config.ini124
-rw-r--r--stacks/fstack/config/module_config.json28
-rw-r--r--stacks/fstack/config/rd_config.json10
3 files changed, 162 insertions, 0 deletions
diff --git a/stacks/fstack/config/config.ini b/stacks/fstack/config/config.ini
new file mode 100644
index 0000000..19a7e75
--- /dev/null
+++ b/stacks/fstack/config/config.ini
@@ -0,0 +1,124 @@
+[dpdk]
+# Hexadecimal bitmask of cores to run on.
+lcore_mask=1
+
+# Number of memory channels.
+channel=4
+
+# Specify base virtual address to map.
+#base_virtaddr=0x7f0000000000
+
+# Promiscuous mode of nic, defualt: enabled.
+promiscuous=1
+numa_on=1
+
+# TCP segment offload, default: disabled.
+tso=0
+
+# HW vlan strip, default: enabled.
+vlan_strip=1
+
+# sleep when no pkts incomming
+# unit: microseconds
+
+# 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
+# 0-3 ports 0, 1,2,3 are enabled
+# 1-3,4,7 ports 1,2,3,4,7 are enabled
+port_list=0
+
+# Number of vdev.
+
+# Port config section
+# Correspond to dpdk.port_list's index: port0, port1...
+[port0]
+addr=192.168.1.2
+netmask=255.255.255.0
+broadcast=192.168.1.255
+gateway=192.168.1.1
+
+# lcore list used to handle this port
+# the format is same as port_list
+# lcore_list= 0
+
+# Packet capture path, this will hurt performance
+#pcap=./a.pcap
+
+# 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
+
+# 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.
+#[kni]
+#enable=1
+#method=reject
+# The format is same as port_list
+#tcp_port=80,443
+#udp_port=53
+
+# FreeBSD network performance tuning configurations.
+# Most native FreeBSD configurations are supported.
+[freebsd.boot]
+hz=100
+
+# Block out a range of descriptors to avoid overlap
+# with the kernel's descriptor space.
+# You can increase this value according to your app.
+fd_reserve=512
+
+kern.ipc.maxsockets=262144
+
+net.inet.tcp.syncache.hashsize=4096
+net.inet.tcp.syncache.bucketlimit=100
+
+net.inet.tcp.tcbhashsize=65536
+
+kern.ncallout=262144
+
+[freebsd.sysctl]
+kern.ipc.somaxconn=32768
+kern.ipc.maxsockbuf=16777216
+
+net.link.ether.inet.maxhold=5
+
+net.inet.tcp.fast_finwait2_recycle=1
+net.inet.tcp.sendspace=16384
+net.inet.tcp.recvspace=8192
+net.inet.tcp.nolocaltimewait=1
+net.inet.tcp.cc.algorithm=cubic
+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
+net.inet.tcp.sack.enable=1
+net.inet.tcp.blackhole=1
+net.inet.tcp.msl=2000
+net.inet.tcp.delayed_ack=0
+
+net.inet.udp.blackhole=1
+net.inet.ip.redirect=0
diff --git a/stacks/fstack/config/module_config.json b/stacks/fstack/config/module_config.json
new file mode 100644
index 0000000..e3a7f22
--- /dev/null
+++ b/stacks/fstack/config/module_config.json
@@ -0,0 +1,28 @@
+{
+ "default_stack_name": "kernel",
+ "module_list": [
+ {
+ "stack_name": "kernel",
+ "libname": "./",
+ "function_name": "kernel_stack_register",
+ "loadtype": "static",
+ "deploytype": "1",
+ "maxfd": "1024", /*the max fd supported*/
+ "minfd": "0", /*the min fd supported*/
+ "priorty": "1", /*priorty when executing, reserv*/
+
+ "stackid": "0"
+ },
+ {
+ "stack_name": "fstack",
+ "libname": "libdmm_fstack.so",
+ "function_name": "fstack_stack_register",
+ "loadtype": "dynmic",
+ "deploytype": "1",
+ "maxfd": "1024", /*the max fd supported*/
+ "minfd": "0", /*the min fd supported*/
+ "priorty": "1", /*priorty when executing, reserv*/
+ "stackid": "1"
+ }
+ ]
+}
diff --git a/stacks/fstack/config/rd_config.json b/stacks/fstack/config/rd_config.json
new file mode 100644
index 0000000..3c5268c
--- /dev/null
+++ b/stacks/fstack/config/rd_config.json
@@ -0,0 +1,10 @@
+{
+ "ip_route": [
+ {
+ "subnet": "192.168.1.1/24",
+ "type": "nstack-fstack"
+ }
+ ],
+ "prot_route": [
+ ]
+}