5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
19 - "DPDK cores {{ ansible_local.cpu_allocation['ovs_dpdk']['list'] }}"
20 - "Platform cores {{ ansible_local.cpu_allocation['platform']['list'] }}"
21 - "Host VPUs {{ansible_processor_vcpus}}, Processor cores {{ansible_processor_cores}}"
22 - "Threads per core {{ansible_processor_threads_per_core}}, Sockets {{ansible_processor_count}}"
24 - name: Add vfio.conf to modules-load.d
26 path: /etc/modules-load.d/vfio.conf
31 - name: Modprobe vfio-pci
36 - name: Ensure openvswitch.service is started
41 - name: configure DPDK cores
43 configure_ovsdpdk.py --cores {{ansible_processor_vcpus}} --pcore {{ansible_processor_cores}}
44 --tcore {{ansible_processor_threads_per_core}} --sockets {{ansible_processor_count}}
45 --dpdkcores {{ ansible_local.cpu_allocation['ovs_dpdk']['list'] }}
47 changed_when: result.rc == 0
48 failed_when: result.rc == 2
51 msg: "RC: {{ result.rc }}"
54 var=result.stdout_lines
57 - name: Ensure enable-dpdk.service is enabled
63 - name: Start enable-dpdk.service on other than installation host
69 - hostname != installation_controller
71 - name: restart openvswitch.service
77 - name: restart libvirtd.service