2 ## Copyright (c) 2020-2021 Intel Corporation.
4 ## Licensed under the Apache License, Version 2.0 (the "License");
5 ## you may not use this file except in compliance with the License.
6 ## You may obtain a copy of the License at
8 ## http://www.apache.org/licenses/LICENSE-2.0
10 ## Unless required by applicable law or agreed to in writing, software
11 ## distributed under the License is distributed on an "AS IS" BASIS,
12 ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ## See the License for the specific language governing permissions and
14 ## limitations under the License.
17 - name: install Python3 from epel-release
26 - ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS'
27 - ansible_distribution_version < '8'
29 - name: install dpdk-devel required for libraries enablement in RHEL / CentOS >= 8.2
32 when: ansible_distribution in ["RedHat", "CentOS"] and ansible_distribution_version >= '8.2'
34 - name: build and install dpdk using meson and ninja tools
36 - name: install building tools as python packages
40 - meson>=0.53.2,<0.60.0
46 until: pip_result is succeeded
49 - name: meson build for ease of compiling and linking libraries enablement
50 command: "meson build"
52 chdir: "{{ dpdk_dir }}"
54 - name: configure DPDK with ninja
57 chdir: "{{ dpdk_dir }}/build"
59 - name: install DPDK with ninja
60 command: "ninja install"
62 chdir: "{{ dpdk_dir }}/build"
64 - name: update the dynamic linker cache
67 chdir: "{{ dpdk_dir }}/build"
69 ansible_python_interpreter: /usr/bin/python3
71 - name: Ensure dpdk libs is in loader search path on RHEL/CentOS
73 dest: "/etc/ld.so.conf.d/libdpdk-x86_64.conf"
74 content: "/usr/local/lib64/"
79 when: ansible_os_family == "RedHat"
81 - name: find dpdk tools
83 path: "{{ dpdk_dir }}"
84 patterns: "dpdk-devbind.py"
86 register: dpdk_tools_dir
88 - name: set path to dpdk usertools directory
90 dpdk_tools: "{{ dpdk_tools_dir.files[0].path }}"
92 - name: load userspace modules
100 - name: install dpdk-devbind.py in /usr/local/bin
103 src: "{{ dpdk_tools }}"
104 dest: "/usr/local/bin/dpdk-devbind.py"
110 - name: clone intel module
112 repo: "{{ dpdk_kmods_repo }}"
113 dest: "{{ dpdk_kmods_dest }}"
117 - name: apply fix to Makefile
119 path: "{{ dpdk_kmods_dest }}/linux/igb_uio/Makefile"
124 - name: build intel module
126 chdir: "{{ dpdk_kmods_dest }}/linux/igb_uio"
128 - name: load intel module
129 command: "insmod {{ dpdk_kmods_dest }}/linux/igb_uio/igb_uio.ko"
131 failed_when: "'No such file or directory' in result.stderr"
132 changed_when: "'already bound' not in result.stderr"