1 # Copyright (c) 2017 Intel Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 #- patch: src="{{ item }}" basedir="{{ dpdk_path }}" strip=0
17 # - "{{ local_nsb_path }}/patches/dpdk_custom_patch/rte_pipeline.patch"
19 #- patch: src="{{ item }}" basedir="{{ dpdk_path }}" strip=1
21 # - "{{ local_nsb_path }}/patches/dpdk_custom_patch/0*.patch"
23 - name: find kernel for image, (including chroot)
25 kernel: "{{ ansible_kernel }}"
26 register: found_kernel
28 # Do this before installing kernel headers
29 - name: Set dpdk_kernel to be the kernel we found
31 dpdk_kernel: "{{ found_kernel.kernel }}"
33 - include: "{{ ansible_os_family }}.yml"
35 - name: set RTE_KERNELDIR to point to found kernel
37 RTE_KERNELDIR: "/lib/modules/{{ dpdk_kernel }}/build"
40 chdir: "{{ dpdk_path }}"
43 T: "{{ dpdk_make_arch }}"
44 O: "{{ dpdk_make_arch }}"
45 extra_args: "-j {{ ansible_processor_vcpus }}"
47 RTE_KERNELDIR: "{{ RTE_KERNELDIR }}"
49 - name: enable RTE_PORT_STATS_COLLECT
51 dest: "{{ dpdk_path }}/{{ dpdk_make_arch }}/.config"
52 regexp: '^CONFIG_RTE_PORT_STATS_COLLECT=n'
53 line: 'CONFIG_RTE_PORT_STATS_COLLECT=y'
55 - name: enable DPDK RTE_PORT_PCAP
57 dest: "{{ dpdk_path }}/{{ dpdk_make_arch }}/.config"
58 regexp: '^CONFIG_RTE_PORT_PCAP=n'
59 line: 'CONFIG_RTE_PORT_PCAP=y'
61 - name: enable DPDK RTE_TABLE_STATS_COLLECT
63 dest: "{{ dpdk_path }}/{{ dpdk_make_arch }}/.config"
64 regexp: '^CONFIG_RTE_TABLE_STATS_COLLECT=n'
65 line: 'CONFIG_RTE_TABLE_STATS_COLLECT=y'
67 - name: enable DPDK RTE_PIPELINE_STATS_COLLECT
69 dest: "{{ dpdk_path }}/{{ dpdk_make_arch }}/.config"
70 regexp: '^CONFIG_RTE_PIPELINE_STATS_COLLECT=n'
71 line: 'CONFIG_RTE_PIPELINE_STATS_COLLECT=y'
74 chdir: "{{ dpdk_path }}/{{ dpdk_make_arch}}"
75 extra_args: "-j {{ ansible_processor_vcpus }}"
77 RTE_KERNELDIR: "{{ RTE_KERNELDIR }}"
80 path: "{{ dpdk_module_dir}}"
84 src: "{{ dpdk_path }}/{{ dpdk_make_arch }}/kmod/igb_uio.ko"
85 dest: "{{ dpdk_module_dir }}/igb_uio.ko"
88 - name: run depmod for dpdk_kernel
89 command: depmod "{{ dpdk_kernel }}"
92 path: "{{ INSTALL_BIN_PATH }}"
95 - name: copy dpdk-devbind.py to correct location
97 src: "{{ dpdk_devbind[dpdk_version] }}"
98 dest: "{{ INSTALL_BIN_PATH }}/dpdk-devbind.py"
103 - name: make dpdk_nic_bind.py for backwards compatibility
105 src: "{{ dpdk_devbind[dpdk_version] }}"
106 dest: "{{ INSTALL_BIN_PATH }}/dpdk_nic_bind.py"