X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fshared%2Finterfaces.robot;h=4fdc1ee0a609ef34a585389dccd6a174319f6ba7;hb=632c71b4d20c9e775b1578c628879fa0f9dfdfb4;hp=f1dc89d3001f2cedd28259f8c2d28b50389505a7;hpb=14a71b74b414df7616ccb5ada3d50ecb90d96bae;p=csit.git diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot index f1dc89d300..4fdc1ee0a6 100644 --- a/resources/libraries/robot/shared/interfaces.robot +++ b/resources/libraries/robot/shared/interfaces.robot @@ -114,7 +114,11 @@ | | ... | Pre-initialize vfio-pci driver by adding related sections to startup | | ... | config on all DUTs. | | +| | ${index}= | Get Index From List | ${TEST TAGS} | DPDK +| | Run Keyword If | ${index} >= 0 | Return From Keyword | | FOR | ${dut} | IN | @{duts} +| | | Stop VPP Service | ${nodes['${dut}']} +| | | PCI Driver Unbind List | ${nodes['${dut}']} | @{${dut}_pf_pci} | | | Run keyword | ${dut}.Add DPDK Dev | @{${dut}_pf_pci} | | | Run Keyword If | ${dpdk_no_tx_checksum_offload} | | | ... | ${dut}.Add DPDK No Tx Checksum Offload @@ -143,9 +147,29 @@ | Pre-initialize layer rdma-core on all DUTs | | [Documentation] -| | ... | Pre-initialize rdma-core driver. Currently no operation. +| | ... | Pre-initialize rdma-core driver. | | -| | No operation +| | FOR | ${dut} | IN | @{duts} +| | | Set Interface Flow Control +| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | rx="off" | tx="off" +| | | Set PCI Parameter +| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | key="68.w" | value="3BCD" +| | END + +| Pre-initialize layer mlx5_core on all DUTs +| | [Documentation] +| | ... | Pre-initialize mlx5_core driver. +| | +| | FOR | ${dut} | IN | @{duts} +| | | Run Keyword If | ${jumbo} +| | | ... | Set Interface MTU | ${nodes['${dut}']} | ${${dut}_pf_pci} | mtu=9200 +| | | ... | ELSE +| | | ... | Set Interface MTU | ${nodes['${dut}']} | ${${dut}_pf_pci} | mtu=1500 +| | | Set Interface Flow Control +| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | rx="off" | tx="off" +| | | Set PCI Parameter +| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | key="68.w" | value="3BCD" +| | END | Initialize layer driver | | [Documentation] @@ -286,6 +310,13 @@ | | ... | rxq_size=${nic_rxq_size} | txq_size=${nic_txq_size} | | Set List Value | ${${dut}_vf${pf}} | 0 | ${_rdma} +| Initialize layer mlx5_core on node +| | [Documentation] +| | ... | Initialize mlx5_core interfaces on DUT on NIC PF. +| | ... | Currently no operation. +| | +| | No operation + | Initialize layer interface | | [Documentation] | | ... | Physical interfaces variables to be created on all DUTs. @@ -467,11 +498,11 @@ | | ... | ${vlan_per_chain}=${True} | ${start}=${1} | | | | FOR | ${id} | IN RANGE | ${start} | ${count} + 1 -| | | ${_dot1q} | Initialize layer dot1q on node on PF for chain +| | | ${_dot1q}= | Initialize layer dot1q on node on PF for chain | | | ... | dut=${dut} | pf=${pf} | id=${id} | vlan_per_chain=${vlan_per_chain} | | | # First id results in non-None indices, after that _1_ are defined. | | | ${_dot1q}= | Set Variable If | '${_dot1q}' == '${NONE}' -| | | ... | ${${dut}_dot1q${pf}_1} | ${_dot1q} +| | | ... | ${${dut}_dot1q${pf}_1}[0] | ${_dot1q} | | | ${_dot1q}= | Create List | ${_dot1q} | | | Set Test Variable | ${${dut}_dot1q${pf}_${id}} | ${_dot1q} | | END @@ -500,7 +531,7 @@ | | [Arguments] | ${dut} | ${pf} | ${id} | ${vlan_per_chain}=${True} | | | | Return From Keyword If | ${id} != ${1} and not ${vlan_per_chain} -| | ... | ${NONE} | ${NONE} +| | ... | ${NONE} | | ${_default}= | Evaluate | ${pf} * ${100} + ${id} - ${1} | | ${_vlan}= | Get Variable Value | \${${dut}_pf${pf}_vlan} | | ${_vlan}= | Set Variable If | '${_vlan}[0]' != '${NONE}' @@ -590,10 +621,12 @@ | | | ${_ip4vxlan}= | Create VXLAN interface | | | ... | ${nodes['${dut}']} | ${_vni} | | | ... | 172.${pf}6.0.1 | 172.${pf}7.${_subnet}.2 -| | | ${_prev_mac}= | Set Variable If | '${dut}' == 'DUT1' -| | | ... | ${tg_if1_mac} | ${dut1_if2_mac} -| | | ${_next_mac}= | Set Variable If | '${dut}' == 'DUT1' and ${duts_count} == 2 -| | | ... | ${dut2_if1_mac} | ${tg_if2_mac} +| | | ${_prev_mac}= +| | | ... | Set Variable If | '${dut}' == 'DUT1' +| | | ... | ${TG_pf1_mac}[0] | ${DUT1_pf2_mac}[0] +| | | ${_next_mac}= +| | | ... | Set Variable If | '${dut}' == 'DUT1' and ${duts_count} == 2 +| | | ... | ${DUT2_pf1_mac}[0] | ${TG_pf2_mac}[0] | | | ${_even}= | Evaluate | ${pf} % 2 | | | ${_mac}= | Set Variable If | ${_even} | | | ... | ${_prev_mac} | ${_next_mac}