aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-06-04 10:34:42 +0000
committerPeter Mikus <pmikus@cisco.com>2021-06-10 07:04:21 +0000
commitf754eac4faf76fdbffac648769c03f5668f9f6a2 (patch)
treee43e7d6c39c71cd300add9f66fa2fa4a017130f5 /fdio.infra.ansible/roles
parent75fe508bc9e03291977c1a28ca0adc31c3149df9 (diff)
Infra: vpp_device -> Ubuntu 20.04
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: If24c385b93e1ba310ea258984c97494b4cab467c
Diffstat (limited to 'fdio.infra.ansible/roles')
-rw-r--r--fdio.infra.ansible/roles/vpp_device/defaults/main.yaml6
-rw-r--r--fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs.sh2
-rw-r--r--fdio.infra.ansible/roles/vpp_device/tasks/main.yaml92
3 files changed, 86 insertions, 14 deletions
diff --git a/fdio.infra.ansible/roles/vpp_device/defaults/main.yaml b/fdio.infra.ansible/roles/vpp_device/defaults/main.yaml
new file mode 100644
index 0000000000..d001608c7a
--- /dev/null
+++ b/fdio.infra.ansible/roles/vpp_device/defaults/main.yaml
@@ -0,0 +1,6 @@
+---
+# file: roles/vpp_device/defaults/main.yaml
+
+iavf_target_dir: "/opt"
+iavf_version: "4.1.1"
+iavf_url: "https://downloads.sourceforge.net/project/e1000/iavf%20stable/{{ iavf_version }}/iavf-{{ iavf_version }}.tar.gz?ts=gAAAAABgvfs_L6gSH8B09NfEc8fzoooS3M2wyuOxlFEK5EtTstZWFdb2dYcqJZNqiirAT87dbc3GeJJrRst9KfUgS-byAeyaLw%3D%3D&r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fe1000%2Ffiles%2Fiavf%2520stable%2F{{ iavf_version }}%2Fiavf-{{ iavf_version }}.tar.gz%2Fdownload" \ No newline at end of file
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 393e997d65..27b1acb057 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
@@ -67,7 +67,5 @@ for pci_addr in ${PCI_WHITELIST[@]}; do
pci_idx=$(( pci_idx + 1 ))
;;
esac
- rmmod i40evf
- modprobe i40evf
fi
done
diff --git a/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml b/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml
index 33b551715f..aa381f60e2 100644
--- a/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml
@@ -8,10 +8,12 @@
line: "{{ item }}"
with_items:
- "vfio-pci"
+ when:
+ - cpu_microarchitecture == "thunderx2"
tags:
- load-kernel-modules
-- name: VPP_device - Disable ipv6 router advertisement
+- name: Disable IPv6 Router Advertisement
sysctl:
name: "net.ipv6.conf.default.accept_ra"
value: "0"
@@ -21,7 +23,7 @@
tags:
- set-sysctl
-- name: VPP_device - Disable ipv6 router advertisement
+- name: Disable IPv6 Router Advertisement
sysctl:
name: "net.ipv6.conf.all.accept_ra"
value: "0"
@@ -31,45 +33,85 @@
tags:
- set-sysctl
-- name: VPP_device - Copy csit-initialize-vfs.sh
+- name: Disable IPv6 MLDv1 interval
+ sysctl:
+ name: "net.ipv6.conf.all.mldv1_unsolicited_report_interval=0"
+ value: "0"
+ state: "present"
+ sysctl_file: "/etc/sysctl.d/90-csit.conf"
+ reload: "yes"
+ tags:
+ - set-sysctl
+
+- name: Disable IPv6 MLDv2 interval
+ sysctl:
+ name: "net.ipv6.conf.all.mldv2_unsolicited_report_interval=0"
+ value: "0"
+ state: "present"
+ sysctl_file: "/etc/sysctl.d/90-csit.conf"
+ reload: "yes"
+ tags:
+ - set-sysctl
+
+- name: Disable IPv6 Autoconf
+ sysctl:
+ name: "net.ipv6.conf.all.autoconf=0"
+ value: "0"
+ state: "present"
+ sysctl_file: "/etc/sysctl.d/90-csit.conf"
+ reload: "yes"
+ tags:
+ - set-sysctl
+
+- name: Disable IPv6 MC Forwarding
+ sysctl:
+ name: "net.ipv6.conf.all.mc_forwarding=0"
+ value: "0"
+ state: "present"
+ sysctl_file: "/etc/sysctl.d/90-csit.conf"
+ reload: "yes"
+ tags:
+ - set-sysctl
+
+- name: Copy csit-initialize-vfs.sh
copy:
src: "files/csit-initialize-vfs.sh"
dest: "/usr/local/bin/"
owner: "root"
group: "root"
- mode: "744"
+ mode: 0744
tags:
- copy-vf-script
-- name: VPP_device - Copy csit-initialize-vfs-data.sh
+- name: Copy csit-initialize-vfs-data.sh
copy:
src: "files/{{ vfs_data_file }}"
dest: "/usr/local/bin/csit-initialize-vfs-data.sh"
owner: "root"
group: "root"
- mode: "744"
+ mode: 0744
tags: copy-vf-data-script
when:
- vfs_data_file is defined
-- name: VPP_device - Copy default csit-initialize-vfs-data.sh
+- name: Copy Default csit-initialize-vfs-data.sh
copy:
src: "files/csit-initialize-vfs-default.sh"
dest: "/usr/local/bin/csit-initialize-vfs-data.sh"
owner: "root"
group: "root"
- mode: "744"
+ mode: 0744
tags: copy-vf-data-script
when:
- vfs_data_file is not defined
-- name: VPP_device - Start csit-initialize-vfs.service
+- name: Start csit-initialize-vfs.service
copy:
src: "files/csit-initialize-vfs.service"
dest: "/etc/systemd/system/"
owner: "root"
group: "root"
- mode: "644"
+ mode: 0644
notify:
- "Start csit-initialize-vfs.service"
tags:
@@ -77,7 +119,7 @@
- meta: flush_handlers
-- name: VPP_device - Set hugepages in GRUB
+- name: Set Hugepages In GRUB
lineinfile:
path: "/etc/default/grub"
state: "present"
@@ -85,8 +127,34 @@
line: "GRUB_CMDLINE_LINUX=\"{% for key, value in grub.items() %}{% if value %}{{key}}={{value}} {% else %}{{key}} {% endif %}{% endfor %}\""
notify:
- "Update GRUB"
- - "Reboot server"
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