X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2FDPDK%2Fdefault.robot;h=070350a082b94c7acaf6d823ad15f1ff8f27fb64;hp=bf01aec429cc7bd93c4ce76e81751824fc52a1d9;hb=afa3def247a11985b17f310e58b6f5fae16dc306;hpb=b633f4ebf7878ae968e27b71da69b6cde0265904 diff --git a/resources/libraries/robot/DPDK/default.robot b/resources/libraries/robot/DPDK/default.robot index bf01aec429..070350a082 100644 --- a/resources/libraries/robot/DPDK/default.robot +++ b/resources/libraries/robot/DPDK/default.robot @@ -18,41 +18,93 @@ | Library | resources.libraries.python.DUTSetup | Library | resources.libraries.python.TGSetup | Library | resources.libraries.python.DPDK.L2fwdTest +| Library | resources.libraries.python.DPDK.L3fwdTest | Library | Collections *** Keywords *** | Start L2FWD '${m}' worker threads and rxqueues '${n}' with jumbo frames '${b}' -| | [Documentation] | Start the l2fwd with M worker threads without HTT -| | ... | and rxqueues N and B(yes or no) jumbo frames in all DUTs -| | ${nb-cores}= | Catenate | ${m} -| | ${cpu}= | Run Keyword If | '${m}' == '1' | Catenate | 0x3 -| | ... | ELSE IF | '${m}' == '2' | Catenate | 0x403 -| | ... | ELSE IF | '${m}' == '4' | Catenate | 0xc07 -| | ... | ELSE IF | '${m}' == '6' | Catenate | 0x1c0f -| | ... | ELSE IF | '${m}' == '8' | Catenate | 0x3c1f -| | ... | ELSE | Fail | Not supported combination -| | ${rxqueues}= | Catenate | ${n} -| | ${jumbo_frames}= | Catenate | ${b} -| | Start l2fwd to all DUTs | ${cpu} | ${nb-cores} -| | ... | ${rxqueues} | ${jumbo_frames} - -| Start l2fwd to all DUTs -| | [Documentation] | Setup worker threads and rxqueues in l2fwd startup -| | ... | configuration to all DUTs -| | ... -| | ... | *Arguments:* -| | ... | - ${cpu} - CPU configuration. Type: string -| | ... | - ${nb-cores} - cores for the packet forwarding. Type: string -| | ... | - ${rxqueues} - rxqueues configuration. Type: string -| | ... | - ${jumbo_frames} - Enable the jumbo frames or not. Type: string +| | [Documentation] | Start the l2fwd with M worker threads without SMT +| | ... | and rxqueues N and B (yes or no) jumbo frames in all DUTs. | | ... -| | ... | *Example:* +| | ${m_int}= | Convert To Integer | ${m} +| | ${cpu_cnt}= | Evaluate | ${m_int}+1 +| | ${nb_cores}= | Convert to String | ${m} +| | ${rxqueues}= | Convert to String | ${n} +| | ${jumbo_frames}= | Convert to String | ${b} +| | ${dut1_numa}= | Get interfaces numa node | ${dut1} +| | ... | ${dut1_if1} | ${dut1_if2} +| | ${dut2_numa}= | Get interfaces numa node | ${dut2} +| | ... | ${dut2_if1} | ${dut2_if2} +| | ${dut1_cpus}= | Cpu Range Per Node Str | ${dut1} | ${dut1_numa} +| | ... | skip_cnt=${1} | cpu_cnt=${cpu_cnt} +| | ${dut2_cpus}= | Cpu Range Per Node Str | ${dut2} | ${dut2_numa} +| | ... | skip_cnt=${1} | cpu_cnt=${cpu_cnt} +| | Start the l2fwd test | ${dut1} | ${dut1_cpus} | ${nb_cores} | ${rxqueues} +| | ... | ${jumbo_frames} +| | Start the l2fwd test | ${dut2} | ${dut2_cpus} | ${nb_cores} | ${rxqueues} +| | ... | ${jumbo_frames} + +| Start L2FWD '${m}' worker threads using SMT and rxqueues '${n}' with jumbo frames '${b}' +| | [Documentation] | Start the l2fwd with M worker threads with SMT +| | ... | and rxqueues N and B (yes or no) jumbo frames in all DUTs. | | ... -| | ... | \| Start l2fwd to all DUTs \| 0x403 \| 2 \ -| | ... | \| 1 \| no -| | [Arguments] | ${cpu} | ${nb-cores} | ${rxqueues} | ${jumbo_frames} -| | ${duts}= | Get Matches | ${nodes} | DUT* -| | :FOR | ${dut} | IN | @{duts} -| | | Start the l2fwd test | ${nodes['${dut}']} -| | | ... | ${cpu} | ${nb-cores} | ${rxqueues} | ${jumbo_frames} +| | ${m_int}= | Convert To Integer | ${m} +| | ${cpu_cnt}= | Evaluate | ${m_int}+1 +| | ${nb_cores_int}= | Evaluate | ${m_int}*2 +| | ${nb_cores}= | Convert to String | ${nb_cores_int} +| | ${rxqueues}= | Convert to String | ${n} +| | ${jumbo_frames}= | Convert to String | ${b} +| | ${dut1_numa}= | Get interfaces numa node | ${dut1} +| | ... | ${dut1_if1} | ${dut1_if2} +| | ${dut2_numa}= | Get interfaces numa node | ${dut2} +| | ... | ${dut2_if1} | ${dut2_if2} +| | ${dut1_cpus}= | Cpu Range Per Node Str | ${dut1} | ${dut1_numa} +| | ... | skip_cnt=${1} | cpu_cnt=${cpu_cnt} | smt_used=${True} +| | ${dut2_cpus}= | Cpu Range Per Node Str | ${dut2} | ${dut2_numa} +| | ... | skip_cnt=${1} | cpu_cnt=${cpu_cnt} | smt_used=${True} +| | Start the l2fwd test | ${dut1} | ${dut1_cpus} | ${nb_cores} | ${rxqueues} +| | ... | ${jumbo_frames} +| | Start the l2fwd test | ${dut2} | ${dut2_cpus} | ${nb_cores} | ${rxqueues} +| | ... | ${jumbo_frames} + +| Start L3FWD '${m}' worker threads and rxqueues '${n}' with jumbo frames '${b}' +| | [Documentation] | Start the l3fwd with M worker threads without SMT +| | ... | and rxqueues N and B(yes or no) jumbo frames in all DUTs. +| | ${cpu_cnt}= | Convert To Integer | ${m} +| | ${nb_cores}= | Convert to String | ${m} +| | ${rxqueues}= | Convert to String | ${n} +| | ${jumbo_frames}= | Convert to String | ${b} +| | ${dut1_numa}= | Get interfaces numa node | ${dut1} +| | ... | ${dut1_if1} | ${dut1_if2} +| | ${dut2_numa}= | Get interfaces numa node | ${dut2} +| | ... | ${dut2_if1} | ${dut2_if2} +| | ${dut1_cpus}= | Cpu List Per Node Str | ${dut1} | ${dut1_numa} +| | ... | cpu_cnt=${cpu_cnt} +| | ${dut2_cpus}= | Cpu List Per Node Str | ${dut2} | ${dut2_numa} +| | ... | cpu_cnt=${cpu_cnt} +| | Start the l3fwd test | ${nodes} | ${dut1} | ${dut1_if1} | ${dut1_if2} +| | ... | ${nb_cores} | ${dut1_cpus} | ${rxqueues} | ${jumbo_frames} +| | Start the l3fwd test | ${nodes} | ${dut2} | ${dut2_if1} | ${dut2_if2} +| | ... | ${nb_cores} | ${dut2_cpus} | ${rxqueues} | ${jumbo_frames} + +| Start L3FWD '${m}' worker threads using SMT and rxqueues '${n}' with jumbo frames '${b}' +| | [Documentation] | Start the l3fwd with M worker threads with SMT +| | ... | and rxqueues N and B(yes or no) jumbo frames in all DUTs. +| | ${cpu_cnt}= | Convert To Integer | ${m} +| | ${nb_cores_int}= | Evaluate | ${cpu_cnt}*2 +| | ${nb_cores}= | Convert to String | ${nb_cores_int} +| | ${rxqueues}= | Convert to String | ${n} +| | ${jumbo_frames}= | Convert to String | ${b} +| | ${dut1_numa}= | Get interfaces numa node | ${dut1} +| | ... | ${dut1_if1} | ${dut1_if2} +| | ${dut2_numa}= | Get interfaces numa node | ${dut2} +| | ... | ${dut2_if1} | ${dut2_if2} +| | ${dut1_cpus}= | Cpu List Per Node Str | ${dut1} | ${dut1_numa} +| | ... | cpu_cnt=${cpu_cnt} | smt_used=${True} +| | ${dut2_cpus}= | Cpu List Per Node Str | ${dut2} | ${dut2_numa} +| | ... | cpu_cnt=${cpu_cnt} | smt_used=${True} +| | Start the l3fwd test | ${nodes} | ${dut1} | ${dut1_if1} | ${dut1_if2} +| | ... | ${nb_cores} | ${dut1_cpus} | ${rxqueues} | ${jumbo_frames} +| | Start the l3fwd test | ${nodes} | ${dut2} | ${dut2_if1} | ${dut2_if2} +| | ... | ${nb_cores} | ${dut2_cpus} | ${rxqueues} | ${jumbo_frames}