feat(device): 1n-alt ansible improvement 56/40356/1 oper-240219
authorJuraj Linkeš <juraj.linkes@pantheon.tech>
Fri, 16 Feb 2024 11:02:45 +0000 (12:02 +0100)
committerJuraj Linkeš <juraj.linkes@pantheon.tech>
Fri, 16 Feb 2024 11:37:57 +0000 (12:37 +0100)
We're seeing extra IGMP traffic which interferes with tests which must
be disabled. This is done by disabling the setting by default on all
interfaces.

The default setting is also adopted for other traffic-related
configuration:
Default sets the configuration when the interface is created. For
hardware interfaces, that is at boot time. For VF interfaces, when we
create them with the csit-initialize-vfs.sh script and for virtual
interfaces when they're created.
On the other hand, the all configuration option doesn't set the
configuration. It uses the current configuration value along with the
passed configuration value to produce a new value, which could be
expressed as:

f(old_value, value_from_all) -> new_value

Where f is a function specific to each configuration option. Using all
thus requires us to know the function and the old value which is less
reliable than just using default everywhere.

Also fix the 1n-alt VF init script.

Change-Id: I3da15abfb5a1e76769076edd95d20e2168b6f71f
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs-alt.sh
fdio.infra.ansible/roles/vpp_device/tasks/main.yaml

index 2f9b841..cd04d61 100644 (file)
@@ -24,7 +24,7 @@ PCI_BLACKLIST+=($(lspci -Dmmd ':1017:0200' | cut -f1 -d' '))
 # Add Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ to whitelist.
 PCI_WHITELIST=($(lspci -Dmmd ':1583:0200' | cut -f1 -d' '))
 # Add MT2892 Family [ConnectX-6 Dx] 101d to whitelist.
-PCI_WHITELIST=($(lspci -Dmmd ':101d:0200' | cut -f1 -d' '))
+PCI_WHITELIST+=($(lspci -Dmmd ':101d:0200' | cut -f1 -d' '))
 
 # See http://pci-ids.ucw.cz/v2.2/pci.ids for more info.
 
index 44505d3..9191645 100644 (file)
@@ -21,9 +21,9 @@
   tags:
     - set-sysctl
 
-- name: "Disable IPv6 Router Advertisement"
+- name: "Disable IPv6 MLDv1 interval"
   ansible.builtin.sysctl:
-    name: "net.ipv6.conf.all.accept_ra"
+    name: "net.ipv6.conf.default.mldv1_unsolicited_report_interval"
     value: "0"
     state: "present"
     sysctl_file: "/etc/sysctl.d/90-csit.conf"
@@ -31,9 +31,9 @@
   tags:
     - set-sysctl
 
-- name: "Disable IPv6 MLDv1 interval"
+- name: "Disable IPv6 MLDv2 interval"
   ansible.builtin.sysctl:
-    name: "net.ipv6.conf.all.mldv1_unsolicited_report_interval"
+    name: "net.ipv6.conf.default.mldv2_unsolicited_report_interval"
     value: "0"
     state: "present"
     sysctl_file: "/etc/sysctl.d/90-csit.conf"
@@ -41,9 +41,9 @@
   tags:
     - set-sysctl
 
-- name: "Disable IPv6 MLDv2 interval"
+- name: "Disable IPv6 Autoconf"
   ansible.builtin.sysctl:
-    name: "net.ipv6.conf.all.mldv2_unsolicited_report_interval"
+    name: "net.ipv6.conf.default.autoconf"
     value: "0"
     state: "present"
     sysctl_file: "/etc/sysctl.d/90-csit.conf"
@@ -51,9 +51,9 @@
   tags:
     - set-sysctl
 
-- name: "Disable IPv6 Autoconf"
+- name: "Disable IPv6 MC Forwarding"
   ansible.builtin.sysctl:
-    name: "net.ipv6.conf.all.autoconf"
+    name: "net.ipv6.conf.default.mc_forwarding"
     value: "0"
     state: "present"
     sysctl_file: "/etc/sysctl.d/90-csit.conf"
   tags:
     - set-sysctl
 
-- name: "Disable IPv6 MC Forwarding"
+- name: "Disable IPv4 IGMPv2 interval"
+  ansible.builtin.sysctl:
+    name: "net.ipv4.conf.default.igmpv2_unsolicited_report_interval"
+    value: "0"
+    state: "present"
+    sysctl_file: "/etc/sysctl.d/90-csit.conf"
+    reload: "yes"
+  tags:
+    - set-sysctl
+
+- name: "Disable IPv4 IGMPv3 interval"
   ansible.builtin.sysctl:
-    name: "net.ipv6.conf.all.mc_forwarding"
+    name: "net.ipv4.conf.default.igmpv3_unsolicited_report_interval"
     value: "0"
     state: "present"
     sysctl_file: "/etc/sysctl.d/90-csit.conf"