aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuraj Linkeš <juraj.linkes@pantheon.tech>2021-07-23 13:20:52 +0200
committerJuraj Linkeš <juraj.linkes@pantheon.tech>2021-07-23 15:31:53 +0200
commit5a1f1b7fa58c082dd359a7b4df700f5df3839bfd (patch)
treedc76c43f1b431821e53b6b0efc7c5d15dfb250ff
parent1da19da813655f643bc3c6e4d03bed987f076f07 (diff)
Ansible: iavf driver install
* move iavf driver install from vpp_device to intel role * differentiate the names of tasks of various drivers to get better ansible logs * add .5 sleep when creating VFs with iavf to avoid improper init * fix install commands * add XL710QDA2 NIC to supported i40e NICs Change-Id: Id50e1552a322b9473e58222bfed3405d2d73c824 Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
-rw-r--r--fdio.infra.ansible/roles/intel/defaults/main.yaml4
-rw-r--r--fdio.infra.ansible/roles/intel/tasks/i40e.yaml8
-rw-r--r--fdio.infra.ansible/roles/intel/tasks/iavf.yaml30
-rw-r--r--fdio.infra.ansible/roles/intel/tasks/ice.yaml8
-rw-r--r--fdio.infra.ansible/roles/intel/tasks/main.yaml9
-rw-r--r--fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs.sh1
-rw-r--r--fdio.infra.ansible/roles/vpp_device/tasks/main.yaml29
-rw-r--r--fdio.infra.ansible/vpp_device.yaml2
8 files changed, 53 insertions, 38 deletions
diff --git a/fdio.infra.ansible/roles/intel/defaults/main.yaml b/fdio.infra.ansible/roles/intel/defaults/main.yaml
index 7789704598..1ea3966f4a 100644
--- a/fdio.infra.ansible/roles/intel/defaults/main.yaml
+++ b/fdio.infra.ansible/roles/intel/defaults/main.yaml
@@ -18,6 +18,10 @@ packages_by_arch:
intel_download_url: "https://downloadmirror.intel.com"
+intel_iavf_version: "4.1.1"
+intel_iavf_driver_url: "{{ intel_download_url }}/24693/eng/iavf-{{ intel_iavf_version }}.tar.gz"
+intel_iavf_driver_dir: "/opt"
+
intel_i40e_version: "2.15.9"
intel_i40e_driver_url: "{{ intel_download_url }}/24411/eng/i40e-{{ intel_i40e_version }}.tar.gz"
intel_i40e_driver_dir: "/opt"
diff --git a/fdio.infra.ansible/roles/intel/tasks/i40e.yaml b/fdio.infra.ansible/roles/intel/tasks/i40e.yaml
index cf42f326c2..8c34d096aa 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
-- name: Inst - Get Network Adapter Driver
+- name: Inst - Get i40e Network Adapter Driver
get_url:
url: "{{ intel_i40e_driver_url }}"
dest: "{{ intel_i40e_driver_dir }}/i40e-{{ intel_i40e_version }}.tar.gz"
@@ -9,7 +9,7 @@
tags:
- intel-inst
-- name: Inst - Extract Network Adapter Driver
+- name: Inst - Extract i40e Network Adapter Driver
unarchive:
remote_src: true
src: "{{ intel_i40e_driver_dir }}/i40e-{{ intel_i40e_version }}.tar.gz"
@@ -19,8 +19,8 @@
tags:
- intel-inst
-- name: Inst - Network Adapter Driver
- command: "make install; modprobe -r i40e; modprobe i40e"
+- name: Inst - i40e Network Adapter Driver
+ command: "make install && modprobe -r i40e && modprobe i40e"
args:
chdir: "{{ intel_i40e_driver_dir }}/i40e-{{ intel_i40e_version }}/src"
failed_when: no
diff --git a/fdio.infra.ansible/roles/intel/tasks/iavf.yaml b/fdio.infra.ansible/roles/intel/tasks/iavf.yaml
new file mode 100644
index 0000000000..893c608f14
--- /dev/null
+++ b/fdio.infra.ansible/roles/intel/tasks/iavf.yaml
@@ -0,0 +1,30 @@
+---
+# file: roles/intel/tasks/iavf.yaml
+
+- name: Inst - Get iavf Network Adapter Driver
+ get_url:
+ url: "{{ intel_iavf_driver_url }}"
+ dest: "{{ intel_iavf_driver_dir }}/iavf-{{ intel_iavf_version }}.tar.gz"
+ mode: 0644
+ tags:
+ - intel-inst
+
+- name: Inst - Extract iavf Network Adapter Driver
+ unarchive:
+ remote_src: true
+ src: "{{ intel_iavf_driver_dir }}/iavf-{{ intel_iavf_version }}.tar.gz"
+ dest: "{{ intel_iavf_driver_dir }}/"
+ creates: "{{ intel_iavf_driver_dir }}/iavf-{{ intel_iavf_version }}"
+ register: intel_driver_extracted
+ tags:
+ - intel-inst
+
+- name: Inst - iavf Network Adapter Driver
+ command: "make install && modprobe -r iavf && modprobe iavf"
+ args:
+ chdir: "{{ intel_iavf_driver_dir }}/iavf-{{ intel_iavf_version }}/src"
+ failed_when: no
+ when:
+ - intel_driver_extracted
+ tags:
+ - intel-inst
diff --git a/fdio.infra.ansible/roles/intel/tasks/ice.yaml b/fdio.infra.ansible/roles/intel/tasks/ice.yaml
index 92a0eb4d7d..e3aff34cfe 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
-- name: Inst - Get Network Adapter Driver
+- name: Inst - Get ice Network Adapter Driver
get_url:
url: "{{ intel_ice_driver_url }}"
dest: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}.tar.gz"
@@ -9,7 +9,7 @@
tags:
- intel-inst
-- name: Inst - Extract Network Adapter Driver
+- name: Inst - Extract ice Network Adapter Driver
unarchive:
remote_src: true
src: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}.tar.gz"
@@ -19,8 +19,8 @@
tags:
- intel-inst
-- name: Inst - Network Adapter Driver
- command: "make install; modprobe -r ice; modprobe ice"
+- name: Inst - ice Network Adapter Driver
+ command: "make install && modprobe -r ice && modprobe ice"
args:
chdir: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}/src"
failed_when: no
diff --git a/fdio.infra.ansible/roles/intel/tasks/main.yaml b/fdio.infra.ansible/roles/intel/tasks/main.yaml
index 0d6134d452..4f6289113d 100644
--- a/fdio.infra.ansible/roles/intel/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/intel/tasks/main.yaml
@@ -26,7 +26,7 @@
- intel-inst-drivers
- name: Inst - Check Presence of Intel Ethernet 700 Series
- shell: "lspci -d 8086:1585; lspci -d 8086:1572"
+ shell: "lspci -d 8086:1583; lspci -d 8086:1585; lspci -d 8086:1572"
register: intel_700_pcis
failed_when: no
changed_when: no
@@ -46,3 +46,10 @@
# - intel_700_pcis.stdout_lines | length > 0
# tags:
# - intel-inst-drivers
+
+#- name: Inst - VF Driver Intel
+# import_tasks: iavf.yaml
+# when:
+# - intel_700_pcis.stdout_lines | length > 0 or intel_e810_pcis.stdout_lines | length > 0
+# tags:
+# - intel-inst-drivers
diff --git a/fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs.sh b/fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs.sh
index 27b1acb057..4d2c22e7f5 100644
--- a/fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs.sh
+++ b/fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs.sh
@@ -63,6 +63,7 @@ for pci_addr in ${PCI_WHITELIST[@]}; do
ip link set ${pf} vf $(( vf - 1 )) ${mac_str} ${vlan_str}
ip link set ${pf} vf $(( vf - 1 )) trust on
ip link set ${pf} vf $(( vf - 1 )) spoof off
+ sleep .5
done
pci_idx=$(( pci_idx + 1 ))
;;
diff --git a/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml b/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml
index 9509771a92..d12fe1edf5 100644
--- a/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml
@@ -129,32 +129,3 @@
- "Update GRUB"
tags:
- set-grub
-
-- name: Download iAVF driver
- get_url:
- url: "{{ iavf_url }}"
- dest: "{{ iavf_target_dir }}/iavf-{{ iavf_version }}.tar.gz"
- validate_certs: False
- mode: 0644
- tags:
- - install-iavf
-
-- name: Extract iAVF driver
- unarchive:
- remote_src: true
- src: "{{ iavf_target_dir }}/iavf-{{ iavf_version }}.tar.gz"
- dest: "{{ iavf_target_dir }}/"
- creates: "{{ iavf_target_dir }}/iavf-{{ iavf_version }}/src/"
- tags:
- - install-iavf
-
-- name: Compile iAVF driver
- command: "make install"
- args:
- chdir: "{{ iavf_target_dir }}/iavf-{{ iavf_version }}/src/"
- notify:
- - "Reboot server"
- tags:
- - install-iavf
-
-- meta: flush_handlers
diff --git a/fdio.infra.ansible/vpp_device.yaml b/fdio.infra.ansible/vpp_device.yaml
index 7e9c66eeb2..9e334e1749 100644
--- a/fdio.infra.ansible/vpp_device.yaml
+++ b/fdio.infra.ansible/vpp_device.yaml
@@ -18,6 +18,8 @@
tags: baremetal
- role: common
tags: common
+ - role: intel
+ tags: intel
- role: docker
tags: docker
- role: nomad