diff options
Diffstat (limited to 'resources/libraries/robot/shared')
-rw-r--r-- | resources/libraries/robot/shared/container.robot | 31 | ||||
-rw-r--r-- | resources/libraries/robot/shared/interfaces.robot | 11 | ||||
-rw-r--r-- | resources/libraries/robot/shared/test_setup.robot | 3 |
3 files changed, 44 insertions, 1 deletions
diff --git a/resources/libraries/robot/shared/container.robot b/resources/libraries/robot/shared/container.robot index 9f08e6b1d4..dbcf690b72 100644 --- a/resources/libraries/robot/shared/container.robot +++ b/resources/libraries/robot/shared/container.robot @@ -371,3 +371,34 @@ | | END | | Append To List | ${container_groups} | ${container_group} | | Save VPP PIDs + +| Start vswitch containers +| | [Documentation] +| | ... | Configure and start multiple vswitch in container on all DUTs. +| | +| | ... | *Arguments:* +| | ... | - phy_cores - Number of physical cores to use. Type: integer +| | ... | - rx_queues: Number of RX queues. Type: integer +| | +| | [Arguments] | ${phy_cores} | ${rx_queues}=${None} +| | +| | Set Test Variable | @{container_groups} | @{EMPTY} +| | Set Test Variable | ${container_group} | VSWITCH +| | Import Library | resources.libraries.python.ContainerUtils.ContainerManager +| | ... | engine=${container_engine} | WITH NAME | VSWITCH +| | Stop VPP service on all DUTs | ${nodes} +| | FOR | ${dut} | IN | @{duts} +| | | FOR | ${i} | IN RANGE | 1 | ${${nic_pfs}//${2}+1} +| | | | Construct container on DUT | ${dut} +| | | | ... | nf_chains=${1} | nf_nodes=${${nic_pfs}//${2}} +| | | | ... | nf_chain=${1} | nf_node=${i} +| | | | ... | auto_scale=${False} | pinning=${False} +| | | END +| | END +| | Run Keyword | VSWITCH.Acquire all containers +| | Run Keyword | VSWITCH.Create all containers +| | Run Keyword | VSWITCH.Configure vpp in all containers +| | ... | vswitch_ip4scale | nodes=${nodes} | rts_per_flow=${rts_per_flow} +| | Run Keyword | VSWITCH.Start VPP In All Containers +| | Append To List | ${container_groups} | VSWITCH +| | Save VPP PIDs diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot index 4af68d0e28..b4d6959d01 100644 --- a/resources/libraries/robot/shared/interfaces.robot +++ b/resources/libraries/robot/shared/interfaces.robot @@ -16,6 +16,7 @@ | Library | resources.libraries.python.VhostUser *** Variables *** +| ${dpdk_enable_tcp_udp_checksum}= | ${False} | ${dpdk_no_tx_checksum_offload}= | ${True} *** Keywords *** @@ -136,11 +137,19 @@ | | | Unbind PCI Devices From Other Driver | ${nodes['${dut}']} | vfio-pci | | | | ... | @{${dut}_pf_pci} | | | Run keyword | ${dut}.Add DPDK Dev | @{${dut}_pf_pci} +| | | Run Keyword If | ${dpdk_enable_tcp_udp_checksum} +| | | ... | ${dut}.Add DPDK Enable TCP UDP Checksum | | | Run Keyword If | ${dpdk_no_tx_checksum_offload} | | | ... | ${dut}.Add DPDK No Tx Checksum Offload | | | Run Keyword | ${dut}.Add DPDK Log Level | debug | | | Run Keyword | ${dut}.Add DPDK Uio Driver | vfio-pci | | | Run Keyword | ${dut}.Add DPDK Dev Default RXQ | ${rxq_count_int} +| | | Run Keyword If | '${nic_name}' == 'Amazon-Nitro-100G' +| | | ... | ${dut}.Add DPDK Dev Default Devargs | +| | | ... | "normal_llq_hdr=1,enable_llq=1,control_path_poll_interval=0" +| | | Run Keyword If | '${nic_name}' == 'Amazon-Nitro-200G' +| | | ... | ${dut}.Add DPDK Dev Default Devargs | +| | | ... | "normal_llq_hdr=1,enable_llq=1,control_path_poll_interval=0" | | | Run Keyword If | not ${jumbo} | | | ... | ${dut}.Add DPDK No Multi Seg | | | Run Keyword If | ${nic_rxq_size} > 0 @@ -195,6 +204,8 @@ | | Run Keyword If | ${index} >= 0 | Return From Keyword | | FOR | ${dut} | IN | @{duts} | | | Run keyword | ${dut}.Add DPDK Dev | @{${dut}_pf_pci} +| | | Run Keyword If | ${dpdk_enable_tcp_udp_checksum} +| | | ... | ${dut}.Add DPDK Enable TCP UDP Checksum | | | Run Keyword If | ${dpdk_no_tx_checksum_offload} | | | ... | ${dut}.Add DPDK No Tx Checksum Offload | | | Run Keyword | ${dut}.Add DPDK Log Level | debug diff --git a/resources/libraries/robot/shared/test_setup.robot b/resources/libraries/robot/shared/test_setup.robot index 22e017fd6f..ae3cfa495f 100644 --- a/resources/libraries/robot/shared/test_setup.robot +++ b/resources/libraries/robot/shared/test_setup.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Cisco and/or its affiliates. +# Copyright (c) 2024 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: @@ -50,3 +50,4 @@ | | | | ${trex_running}= | Is Trex Running | ${tg} | | Run Keyword If | not ${trex_running} | Startup Trex | ${tg} | ${osi_layer} +| | Stop Vpp Service on All Duts | ${nodes} |