diff options
Diffstat (limited to 'resources/tools/testbed-setup')
14 files changed, 75 insertions, 19 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/aws/handlers/main.yaml b/resources/tools/testbed-setup/ansible/roles/aws/handlers/main.yaml index b155b4b246..7363dc2c34 100644 --- a/resources/tools/testbed-setup/ansible/roles/aws/handlers/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/aws/handlers/main.yaml @@ -6,3 +6,10 @@ reboot_timeout: 3600 tags: - reboot-server + +- name: AWS - Reload systemd-modules + systemd: + name: "systemd-modules-load" + state: "restarted" + tags: + - reload-systemd-modules diff --git a/resources/tools/testbed-setup/ansible/roles/azure/files/10-dtap.link b/resources/tools/testbed-setup/ansible/roles/azure/files/10-dtap.link new file mode 100644 index 0000000000..a8e0aa10f3 --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/azure/files/10-dtap.link @@ -0,0 +1,4 @@ +[Match] +OriginalName=dtap* +[Link] +NamePolicy=kernel diff --git a/resources/tools/testbed-setup/ansible/roles/azure/handlers/main.yaml b/resources/tools/testbed-setup/ansible/roles/azure/handlers/main.yaml index 246e8dbfe0..f0d46062d9 100644 --- a/resources/tools/testbed-setup/ansible/roles/azure/handlers/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/azure/handlers/main.yaml @@ -7,7 +7,7 @@ tags: - reboot-server -- name: Reload systemd-modules +- name: Azure - Reload systemd-modules systemd: name: "systemd-modules-load" state: "restarted" diff --git a/resources/tools/testbed-setup/ansible/roles/azure/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/azure/tasks/main.yaml index 3513bb7132..c8d72475d8 100644 --- a/resources/tools/testbed-setup/ansible/roles/azure/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/azure/tasks/main.yaml @@ -11,7 +11,7 @@ - "ib_uverbs" - "mlx4_ib" - "mlx5_ib" - notify: "Reload systemd-modules" + notify: "Azure - Reload systemd-modules" tags: - load-kernel-modules @@ -24,3 +24,15 @@ reload: "yes" tags: - set-sysctl + +- name: Azure - prevent interface renaming + copy: + src: "files/10-dtap.link" + dest: "/etc/systemd/network/" + owner: "root" + group: "root" + mode: "0644" + notify: + - "Reboot server" + tags: + - prevent-interface-renaming diff --git a/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml index 5be9fa93a5..c639f11088 100644 --- a/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml @@ -19,12 +19,14 @@ packages_by_arch: - [] # Kernel version to check. -kernel_version: "{{ kernel_version_by_distro_by_arch[ansible_distribution | lower][ansible_machine] | join(' ') }}" +kernel_version: "{{ kernel_version_by_distro_by_arch[ansible_distribution | lower][ansible_machine] }}" kernel_version_by_distro_by_arch: ubuntu: x86_64: - "4.15.0-72-generic" + - "5.3.0-1020-azure" + - "5.3.0-1017-aws" aarch64: - "4.15.0-54-generic" diff --git a/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml index 02a9ef3d00..e88c39c180 100644 --- a/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml @@ -24,7 +24,7 @@ register: current_kernel_version changed_when: false failed_when: | - kernel_version not in current_kernel_version.stdout + current_kernel_version.stdout not in kernel_version tags: - check-kernel-version diff --git a/resources/tools/testbed-setup/ansible/roles/dpdk/files/dpdk-mlx5.patch b/resources/tools/testbed-setup/ansible/roles/dpdk/files/dpdk-mlx5.patch new file mode 100644 index 0000000000..a3928d70f7 --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/dpdk/files/dpdk-mlx5.patch @@ -0,0 +1,19 @@ +diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c +index d7d3bc73c..c21c38485 100644 +--- a/drivers/net/mlx5/mlx5_ethdev.c ++++ b/drivers/net/mlx5/mlx5_ethdev.c +@@ -1032,11 +1032,14 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, + ETH_LINK_HALF_DUPLEX : ETH_LINK_FULL_DUPLEX); + dev_link.link_autoneg = !(dev->data->dev_conf.link_speeds & + ETH_LINK_SPEED_FIXED); ++#if 0 ++ /* FIXME: this does not work on Azure w/ CX4-LX */ + if (((dev_link.link_speed && !dev_link.link_status) || + (!dev_link.link_speed && dev_link.link_status))) { + rte_errno = EAGAIN; + return -rte_errno; + } ++#endif + *link = dev_link; + return 0; + } diff --git a/resources/tools/testbed-setup/ansible/roles/trex/files/t-rex.patch b/resources/tools/testbed-setup/ansible/roles/trex/files/t-rex.patch index 65b437588d..e7db647779 100644 --- a/resources/tools/testbed-setup/ansible/roles/trex/files/t-rex.patch +++ b/resources/tools/testbed-setup/ansible/roles/trex/files/t-rex.patch @@ -534,3 +534,15 @@ index 782de540..8cedea84 100644 #ifdef HAVE_TC_ACT_BPF #include <linux/tc_act/tc_bpf.h> #endif +diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp +index 0f66b07a..8c37ea15 100644 +--- a/src/main_dpdk.cpp ++++ b/src/main_dpdk.cpp +@@ -6969,6 +6969,7 @@ COLD_FUNC bool DpdkTRexPortAttr::update_link_status_nowait(){ + bool changed = false; + rte_eth_link_get_nowait(m_repid, &new_link); + ++ new_link.link_speed = ETH_SPEED_NUM_50G; + if (new_link.link_speed != m_link.link_speed || + new_link.link_duplex != m_link.link_duplex || + new_link.link_autoneg != m_link.link_autoneg || diff --git a/resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml index d8f35cbc17..0e139a22e6 100644 --- a/resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml @@ -46,7 +46,7 @@ strip: 1 loop: "{{ trex_version }}" when: - - azure is defined + - azure is defined and "{{ item }}" == "2.73" tags: - install-trex diff --git a/resources/tools/testbed-setup/ansible/sut_aws.yaml b/resources/tools/testbed-setup/ansible/sut_aws.yaml index 5b2fc8d3e1..a7642abfef 100644 --- a/resources/tools/testbed-setup/ansible/sut_aws.yaml +++ b/resources/tools/testbed-setup/ansible/sut_aws.yaml @@ -21,5 +21,5 @@ tags: docker - role: cleanup tags: cleanup - - role: calibration - tags: calibration +# - role: calibration +# tags: calibration diff --git a/resources/tools/testbed-setup/ansible/sut_azure.yaml b/resources/tools/testbed-setup/ansible/sut_azure.yaml index 669e4097c6..835ab63d83 100644 --- a/resources/tools/testbed-setup/ansible/sut_azure.yaml +++ b/resources/tools/testbed-setup/ansible/sut_azure.yaml @@ -21,5 +21,5 @@ tags: dpdk - role: cleanup tags: cleanup - - role: calibration - tags: calibration +# - role: calibration +# tags: calibration diff --git a/resources/tools/testbed-setup/ansible/templates/topology_azure.j2 b/resources/tools/testbed-setup/ansible/templates/topology_azure.j2 index df595fd4b8..e4dd6cdbf2 100644 --- a/resources/tools/testbed-setup/ansible/templates/topology_azure.j2 +++ b/resources/tools/testbed-setup/ansible/templates/topology_azure.j2 @@ -21,13 +21,13 @@ nodes: mac_address: "{{ tg_if1_mac | lower | replace('-',':') }}" pci_address: "0002:00:02.0" link: link1 - model: azure-mlx-40g + model: Azure-MLX-40G port2: # tg_instance/p2 - 40GE port2 on Mellanox NIC. mac_address: "{{ tg_if2_mac | lower | replace('-',':') }}" pci_address: "0003:00:02.0" link: link2 - model: azure-mlx-40g + model: Azure-MLX-40G DUT1: type: DUT host: "{{ dut1_public_ip }}" @@ -47,13 +47,13 @@ nodes: mac_address: "{{ dut1_if1_mac | lower | replace('-',':') }}" pci_address: "0002:00:02.0" link: link1 - model: azure-mlx-40g + model: Azure-MLX-40G port2: # dut2_instance/p1 - 40GE port2 on Mellanox NIC. mac_address: "{{ dut1_if2_mac | lower | replace('-',':') }}" pci_address: "0003:00:02.0" link: link21 - model: azure-mlx-40g + model: Azure-MLX-40G DUT2: type: DUT host: "{{ dut2_public_ip }}" @@ -73,10 +73,10 @@ nodes: mac_address: "{{ dut2_if1_mac | lower | replace('-',':') }}" pci_address: "0002:00:02.0" link: link21 - model: azure-mlx-40g + model: Azure-MLX-40G port2: # dut2_instance/p1 - 40GE port2 on Mellanox NIC. mac_address: "{{ dut2_if2_mac | lower | replace('-',':') }}" pci_address: "0003:00:02.0" link: link2 - model: azure-mlx-40g + model: Azure-MLX-40G diff --git a/resources/tools/testbed-setup/ansible/tg_aws.yaml b/resources/tools/testbed-setup/ansible/tg_aws.yaml index eb3a303825..dda50f416e 100644 --- a/resources/tools/testbed-setup/ansible/tg_aws.yaml +++ b/resources/tools/testbed-setup/ansible/tg_aws.yaml @@ -25,5 +25,5 @@ tags: docker - role: cleanup tags: cleanup - - role: calibration - tags: calibration +# - role: calibration +# tags: calibration diff --git a/resources/tools/testbed-setup/ansible/tg_azure.yaml b/resources/tools/testbed-setup/ansible/tg_azure.yaml index e28d0d3336..afe2d11c4a 100644 --- a/resources/tools/testbed-setup/ansible/tg_azure.yaml +++ b/resources/tools/testbed-setup/ansible/tg_azure.yaml @@ -23,5 +23,5 @@ tags: docker - role: cleanup tags: cleanup - - role: calibration - tags: calibration +# - role: calibration +# tags: calibration |