aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/vpp_device
diff options
context:
space:
mode:
Diffstat (limited to 'fdio.infra.ansible/roles/vpp_device')
-rw-r--r--fdio.infra.ansible/roles/vpp_device/defaults/main.yaml2
-rw-r--r--fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs-spr.sh26
-rw-r--r--fdio.infra.ansible/roles/vpp_device/handlers/main.yaml18
-rw-r--r--fdio.infra.ansible/roles/vpp_device/tasks/main.yaml52
4 files changed, 62 insertions, 36 deletions
diff --git a/fdio.infra.ansible/roles/vpp_device/defaults/main.yaml b/fdio.infra.ansible/roles/vpp_device/defaults/main.yaml
index 9816d7087c..377b910a42 100644
--- a/fdio.infra.ansible/roles/vpp_device/defaults/main.yaml
+++ b/fdio.infra.ansible/roles/vpp_device/defaults/main.yaml
@@ -1,5 +1,5 @@
---
-# file: roles/vpp_device/defaults/main.yaml
+# file: defaults/main.yaml
iavf_target_dir: "/opt"
iavf_version: "4.1.1"
diff --git a/fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs-spr.sh b/fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs-spr.sh
new file mode 100644
index 0000000000..25a9f5d9d9
--- /dev/null
+++ b/fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs-spr.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+# Copyright (c) 2023 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Add Intel Corporation Ethernet Controller 10G X550T to blacklist.
+PCI_BLACKLIST=($(lspci -Dmmd ':1563:0200' | cut -f1 -d' '))
+# Add Intel Corporation Ethernet Controller E810-C for 100GbE QSFP to whitelist.
+PCI_WHITELIST+=($(lspci -Dmmd ':1592:0200' | cut -f1 -d' '))
+
+# See http://pci-ids.ucw.cz/v2.2/pci.ids for more info.
+
+declare -A PF_INDICES
+# Intel NICs
+PF_INDICES["0000:86:00.0"]=0
+PF_INDICES["0000:af:00.0"]=0
diff --git a/fdio.infra.ansible/roles/vpp_device/handlers/main.yaml b/fdio.infra.ansible/roles/vpp_device/handlers/main.yaml
index 29342ae43c..3ac80cc16e 100644
--- a/fdio.infra.ansible/roles/vpp_device/handlers/main.yaml
+++ b/fdio.infra.ansible/roles/vpp_device/handlers/main.yaml
@@ -1,21 +1,21 @@
---
-# file: roles/vpp_device/handlers/main.yaml
+# file: handlers/main.yaml
-- name: Start csit-initialize-vfs.service
- systemd:
+- name: "Start csit-initialize-vfs.service"
+ ansible.builtin.systemd:
enabled: true
- state: started
- name: csit-initialize-vfs.service
+ state: "started"
+ name: "csit-initialize-vfs.service"
tags:
- start-vf-service
-- name: Update GRUB
- command: update-grub
+- name: "Update GRUB"
+ ansible.builtin.command: "update-grub"
tags:
- update-grub
-- name: Reboot server
- reboot:
+- name: "Reboot server"
+ ansible.builtin.reboot:
reboot_timeout: 3600
tags:
- reboot-server
diff --git a/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml b/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml
index ec20d2a3cd..88d4ddb1a0 100644
--- a/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/vpp_device/tasks/main.yaml
@@ -1,15 +1,15 @@
---
-# file: roles/vpp_device/tasks/main.yaml
+# file: tasks/main.yaml
-- name: ThunderX2 Kernel Modules Config
- import_tasks: thunderx2.yaml
+- name: "ThunderX2 Kernel Modules Config"
+ import_tasks: "thunderx2.yaml"
when:
- cpu_microarchitecture == "thunderx2"
tags:
- conf-kernel-modules
-- name: Disable IPv6 Router Advertisement
- sysctl:
+- name: "Disable IPv6 Router Advertisement"
+ ansible.builtin.sysctl:
name: "net.ipv6.conf.default.accept_ra"
value: "0"
state: "present"
@@ -18,8 +18,8 @@
tags:
- set-sysctl
-- name: Disable IPv6 Router Advertisement
- sysctl:
+- name: "Disable IPv6 Router Advertisement"
+ ansible.builtin.sysctl:
name: "net.ipv6.conf.all.accept_ra"
value: "0"
state: "present"
@@ -28,8 +28,8 @@
tags:
- set-sysctl
-- name: Disable IPv6 MLDv1 interval
- sysctl:
+- name: "Disable IPv6 MLDv1 interval"
+ ansible.builtin.sysctl:
name: "net.ipv6.conf.all.mldv1_unsolicited_report_interval"
value: "0"
state: "present"
@@ -38,8 +38,8 @@
tags:
- set-sysctl
-- name: Disable IPv6 MLDv2 interval
- sysctl:
+- name: "Disable IPv6 MLDv2 interval"
+ ansible.builtin.sysctl:
name: "net.ipv6.conf.all.mldv2_unsolicited_report_interval"
value: "0"
state: "present"
@@ -48,8 +48,8 @@
tags:
- set-sysctl
-- name: Disable IPv6 Autoconf
- sysctl:
+- name: "Disable IPv6 Autoconf"
+ ansible.builtin.sysctl:
name: "net.ipv6.conf.all.autoconf"
value: "0"
state: "present"
@@ -58,8 +58,8 @@
tags:
- set-sysctl
-- name: Disable IPv6 MC Forwarding
- sysctl:
+- name: "Disable IPv6 MC Forwarding"
+ ansible.builtin.sysctl:
name: "net.ipv6.conf.all.mc_forwarding"
value: "0"
state: "present"
@@ -68,8 +68,8 @@
tags:
- set-sysctl
-- name: Copy csit-initialize-vfs.sh
- copy:
+- name: "Copy csit-initialize-vfs.sh"
+ ansible.builtin.copy:
src: "files/csit-initialize-vfs.sh"
dest: "/usr/local/bin/"
owner: "root"
@@ -78,8 +78,8 @@
tags:
- copy-vf-script
-- name: Copy csit-initialize-vfs-data.sh
- copy:
+- name: "Copy csit-initialize-vfs-data.sh"
+ ansible.builtin.copy:
src: "files/{{ vfs_data_file }}"
dest: "/usr/local/bin/csit-initialize-vfs-data.sh"
owner: "root"
@@ -89,8 +89,8 @@
when:
- vfs_data_file is defined
-- name: Copy Default csit-initialize-vfs-data.sh
- copy:
+- name: "Copy Default csit-initialize-vfs-data.sh"
+ ansible.builtin.copy:
src: "files/csit-initialize-vfs-default.sh"
dest: "/usr/local/bin/csit-initialize-vfs-data.sh"
owner: "root"
@@ -100,8 +100,8 @@
when:
- vfs_data_file is not defined
-- name: Start csit-initialize-vfs.service
- copy:
+- name: "Start csit-initialize-vfs.service"
+ ansible.builtin.copy:
src: "files/csit-initialize-vfs.service"
dest: "/etc/systemd/system/"
owner: "root"
@@ -112,10 +112,10 @@
tags:
- start-vf-service
-- meta: flush_handlers
+- ansible.builtin.meta: "flush_handlers"
-- name: Set Hugepages In GRUB
- lineinfile:
+- name: "Set Hugepages In GRUB"
+ ansible.builtin.lineinfile:
path: "/etc/default/grub"
state: "present"
regexp: "^GRUB_CMDLINE_LINUX="