blob: f327e7a6867337e40da6f74783f2e03857c32e6a [file] [log] [blame]
Mohammed Naser90128aa2024-04-29 13:21:58 -04001#####################
2Neutron Configuration
3#####################
4
5Neutron, the network service for OpenStack, supports a variety of
6configurations to optimize and tailor network performance. This includes
7integrating hardware acceleration technologies to enhance networking
8capabilities within your OpenStack environment.
9
10*********************
11Hardware Acceleration
12*********************
13
14Hardware acceleration can significantly improve network performance by
15offloading specific network functions to directly to the network interface
16card (NIC). This reduces the load on the host CPU and improves network
17throughput and latency.
18
19ML2/OVS
20=======
21
22Mellanox Accelerated Switching And Packet Processing (ASAP\ :sup:`2`)
23---------------------------------------------------------------------
24
25Mellanox ASAP\ :sup:`2` is a technology that enables the offloading of the Open vSwitch
26datapath to the NIC. This offloading is done by the NIC's firmware, and is
27transparent to the host.
28
29Atmosphere uses the `netoffload <https://github.com/vexxhost/netoffload>`_
30project which takes care of validating and preparing the host for SR-IOV.
31
32It is recommended to follow the ``netoffload`` `BIOS, Kernel & NIC configuration <https://github.com/vexxhost/netoffload#bios-configuration>`_
33steps documented before getting started.
34
35Open vSwitch configuration
36^^^^^^^^^^^^^^^^^^^^^^^^^^
37
38In order to enable hardware off-loading in Open vSwitch, you must make sure that
39you deploy with the following configuration:
40
41.. code-block:: yaml
42
43 openvswitch_helm_values:
44 conf:
45 ovs_hw_offload:
46 enabled: true
47
48Neutron configuration
49^^^^^^^^^^^^^^^^^^^^^
50
51In order to enable hardware off-loading in Neutron, you can simply deploy it
52with the following configuration and it will use `netoffload <https://github.com/vexxhost/netoffload>`_
53to automatically configure ASAP\ :sup:`2`.
54
55.. admonition:: About ``Init`` errors
56 :class: info
57
58 If you see an Init error when deploying Neutron, you may need to look at the
59 logs of the ``netoffload`` container to see what went wrong.
60
61.. code-block:: yaml
62
63 neutron_helm_values:
64 conf:
65 netoffload:
66 asap2:
67 - dev: enp97s0f0
68 vfs: 16
69
70ML2/OVN
71=======
72
73DPDK for provider & tenant networks
74-----------------------------------
75
76DPDK is a set of libraries and drivers for fast packet processing. It is
77designed to run mostly in userspace, and can be used to accelerate network
78functions in OpenStack.
79
80DPDK can be used with OVN to accelerate the processing of packets in the
81datapath. This can be done by enabling the DPDK support in the OVN
82configuration.
83
84Open vSwitch configuration
85^^^^^^^^^^^^^^^^^^^^^^^^^^
86
87In order to enable hardware off-loading in Open vSwitch, you must make sure that
88you deploy with the following configuration:
89
90.. code-block:: yaml
91
92 openvswitch_helm_values:
93 conf:
94 ovs_dpdk:
95 enabled: true
96 socket_memory: 2048
97 hugepages_mountpath: /dev/hugepages
98 vhostuser_socket_dir: vhostuser
99 lcore_mask: 0x1
100 driver: mlx5_core
101 vhost_iommu_support: true
102
103For more details about configuring `socket_memory`, `lcore_mask`, and `driver`
104parameters, please refer to the `OpenvSwitch documentation <https://docs.openvswitch.org/en/latest/intro/install/dpdk/#setup-ovs>`_.
105
106OVN configuration
107^^^^^^^^^^^^^^^^^
108
109In order to enable hardware off-loading in OVN, you must make sure that
110you deploy with the following configuration:
111
112.. code-block:: yaml
113
114 ovn_helm_values:
115 network:
116 interface:
117 tunnel: br-ex
118 tunnel_network_cidr: 192.168.0.0/19
119 conf:
120 ovn_bridge_mappings: external:br-ex
121 ovn_bridge_datapath_type: netdev
122
123Neutron configuration
124^^^^^^^^^^^^^^^^^^^^^
125
126In order to enable hardware off-loading in Neutron, you can simply deploy it
127with the following configuration and it will take care of creating the
128DPDK interfaces for you.
129
130.. code-block:: yaml
131
132 neutron_helm_values:
133 conf:
134 neutron:
135 DEFAULT:
136 global_physnet_mtu: 9100
137 plugins:
138 ml2_conf:
139 ml2:
140 path_mtu: 9100
141 physical_network_mtus: external:9100
142 ml2_type_vxlan:
143 vni_ranges: 2000:1000000
144 ovs_dpdk:
145 enabled: true
146 update_dpdk_bond_config: true
147 driver: mlx5_core
148 bonds:
149 - name: dpdkbond
150 bridge: br-ex
151 migrate_ip: true
152 mtu: 9100
153 n_rxq: 2
154 n_txq: 2
155 n_rxq_size: 2048
156 n_txq_size: 2048
157 vhost_iommu_support: true
158 ovs_options: 'bond_mode=balance-tcp lacp=active bond_updelay=10 bond_downdelay=10 other_config:lacp-time=fast'
159 nics:
160 - name: dpdk_b0s0
161 pci_id: '0000:c1:00.0'
162 - name: dpdk_b0s1
163 pci_id: '0000:c1:00.1'
164 modules:
165 - name: dpdk
166 log_level: info
167 nics: null
168
169Flavor configuration
170^^^^^^^^^^^^^^^^^^^^
171
172In order to use DPDK with OVN, you must create a flavor that supports DPDKw
173which also includes making changes for the services that use the service
174virtual machine model such as Octavia and Manila.
175
176.. code-block:: yaml
177
178 nova_flavors:
179 - disk: 1
180 name: m1.tiny
181 ram: 512
182 vcpus: 1
183 extra_specs:
184 "hw:vif_multiqueue_enabled": 'true'
185 "hw:mem_page_size": 'large'
186 - disk: 20
187 name: m1.small
188 ram: 2048
189 vcpus: 1
190 extra_specs:
191 "hw:vif_multiqueue_enabled": 'true'
192 "hw:mem_page_size": 'large'
193
194 manila_flavor_extra_specs:
195 "hw:vif_multiqueue_enabled": 'true'
196 "hw:mem_page_size": large
197
198 octavia_amphora_flavor_extra_specs:
199 "hw:vif_multiqueue_enabled": 'true'
200 "hw:mem_page_size": large