diff options
author | pmikus <peter.mikus@protonmail.ch> | 2022-09-22 08:52:40 +0200 |
---|---|---|
committer | Peter Mikus <peter.mikus@protonmail.ch> | 2022-09-22 06:53:44 +0000 |
commit | f225435e848f1199138272912213d0142955cb36 (patch) | |
tree | 4ff146d1354f36da843b2e45ee58bc5236c78e71 /fdio.infra.ansible/roles/dpdk/tasks | |
parent | 70ad5dbc25486d482b4d0396d061197c9e225f62 (diff) |
feat(dpdk): Move to 22.07
Signed-off-by: pmikus <peter.mikus@protonmail.ch>
Change-Id: If898b07e7406bfe28a63e4a793cf2f4e08a53e9d
Diffstat (limited to 'fdio.infra.ansible/roles/dpdk/tasks')
-rw-r--r-- | fdio.infra.ansible/roles/dpdk/tasks/deploy_block.yaml | 43 | ||||
-rw-r--r-- | fdio.infra.ansible/roles/dpdk/tasks/main.yaml | 50 |
2 files changed, 49 insertions, 44 deletions
diff --git a/fdio.infra.ansible/roles/dpdk/tasks/deploy_block.yaml b/fdio.infra.ansible/roles/dpdk/tasks/deploy_block.yaml new file mode 100644 index 0000000000..0e3e3eae7e --- /dev/null +++ b/fdio.infra.ansible/roles/dpdk/tasks/deploy_block.yaml @@ -0,0 +1,43 @@ +--- +# file: roles/dpdk/tasks/deploy_block.yaml + +- name: Download Release {{ item }} + ansible.builtin.get_url: + url: "{{ dpdk_url }}/dpdk-{{ item }}.tar.xz" + dest: "{{ dpdk_target_dir }}/dpdk-{{ item }}.tar.xz" + mode: 0644 + register: dpdk_downloaded + +- name: Extract Release {{ item }} + ansible.builtin.unarchive: + remote_src: true + src: "{{ dpdk_target_dir }}/dpdk-{{ item }}.tar.xz" + dest: "{{ dpdk_target_dir }}/" + creates: "{{ dpdk_target_dir }}/dpdk-{{ item }}" + when: dpdk_downloaded + register: dpdk_extracted + +- name: Compile Release I + ansible.builtin.command: "meson -Dexamples=l3fwd build" + args: + chdir: "{{ dpdk_target_dir }}/dpdk-{{ item }}" + environment: + CFLAGS: "-DRTE_LIBRTE_I40E_16BYTE_RX_DESC=y" + register: dpdk_compiled + +- name: Compile Release II + ansible.builtin.command: "ninja -C build" + args: + chdir: "{{ dpdk_target_dir }}/dpdk-{{ item }}" + environment: + CFLAGS: "-DRTE_LIBRTE_I40E_16BYTE_RX_DESC=y" + async: 3000 + poll: 0 + register: dpdk_built + +- name: Check if DPDK is Built + ansible.builtin.async_status: + jid: "{{ dpdk_built.ansible_job_id }}" + until: dpdk_built.finished + delay: 10 + retries: 300
\ No newline at end of file diff --git a/fdio.infra.ansible/roles/dpdk/tasks/main.yaml b/fdio.infra.ansible/roles/dpdk/tasks/main.yaml index 9052baff74..4cff308e21 100644 --- a/fdio.infra.ansible/roles/dpdk/tasks/main.yaml +++ b/fdio.infra.ansible/roles/dpdk/tasks/main.yaml @@ -1,8 +1,8 @@ --- # file: roles/dpdk/tasks/main.yaml -- name: Inst - Update Package Cache (APT) - apt: +- name: Update Package Cache (APT) + ansible.builtin.apt: update_cache: true cache_valid_time: 3600 when: @@ -10,53 +10,15 @@ tags: - dpdk-inst-prerequisites -- name: Inst - Prerequisites - package: +- name: Prerequisites + ansible.builtin.package: name: "{{ packages | flatten(levels=1) }}" state: "latest" tags: - dpdk-inst-prerequisites -- name: Inst - Download Release Archive - get_url: - url: "{{ dpdk_url }}/dpdk-{{ item }}.tar.xz" - dest: "{{ dpdk_target_dir }}/dpdk-{{ item }}.tar.xz" - mode: 0644 +- name: Multiple DPDK Versions + include_tasks: deploy_block.yaml loop: "{{ dpdk_version }}" - register: "dpdk_downloaded" - tags: - - dpdk-inst - -- name: Inst - Extract Release Archive - unarchive: - remote_src: true - src: "{{ dpdk_target_dir }}/dpdk-{{ item }}.tar.xz" - dest: "{{ dpdk_target_dir }}/" - creates: "{{ dpdk_target_dir }}/dpdk-{{ item }}" - loop: "{{ dpdk_version }}" - when: "dpdk_downloaded" - register: "dpdk_extracted" - tags: - - dpdk-inst - -- name: Inst - Compile Release I - command: "meson -Dexamples=l3fwd build" - args: - chdir: "{{ dpdk_target_dir }}/dpdk-{{ item }}" - environment: - CFLAGS: "-DRTE_LIBRTE_I40E_16BYTE_RX_DESC=y" - loop: "{{ dpdk_version }}" - register: "dpdk_compiled" - tags: - - dpdk-inst - -- name: Inst - Compile Release II - command: "ninja -C build" - args: - chdir: "{{ dpdk_target_dir }}/dpdk-{{ item }}" - environment: - CFLAGS: "-DRTE_LIBRTE_I40E_16BYTE_RX_DESC=y" - loop: "{{ dpdk_version }}" - register: "dpdk_compiled" tags: - dpdk-inst |