blob: 82d3753aefd38cdc0799462382856f25fad110ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
# Generated by ${vyos_conf_scripts_dir}/vpp.py
unix {
nodaemon
log /var/log/vpp.log
full-coredump
cli-listen /run/vpp/cli.sock
gid vpp
systemd-notify
# exec /etc/vpp/bootstrap.vpp
{% if poll_sleep_usec is vyos_defined %}
poll-sleep-usec {{ poll_sleep_usec }}
{% endif %}
}
{% if cpu is vyos_defined %}
cpu {
{% if cpu.main_core is vyos_defined %}
main-core {{ cpu.main_core }}
{% endif %}
{% if cpu.corelist_workers is vyos_defined %}
corelist-workers {{ cpu.corelist_workers }}
{% endif %}
}
{% endif %}
{% if resource_allocation.buffers is vyos_defined %}
buffers {
{% if resource_allocation.buffers.buffers_per_numa is vyos_defined %}
buffers-per-numa {{ resource_allocation.buffers.buffers_per_numa }}
{% endif %}
{% if resource_allocation.buffers.data_size is vyos_defined %}
default data-size {{ resource_allocation.buffers.data_size }}
{% endif %}
{% if resource_allocation.buffers.page_size is vyos_defined %}
page-size {{ resource_allocation.buffers.page_size }}
{% endif %}
}
{% endif %}
{% if resource_allocation.ipv6 is vyos_defined %}
ip6 {
{% if resource_allocation.ipv6.hash_buckets is vyos_defined %}
hash-buckets {{ resource_allocation.ipv6.hash_buckets }}
{% endif %}
{% if resource_allocation.ipv6.heap_size is vyos_defined %}
heap-size {{ resource_allocation.ipv6.heap_size }}
{% endif %}
}
{% endif %}
{% if resource_allocation.mac_limit is vyos_defined %}
l2learn {
limit {{ resource_allocation.mac_limit }}
}
{% endif %}
{% if logging is vyos_defined %}
logging {
{% if logging.default_level is vyos_defined %}
default-log-level {{ logging.default_level }}
default-syslog-log-level {{ logging.default_level }}
{% endif %}
}
{% endif %}
{% if resource_allocation.memory.physmem_max_size is vyos_defined %}
physmem {
max-size {{ resource_allocation.memory.physmem_max_size }}
}
{% endif %}
plugins {
plugin default { disable }
plugin avf_plugin.so { enable }
plugin dpdk_plugin.so { enable }
plugin vmxnet3_plugin.so { enable }
plugin lacp_plugin.so { enable }
plugin linux_cp_plugin.so { enable }
plugin linux_nl_plugin.so { enable }
plugin pppoe_plugin.so { enable }
# Flow
plugin flowprobe_plugin.so { enable }
plugin sflow_plugin.so { enable }
# NAT uncomment if needed
# plugin cnat_plugin.so { enable }
plugin nat_plugin.so { enable }
plugin nat44_ei_plugin.so { enable }
plugin det44_plugin.so { enable }
# plugin nat44_ei_plugin.so { enable }
# plugin nat64_plugin.so { enable }
# plugin nat66_plugin.so { enable }
# plugin pnat_plugin.so { enable }
# Tunnels
plugin geneve_plugin.so { enable }
plugin gre_plugin.so { enable }
plugin vxlan_plugin.so { enable }
# Secure
# plugin ikev2_plugin.so { enable }
# plugin dns_plugin.so { enable } # Probably required for FQDN peers
# plugin wireguard_plugin.so { enable }
# ACL
plugin acl_plugin.so { enable }
# DHCP plugin
plugin dhcp_plugin.so { enable }
}
crypto-engines {
default { disable }
{% if ipsec_acceleration is vyos_defined %}
ipsecmb { enable }
native { enable }
openssl { enable }
{% endif %}
}
linux-cp {
lcp-sync
lcp-auto-subint
{% if ignore_kernel_routes is not vyos_defined %}
route-no-paths
{% endif %}
}
{% set netlink_rx_buffers = 268435456 %}
linux-nl {
nl-rx-buffer-size {{ netlink_rx_buffers }}
}
{% if resource_allocation.memory.stats is vyos_defined %}
statseg {
{% if resource_allocation.memory.stats.size is vyos_defined %}
size {{ resource_allocation.memory.stats.size }}
{% endif %}
{% if resource_allocation.memory.stats.page_size is vyos_defined %}
page-size {{ resource_allocation.memory.stats.page_size }}
{% endif %}
}
{% endif %}
{% if resource_allocation.memory is vyos_defined %}
memory {
{% if resource_allocation.memory.main_heap_size is vyos_defined %}
main-heap-size {{ resource_allocation.memory.main_heap_size }}
{% endif %}
{% if resource_allocation.memory.main_heap_page_size is vyos_defined %}
main-heap-page-size {{ resource_allocation.memory.main_heap_page_size }}
{% endif %}
{% if resource_allocation.buffers.page_size != '4K' %}
default-hugepage-size {{ resource_allocation.buffers.page_size }}
{% endif %}
}
{% endif %}
dpdk {
# Whitelist the fake PCI address 0000:00:00.0
# This prevents all devices from being added to VPP-DPDK by default
dev 0000:00:00.0
{% for iface, iface_config in interface.items() %}
{% if iface_config.driver == 'dpdk' %}
dev {{ iface_config.dpdk_options.dev_id }} {
name {{ iface }}
{% if iface_config.num_rx_desc is vyos_defined %}
num-rx-desc {{ iface_config.num_rx_desc }}
{% endif %}
{% if iface_config.num_tx_desc is vyos_defined %}
num-tx-desc {{ iface_config.num_tx_desc }}
{% endif %}
{% if iface_config.num_rx_queues is vyos_defined %}
num-rx-queues {{ iface_config.num_rx_queues }}
{% endif %}
{% if iface_config.num_tx_queues is vyos_defined %}
num-tx-queues {{ iface_config.num_tx_queues }}
{% endif %}
}
{% endif %}
{% endfor %}
uio-bind-force
}
{% if ipsec_acceleration is vyos_defined %}
linux-xfrm-nl {
enable-route-mode-ipsec
interface ipsec
nl-rx-buffer-size {{ netlink_rx_buffers }}
}
{% endif %}
pppoe {
enable-pass-nd-and-dhcpv6
}
|