+| | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
+| | | ... | auto_scale=${auto_scale}
+
+| Initialize L2 Bridge Domain for multiple chains with memif pairs
+| | [Documentation]
+| | ... | Create pairs of Memif interfaces for defined number of NF chains
+| | ... | with defined number of NF nodes on all defined VPP nodes. Add each
+| | ... | Memif interface into L2 bridge domains with learning enabled
+| | ... | with physical inteface or Memif interface of another NF.
+| | ...
+| | ... | *Arguments:*
+| | ... | - nf_chains - Number of chains of NFs. Type: integer
+| | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
+| | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
+| | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Initialize L2 Bridge Domain for multiple chains with memif pairs \
+| | ... | \| 1 \| 1 \|
+| | ...
+| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
+| | ...
+| | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1
+| | | Initialize L2 Bridge Domain with memif pairs | nf_chain=${nf_chain}
+| | | ... | nf_nodes=${nf_nodes} | auto_scale=${auto_scale}
+| | Set interfaces in path up
+| | Show Memif on all DUTs | ${nodes}
+| | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
+
+| Initialize L2 Bridge Domain for pipeline with memif pairs
+| | [Documentation]
+| | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
+| | ... | Memif interface to separate L2 bridge domain with one physical or
+| | ... | virtual interface to create a service pipeline on DUT node.
+| | ...
+| | ... | *Arguments:*
+| | ... | - nf_chain - NF pipe. Type: integer
+| | ... | - nf_nodes - Number of NFs nodes per pipeline. Type: integer
+| | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
+| | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Initialize L2 Bridge Domain for pipeline with memif pairs \
+| | ... | \| 1 \| 1 \|
+| | ...
+| | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
+| | ...
+| | ${rxq}= | Run Keyword If | ${auto_scale} == ${True}
+| | ... | Set Variable | ${rxq_count_int}
+| | ... | ELSE | Set Variable | ${1}
+| | ${duts}= | Get Matches | ${nodes} | DUT*
+| | :FOR | ${dut} | IN | @{duts}
+| | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1} | ${1}
+| | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if2} | ${2}
+| | | ${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}
+| | | ${sid_last}= | Evaluate | ${nf_id_last} * ${2}
+| | | Set up single memif interface on DUT node | ${nodes['${dut}']}
+| | | ... | memif-${dut}_CNF | mid=${nf_id_frst} | sid=${sid_frst}
+| | | ... | memif_if=${dut}-memif-${nf_id_frst}-if1
+| | | ... | rxq=${rxq} | txq=${rxq}
+| | | Set up single memif interface on DUT node | ${nodes['${dut}']}
+| | | ... | 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}
+
+| Initialize L2 Bridge Domain for multiple pipelines with memif pairs
+| | [Documentation]
+| | ... | Create pairs of Memif interfaces for defined number of NF pipelines
+| | ... | with defined number of NF nodes on all defined VPP nodes. Add each
+| | ... | Memif interface into L2 bridge domains with learning enabled
+| | ... | with physical inteface or Memif interface of another NF.
+| | ...
+| | ... | *Arguments:*
+| | ... | - nf_chains - Number of pipelines of NFs. Type: integer
+| | ... | - nf_nodes - Number of NFs nodes per pipeline. Type: integer
+| | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
+| | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Initialize L2 Bridge Domain for multiple pipelines with memif \
+| | ... | pairs \| 1 \| 1 \|
+| | ...
+| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
+| | ...
+| | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1
+| | | Initialize L2 Bridge Domain for pipeline with memif pairs
+| | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
+| | | ... | auto_scale=${auto_scale}
+| | Set interfaces in path up
+| | Show Memif on all DUTs | ${nodes}
+| | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
+
+| Initialize L2 Bridge Domain with memif pairs and VLAN in circular topology
+| | [Documentation]
+| | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
+| | ... | Memif interface to separate L2 bridge domain with one physical or
+| | ... | virtual interface to create a chain accross DUT node. In case of
+| | ... | 3-node topology create VLAN sub-interfaces between DUTs. In case of
+| | ... | 2-node topology create VLAN sub-interface on dut1-if2 interface. All
+| | ... | interfaces are brought up.
+| | ...
+| | ... | *Arguments:*
+| | ... | - bd_id1 - Bridge domain ID. Type: integer
+| | ... | - bd_id2 - Bridge domain ID. Type: integer
+| | ... | - subid - ID of the sub-interface to be created. Type: string
+| | ... | - tag_rewrite - Method of tag rewrite. Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Initialize L2 Bridge Domain with memif pairs and VLAN in circular\
+| | ... | topology \| 1 \| 2 \| 10 \| pop-1 \|
+| | ...
+| | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
+| | ...
+| | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
+| | ... | Variable Should Exist | ${dut2}
+| | ...