X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fshared%2Finterfaces.robot;h=f829b5f384b18fa9139b791ab0f1b1337909ea73;hp=a9b6440173201fcf39b906460c15209d1286fb91;hb=22bfd741614145d86751df2d61ff77af9db63627;hpb=44dcb3113c8ade2e44543746abca861a89362c9b diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot index a9b6440173..f829b5f384 100644 --- a/resources/libraries/robot/shared/interfaces.robot +++ b/resources/libraries/robot/shared/interfaces.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2022 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: @@ -137,11 +137,12 @@ | | 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} +| | | 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_no_tx_checksum_offload} | | | ... | ${dut}.Add DPDK No Tx Checksum Offload -| | | Run Keyword | ${dut}.Add DPDK Log Level | debug +| | | 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 | not ${jumbo} @@ -151,7 +152,8 @@ | | | Run Keyword If | ${nic_txq_size} > 0 | | | ... | ${dut}.Add DPDK Dev Default TXD | ${nic_txq_size} | | | Run Keyword If | '${crypto_type}' != '${None}' -| | | ... | ${dut}.Add DPDK Cryptodev | ${thr_count_int} +| | | ... | ${dut}.Add DPDK Cryptodev | ${dp_count_int} +| | | Run Keyword | ${dut}.Add DPDK Max Simd Bitwidth | ${GRAPH_NODE_VARIANT} | | END | | ${_vlan_strip} | ${value}= | Run Keyword And Ignore Error | | ... | Variable Should Exist | ${vlan_strip_off} @@ -164,15 +166,30 @@ | | | | No operation +| Pre-initialize layer af_xdp on all DUTs +| | [Documentation] +| | ... | Pre-initialize af_xdp driver. +| | +| | FOR | ${dut} | IN | @{duts} +| | | Set Interface State PCI +| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | state=up +| | | Set Interface Channels +| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | num_queues=${rxq_count_int} +| | | ... | channel=combined +| | END + | Pre-initialize layer rdma-core on all DUTs | | [Documentation] | | ... | Pre-initialize rdma-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=1518 +| | 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" +| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | rxf="off" | txf="off" | | END | Pre-initialize layer mlx5_core on all DUTs @@ -183,11 +200,9 @@ | | | 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 MTU | ${nodes['${dut}']} | ${${dut}_pf_pci} | mtu=1518 | | | 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" +| | | ... | ${nodes['${dut}']} | ${${dut}_pf_pci} | rxf="off" | txf="off" | | END | Initialize layer driver @@ -377,6 +392,32 @@ | | | Set List Value | ${${dut}_vf${pf}_vlan} | ${vf} | ${_vlan} | | END +| Initialize layer af_xdp on node +| | [Documentation] +| | ... | Initialize AF_XDP (eBPF) interfaces on DUT on NIC PF. +| | +| | ... | *Arguments:* +| | ... | - dut - DUT node. Type: string +| | ... | - pf - NIC physical function (physical port). Type: integer +| | +| | ... | *Example:* +| | +| | ... | \| Initialize layer af_xdp on node \| DUT1 \| 1 \| +| | +| | [Arguments] | ${dut} | ${pf} +| | +| | ${_af_xdp}= | VPP Create AF XDP Interface +| | ... | ${nodes['${dut}']} | ${${dut}_vf${pf}}[0] +| | ... | num_rx_queues=${65535} +| | ... | rxq_size=${nic_rxq_size} | txq_size=${nic_txq_size} +| | ${cpu_skip_cnt}= | Evaluate | ${CPU_CNT_SYSTEM}+${CPU_CNT_MAIN} +| | ${cpu_skip_cnt}= | Evaluate | ${cpu_skip_cnt}+${cpu_count_int} +| | ${cpu_skip_cnt}= | Evaluate | ${cpu_skip_cnt}+(${pf}-${1})*${rxq_count_int} +| | Set Interface IRQs Affinity +| | ... | ${nodes['${dut}']} | ${_af_xdp} +| | ... | cpu_skip_cnt=${cpu_skip_cnt} | cpu_cnt=${rxq_count_int} +| | Set List Value | ${${dut}_vf${pf}} | 0 | ${_af_xdp} + | Initialize layer rdma-core on node | | [Documentation] | | ... | Initialize rdma-core (Mellanox VPP) interfaces on DUT on NIC PF.