aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/intel/tasks
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2023-04-12 07:46:55 +0000
committerPeter Mikus <peter.mikus@protonmail.ch>2023-04-12 07:48:34 +0000
commitaf032f688a71cbb94f213be89db18190fe927e69 (patch)
tree9e3641b06033247538f6f8f8d07bd7044039fbec /fdio.infra.ansible/roles/intel/tasks
parent5edaac881f42de498d92efca3fbbfab8e2e47e71 (diff)
feat(ansible): Intel DMAoper-230417
Signed-off-by: pmikus <peter.mikus@protonmail.ch> Change-Id: I68a6965712c7e4b39f931fb4487142fa9c5088dc
Diffstat (limited to 'fdio.infra.ansible/roles/intel/tasks')
-rw-r--r--fdio.infra.ansible/roles/intel/tasks/dsa.yaml39
-rw-r--r--fdio.infra.ansible/roles/intel/tasks/i40e.yaml8
-rw-r--r--fdio.infra.ansible/roles/intel/tasks/iavf.yaml8
-rw-r--r--fdio.infra.ansible/roles/intel/tasks/ice.yaml20
-rw-r--r--fdio.infra.ansible/roles/intel/tasks/main.yaml46
5 files changed, 92 insertions, 29 deletions
diff --git a/fdio.infra.ansible/roles/intel/tasks/dsa.yaml b/fdio.infra.ansible/roles/intel/tasks/dsa.yaml
new file mode 100644
index 0000000000..2f038b0e9f
--- /dev/null
+++ b/fdio.infra.ansible/roles/intel/tasks/dsa.yaml
@@ -0,0 +1,39 @@
+---
+# file: tasks/dsa.yaml
+
+- name: Get DSA Driver
+ ansible.builtin.uri:
+ url: "{{ intel_dsa_url[dsa] }}"
+ follow_redirects: "all"
+ force: true
+ dest: "{{ intel_extract_dir }}/accel-config-v{{ dsa }}.tar.gz"
+ mode: "0644"
+ failed_when: false
+ tags:
+ - intel-inst
+
+- name: Extract DSA Driver
+ ansible.builtin.unarchive:
+ remote_src: true
+ src: "{{ intel_extract_dir }}/accel-config-v{{ dsa }}.tar.gz"
+ dest: "{{ intel_extract_dir }}/"
+ creates: "{{ intel_extract_dir }}/idxd-config-accel-config-v{{ dsa }}"
+ register: intel_driver_extracted
+ tags:
+ - intel-inst
+
+- name: Install DSA Driver
+ ansible.builtin.command: "{{ item }}"
+ args:
+ chdir: "{{ intel_extract_dir }}/idxd-config-accel-config-v{{ dsa }}"
+ become: true
+ with_items:
+ - "./autogen.sh"
+ - "./configure CFLAGS='-g -O2' --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64"
+ - "make"
+ - "make check"
+ - "make install"
+ when:
+ - intel_driver_extracted
+ tags:
+ - intel-inst
diff --git a/fdio.infra.ansible/roles/intel/tasks/i40e.yaml b/fdio.infra.ansible/roles/intel/tasks/i40e.yaml
index 01b3d763d8..8b069bf9b2 100644
--- a/fdio.infra.ansible/roles/intel/tasks/i40e.yaml
+++ b/fdio.infra.ansible/roles/intel/tasks/i40e.yaml
@@ -1,7 +1,7 @@
---
-# file: roles/intel/tasks/i40e.yaml
+# file: tasks/i40e.yaml
-- name: Inst - Get i40e Network Adapter Driver
+- name: Get i40e Network Adapter Driver
ansible.builtin.uri:
url: "{{ intel_sourceforge_download_url }}/{{ intel_i40e_url[i40e] }}"
follow_redirects: "all"
@@ -12,7 +12,7 @@
tags:
- intel-inst
-- name: Inst - Extract i40e Network Adapter Driver
+- name: Extract i40e Network Adapter Driver
ansible.builtin.unarchive:
remote_src: true
src: "{{ intel_extract_dir }}/i40e-{{ i40e }}.tar.gz"
@@ -22,7 +22,7 @@
tags:
- intel-inst
-- name: Inst - i40e Network Adapter Driver
+- name: Install i40e Network Adapter Driver
ansible.builtin.command: "{{ item }}"
args:
chdir: "{{ intel_extract_dir }}/i40e-{{ i40e }}/src"
diff --git a/fdio.infra.ansible/roles/intel/tasks/iavf.yaml b/fdio.infra.ansible/roles/intel/tasks/iavf.yaml
index 226b79bdab..127e31bee2 100644
--- a/fdio.infra.ansible/roles/intel/tasks/iavf.yaml
+++ b/fdio.infra.ansible/roles/intel/tasks/iavf.yaml
@@ -1,7 +1,7 @@
---
-# file: roles/intel/tasks/iavf.yaml
+# file: tasks/iavf.yaml
-- name: Inst - Get iavf Network Adapter Driver
+- name: Get iavf Network Adapter Driver
ansible.builtin.uri:
url: "{{ intel_sourceforge_download_url }}/{{ intel_iavf_url[iavf] }}"
follow_redirects: "all"
@@ -12,7 +12,7 @@
tags:
- intel-inst
-- name: Inst - Extract iavf Network Adapter Driver
+- name: Extract iavf Network Adapter Driver
ansible.builtin.unarchive:
remote_src: true
src: "{{ intel_extract_dir }}/iavf-{{ iavf }}.tar.gz"
@@ -22,7 +22,7 @@
tags:
- intel-inst
-- name: Inst - iavf Network Adapter Driver
+- name: Install iavf Network Adapter Driver
ansible.builtin.command: "{{ item }}"
args:
chdir: "{{ intel_extract_dir }}/iavf-{{ iavf }}/src"
diff --git a/fdio.infra.ansible/roles/intel/tasks/ice.yaml b/fdio.infra.ansible/roles/intel/tasks/ice.yaml
index 1c1c199f69..c773a65a34 100644
--- a/fdio.infra.ansible/roles/intel/tasks/ice.yaml
+++ b/fdio.infra.ansible/roles/intel/tasks/ice.yaml
@@ -1,7 +1,7 @@
---
-# file: roles/intel/tasks/ice.yaml
+# file: tasks/ice.yaml
-- name: Inst - Get ice Network Adapter Driver
+- name: Get ice Network Adapter Driver
ansible.builtin.uri:
url: "{{ intel_sourceforge_download_url }}/{{ intel_ice_url[ice] }}"
follow_redirects: "all"
@@ -12,7 +12,7 @@
tags:
- intel-inst
-- name: Inst - Extract ice Network Adapter Driver
+- name: Extract ice Network Adapter Driver
ansible.builtin.unarchive:
remote_src: true
src: "{{ intel_extract_dir }}/ice-{{ ice }}.tar.gz"
@@ -22,7 +22,7 @@
tags:
- intel-inst
-- name: Inst - ice Network Adapter Driver
+- name: Install ice Network Adapter Driver
ansible.builtin.command: "{{ item }}"
args:
chdir: "{{ intel_extract_dir }}/ice-{{ ice }}/src"
@@ -36,7 +36,7 @@
tags:
- intel-inst
-- name: Inst - Get Dynamic Device Personalization (DDP) Package
+- name: Get Dynamic Device Personalization (DDP) Package
ansible.builtin.get_url:
url: "{{ intel_download_url }}/{{ intel_ddp_url[ddp] }}"
dest: "{{ intel_extract_dir }}/800-Series-Comms-Binary-Package-{{ ddp }}.zip"
@@ -44,7 +44,7 @@
tags:
- intel-inst
-- name: Inst - Extract Dynamic Device Personalization (DDP) Package
+- name: Extract Dynamic Device Personalization (DDP) Package
ansible.builtin.unarchive:
remote_src: true
src: "{{ intel_extract_dir }}/800-Series-Comms-Binary-Package-{{ ddp }}.zip"
@@ -54,7 +54,7 @@
tags:
- intel-inst
-- name: Inst - Extract Dynamic Device Personalization (DDP) Package
+- name: Extract Dynamic Device Personalization (DDP) Package
ansible.builtin.unarchive:
remote_src: true
src: "{{ intel_extract_dir }}/ice_comms-{{ ddp }}.zip"
@@ -63,7 +63,7 @@
tags:
- intel-inst
-- name: Inst - Copy Dynamic Device Personalization (DDP) Package
+- name: Copy Dynamic Device Personalization (DDP) Package
ansible.builtin.copy:
src: "{{ intel_extract_dir }}/ice_comms-{{ ddp }}.pkg"
dest: "/lib/firmware/updates/intel/ice/ddp/ice-{{ ddp }}.pkg"
@@ -72,7 +72,7 @@
tags:
- intel-inst
-- name: Inst - Link Dynamic Device Personalization (DDP) Package
+- name: Link Dynamic Device Personalization (DDP) Package
ansible.builtin.file:
src: "ice-{{ ddp }}.pkg"
dest: "/lib/firmware/updates/intel/ice/ddp/ice.pkg"
@@ -80,7 +80,7 @@
tags:
- intel-inst
-- name: Inst - Extract Dynamic Device Personalization (DDP) Package (cleanup)
+- name: Extract Dynamic Device Personalization (DDP) Package (cleanup)
ansible.builtin.file:
path: "{{ item }}"
state: absent
diff --git a/fdio.infra.ansible/roles/intel/tasks/main.yaml b/fdio.infra.ansible/roles/intel/tasks/main.yaml
index 864811b218..7f0640a8d6 100644
--- a/fdio.infra.ansible/roles/intel/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/intel/tasks/main.yaml
@@ -1,7 +1,7 @@
---
-# file: roles/intel/tasks/main.yaml
+# file: 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:
- intel-inst-drivers
-- name: Inst - Prerequisites
+- name: Install Prerequisites
ansible.builtin.package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
tags:
- intel-inst-drivers
-- name: Inst - Check Presence of Intel Ethernet 700 Series
+- name: Check Presence of Intel Ethernet 700 Series
ansible.builtin.shell: "lspci -d 8086:1583; lspci -d 8086:1585; lspci -d 8086:1572; lspci -d 8086:158a; lspci -d 8086:158b"
register: intel_700_pcis
failed_when: false
@@ -25,7 +25,7 @@
tags:
- intel-inst-drivers
-- name: Inst - Check Presence of Intel Ethernet 800 Series
+- name: Check Presence of Intel Ethernet 800 Series
ansible.builtin.shell: "lspci -d 8086:1592; lspci -d 8086:1891"
register: intel_800_pcis
failed_when: false
@@ -33,7 +33,15 @@
tags:
- intel-inst-drivers
-- name: Inst - Get Intel Ethernet 700 Series driver versions
+- name: Check Presence of Intel DSA
+ ansible.builtin.shell: "lspci -d 8086:0b25"
+ register: intel_dsa_pcis
+ failed_when: false
+ changed_when: false
+ tags:
+ - intel-inst-drivers
+
+- name: Get Intel Ethernet 700 Series driver versions
ansible.builtin.set_fact:
i40e: "{{ intel_700_compatibility_matrix[intel_700_matrix]['i40e'] }}"
iavf: "{{ intel_700_compatibility_matrix[intel_700_matrix]['iavf'] }}"
@@ -43,7 +51,7 @@
tags:
- intel-inst-drivers
-- name: Inst - Get Intel Ethernet 800 Series driver versions
+- name: Get Intel Ethernet 800 Series driver versions
ansible.builtin.set_fact:
ice: "{{ intel_800_compatibility_matrix[intel_800_matrix]['ice'] }}"
ddp: "{{ intel_800_compatibility_matrix[intel_800_matrix]['ddp'] }}"
@@ -54,7 +62,15 @@
tags:
- intel-inst-drivers
-- name: Inst - Driver Intel Ethernet 700 Series
+- name: Get Intel DSA driver versions
+ ansible.builtin.set_fact:
+ dsa: "{{ intel_dsa_compatibility_matrix['dsa'] }}"
+ when: >
+ intel_dsa_matrix is defined
+ tags:
+ - intel-inst-drivers
+
+- name: Driver Intel Ethernet 700 Series
import_tasks: i40e.yaml
when: >
intel_700_pcis.stdout_lines | length > 0 and
@@ -62,7 +78,7 @@
tags:
- intel-inst-drivers
-- name: Inst - Driver Intel Ethernet 800 Series
+- name: Driver Intel Ethernet 800 Series
import_tasks: ice.yaml
when: >
intel_800_pcis.stdout_lines | length > 0 and
@@ -70,12 +86,20 @@
tags:
- intel-inst-drivers
-- name: Inst - Driver Intel iAVF
+- name: Driver Intel iAVF
import_tasks: iavf.yaml
when: >
(intel_700_pcis.stdout_lines | length > 0 and
- intel_700_matrix is defined ) or
+ intel_700_matrix is defined) or
(intel_800_pcis.stdout_lines | length > 0 and
intel_800_matrix is defined)
tags:
- intel-inst-drivers
+
+- name: Driver Intel DSA
+ import_tasks: dsa.yaml
+ when: >
+ intel_dsa_pcis.stdout_lines | length > 0 and
+ intel_dsa_matrix is defined
+ tags:
+ - intel-inst-drivers