aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DPDK_VPP_VER2
-rw-r--r--fdio.infra.ansible/roles/dpdk/defaults/main.yaml2
-rw-r--r--fdio.infra.ansible/roles/dpdk/meta/main.yaml6
-rw-r--r--fdio.infra.ansible/roles/dpdk/tasks/deploy_block.yaml43
-rw-r--r--fdio.infra.ansible/roles/dpdk/tasks/main.yaml50
-rw-r--r--fdio.infra.ansible/roles/trex/tasks/deploy_block.yaml2
-rw-r--r--fdio.infra.ansible/roles/trex/tasks/main.yaml6
-rw-r--r--resources/libraries/python/Constants.py2
8 files changed, 56 insertions, 57 deletions
diff --git a/DPDK_VPP_VER b/DPDK_VPP_VER
index 3d4b13728a..5a8851d1ae 100644
--- a/DPDK_VPP_VER
+++ b/DPDK_VPP_VER
@@ -1 +1 @@
-dpdk-22.03
+dpdk-22.07
diff --git a/fdio.infra.ansible/roles/dpdk/defaults/main.yaml b/fdio.infra.ansible/roles/dpdk/defaults/main.yaml
index b9602bc2d2..8f1142dfb1 100644
--- a/fdio.infra.ansible/roles/dpdk/defaults/main.yaml
+++ b/fdio.infra.ansible/roles/dpdk/defaults/main.yaml
@@ -23,5 +23,5 @@ packages_by_arch:
dpdk_target_dir: "/opt"
dpdk_version:
- - "22.03"
+ - "22.07"
dpdk_url: "https://fast.dpdk.org/rel"
diff --git a/fdio.infra.ansible/roles/dpdk/meta/main.yaml b/fdio.infra.ansible/roles/dpdk/meta/main.yaml
index e52ecb87c1..715712756e 100644
--- a/fdio.infra.ansible/roles/dpdk/meta/main.yaml
+++ b/fdio.infra.ansible/roles/dpdk/meta/main.yaml
@@ -1,11 +1,6 @@
---
# file: roles/dpdk/meta/main.yaml
-# desc: Install DPDK from stable branch and configure service.
-# inst: DPDK
-# conf: ?
-# info: 1.0 - added role
-
dependencies: []
galaxy_info:
@@ -18,7 +13,6 @@ galaxy_info:
platforms:
- name: Ubuntu
versions:
- - focal
- jammy
galaxy_tags:
- dpdk
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
diff --git a/fdio.infra.ansible/roles/trex/tasks/deploy_block.yaml b/fdio.infra.ansible/roles/trex/tasks/deploy_block.yaml
index b436879a54..492a56a65d 100644
--- a/fdio.infra.ansible/roles/trex/tasks/deploy_block.yaml
+++ b/fdio.infra.ansible/roles/trex/tasks/deploy_block.yaml
@@ -61,7 +61,7 @@
register: trex_built
when: trex_extracted.changed
-- name: Check if T-Rex is compiled
+- name: Check if T-Rex is Compiled
async_status:
jid: "{{ trex_built.ansible_job_id }}"
register: trex_built
diff --git a/fdio.infra.ansible/roles/trex/tasks/main.yaml b/fdio.infra.ansible/roles/trex/tasks/main.yaml
index 0196b0817b..5cdf041a14 100644
--- a/fdio.infra.ansible/roles/trex/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/trex/tasks/main.yaml
@@ -1,7 +1,7 @@
---
# file: roles/trex/tasks/main.yaml
-- name: Inst - Update Package Cache (APT)
+- name: Update Package Cache (APT)
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
@@ -10,14 +10,14 @@
tags:
- trex-inst-prerequisites
-- name: Inst - Prerequisites
+- name: Prerequisites
ansible.builtin.package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
tags:
- trex-inst-prerequisites
-- name: Inst - Multiple T-Rex Versions
+- name: Multiple T-Rex Versions
include_tasks: deploy_block.yaml
loop: "{{ trex_version }}"
tags:
diff --git a/resources/libraries/python/Constants.py b/resources/libraries/python/Constants.py
index a64a139eba..4a7084777f 100644
--- a/resources/libraries/python/Constants.py
+++ b/resources/libraries/python/Constants.py
@@ -186,7 +186,7 @@ class Constants:
QEMU_VM_IMAGE = u"/var/lib/vm/image.iso"
# QEMU VM DPDK path
- QEMU_VM_DPDK = u"/opt/dpdk-22.03"
+ QEMU_VM_DPDK = u"/opt/dpdk-22.07"
# Docker container SUT image
DOCKER_SUT_IMAGE_UBUNTU = u"csit_sut-ubuntu2204:local"