X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fl2%2Fl2_bridge_domain.robot;h=6c16ed447f623c553df5a57792a96ec354670919;hb=refs%2Fchanges%2F89%2F21489%2F2;hp=6a3a466cdbe49ce4859f7b65e64338ffa8c91fa3;hpb=67d683ebfc222d63d79b883fe7cf94027dbde00c;p=csit.git diff --git a/resources/libraries/robot/l2/l2_bridge_domain.robot b/resources/libraries/robot/l2/l2_bridge_domain.robot index 6a3a466cdb..6c16ed447f 100644 --- a/resources/libraries/robot/l2/l2_bridge_domain.robot +++ b/resources/libraries/robot/l2/l2_bridge_domain.robot @@ -67,32 +67,6 @@ | | Set Interface State | ${dut_node} | ${dut_if} | up | | Add Interface To L2 BD | ${dut_node} | ${dut_if} | ${bd_id} | ${shg} -| Add destination port to L2FIB -| | [Documentation] -| | ... | Create a static L2FIB entry for required destination port -| | ... | on defined interface and bridge domain ID of the given VPP node. -| | ... -| | ... | *Arguments:* -| | ... | - ${dest_node} - Destination node. Type: dictionary -| | ... | - ${dest_node_if} - Destination node interface name. Type: string -| | ... | - ${vpp_node} - DUT node to add L2FIB entry on. Type: dictionary -| | ... | - ${vpp_node_if} - DUT node interface name. Type: string -| | ... | - ${bd_id} - Bridge domain ID. Type: integer -| | ... -| | ... | *Return:* -| | ... | - No value returned -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Add destination port to L2FIB \| ${nodes['TG']} \ -| | ... | \| eth1 \| ${nodes['DUT2']} \| GigabitEthernet0/8/0 \| 3 \| -| | ... -| | [Arguments] | ${node} | ${dest_node_if} | ${vpp_node} -| | ... | ${vpp_node_if} | ${bd_id} -| | ... -| | ${mac}= | Get Interface Mac | ${node} | ${dest_node_if} -| | Vpp Add L2fib Entry | ${vpp_node} | ${mac} | ${vpp_node_if} | ${bd_id} - | Initialize L2 bridge domain on node | | [Documentation] | | ... | Setup L2 bridge domain topology by adding two interfaces on DUT into @@ -212,16 +186,18 @@ | | ... | *Arguments:* | | ... | - nf_chains - Number of chains of NFs. Type: integer | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer +| | ... | - start - Id of first chain, allows to add chains during test. +| | ... | Type: integer | | ... | | ... | *Example:* | | ... | | ... | \| Initialize L2 bridge domains for multiple chains with Vhost-User \ -| | ... | \| 1 \| 1 \| +| | ... | \| 3 \| 1 \| 2 \| | | ... -| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} +| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${start}=${1} | | ... | | Set interfaces in path up -| | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains} + 1 +| | :FOR | ${nf_chain} | IN RANGE | ${start} | ${nf_chains} + 1 | | | Initialize L2 bridge domains with Vhost-User | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes} @@ -617,22 +593,28 @@ | | ${rxq}= | Run Keyword If | ${auto_scale} == ${True} | | ... | Set Variable | ${rxq_count_int} | | ... | ELSE | Set Variable | ${1} -| | ${bd_id2}= | Evaluate | ${nf_nodes}+1 -| | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1} | ${1} -| | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if2} +| | ${bd_id1}= | Evaluate | ${nf_nodes} * (${nf_chain} - 1) + ${nf_chain} +| | ${bd_id2}= | Evaluate | ${nf_nodes} * ${nf_chain} + ${nf_chain} +| | ${dut_str}= | Convert To Lowercase | ${dut} +| | Add interface to bridge domain +| | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_1} +| | ... | ${bd_id1} +| | Add interface to bridge domain +| | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_2} | | ... | ${bd_id2} | | :FOR | ${nf_node} | IN RANGE | 1 | ${nf_nodes}+1 | | | ${nf_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node} | | | ${sock1}= | Set Variable | memif-${dut}_CNF | | | ${sock2}= | Set Variable | memif-${dut}_CNF +| | | ${bd_id1}= | Evaluate | ${nf_id} + (${nf_chain} - 1) +| | | ${bd_id2}= | Evaluate | ${bd_id1} + 1 | | | Set up memif interfaces on DUT node | ${nodes['${dut}']} | | | ... | ${sock1} | ${sock2} | ${nf_id} | ${dut}-memif-${nf_id}-if1 | | | ... | ${dut}-memif-${nf_id}-if2 | ${rxq} | ${rxq} -| | | ${bd_id2}= | Evaluate | ${nf_node}+1 -| | | Add interface to bridge domain | ${nodes['${dut}']} -| | | ... | ${${dut}-memif-${nf_id}-if1} | ${nf_node} -| | | Add interface to bridge domain | ${nodes['${dut}']} -| | | ... | ${${dut}-memif-${nf_id}-if2} | ${bd_id2} +| | | Add interface to bridge domain +| | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id}-if1} | ${bd_id1} +| | | Add interface to bridge domain +| | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id}-if2} | ${bd_id2} | Initialize L2 Bridge Domain with memif pairs | | [Documentation] @@ -706,9 +688,16 @@ | | ${rxq}= | Run Keyword If | ${auto_scale} == ${True} | | ... | Set Variable | ${rxq_count_int} | | ... | ELSE | Set Variable | ${1} +| | ${bd_id1}= | Evaluate | ${nf_nodes} * (${nf_chain} - 1) + ${nf_chain} +| | ${bd_id2}= | Evaluate | ${nf_nodes} * ${nf_chain} + ${nf_chain} | | :FOR | ${dut} | IN | @{duts} -| | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1} | ${1} -| | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if2} | ${2} +| | | ${dut_str}= | Convert To Lowercase | ${dut} +| | | Add interface to bridge domain +| | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_1} +| | | ... | ${bd_id1} +| | | Add interface to bridge domain +| | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_2} +| | | ... | ${bd_id2} | | | ${nf_id_frst}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${1} | | | ${nf_id_last}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${nf_nodes} | | | ${sid_frst}= | Evaluate | ${nf_id_frst} * ${2} - ${1} @@ -721,10 +710,10 @@ | | | ... | memif-${dut}_CNF | mid=${nf_id_last} | sid=${sid_last} | | | ... | memif_if=${dut}-memif-${nf_id_last}-if2 | | | ... | rxq=${rxq} | txq=${rxq} -| | | Add interface to bridge domain | ${nodes['${dut}']} -| | | ... | ${${dut}-memif-${nf_id_frst}-if1} | ${1} -| | | Add interface to bridge domain | ${nodes['${dut}']} -| | | ... | ${${dut}-memif-${nf_id_last}-if2} | ${2} +| | | Add interface to bridge domain +| | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id_frst}-if1} | ${bd_id1} +| | | Add interface to bridge domain +| | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id_last}-if2} | ${bd_id2} | Initialize L2 Bridge Domain for multiple pipelines with memif pairs | | [Documentation]