| | Set Test Variable | ${dut1_node}
| | Set Test Variable | ${dut2_node}
+| Path for 3-node BD-SHG testing is set
+| | [Documentation] | Compute path for bridge domain split-horizon group testing
+| | ... | on three given nodes with following interconnections
+| | ... | TG - (2 links) - DUT1 - (1 link) - DUT2 - (2 links) - TG
+| | ... | and set corresponding test case variables.
+| | ...
+| | ... | *Arguments:*
+| | ... | - ${tg_node} - TG node. Type: dictionary
+| | ... | - ${dut1_node} - DUT1 node. Type: dictionary
+| | ... | - ${dut2_node} - DUT2 node. Type: dictionary
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned
+| | ... |
+| | ... | _NOTE:_ This KW sets following test case variables:
+| | ... | - ${tg_node} - TG node.
+| | ... | - ${tg_to_dut1_if1} - TG interface 1 towards DUT1.
+| | ... | - ${tg_to_dut1_if2} - TG interface 2 towards DUT1.
+| | ... | - ${tg_to_dut2_if1} - TG interface 1 towards DUT2.
+| | ... | - ${tg_to_dut2_if2} - TG interface 2 towards DUT2.
+| | ... | - ${dut1_node} - DUT1 node.
+| | ... | - ${dut1_to_tg_if1} - DUT1 interface 1 towards TG.
+| | ... | - ${dut1_to_tg_if2} - DUT1 interface 2 towards TG.
+| | ... | - ${dut1_to_dut2} - DUT1 interface towards DUT2.
+| | ... | - ${dut2_node} - DUT2 node.
+| | ... | - ${dut2_to_tg_if1} - DUT2 interface 1 towards TG.
+| | ... | - ${dut2_to_tg_if2} - DUT2 interface 2 towards TG.
+| | ... | - ${dut2_to_dut1} - DUT2 interface towards DUT1.
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Given Path for 3-node BD-SHG testing is set \| ${nodes['TG']} \
+| | ... | \| ${nodes['DUT1']} \| ${nodes['DUT2']} \|
+| | [Arguments] | ${tg_node} | ${dut1_node} | ${dut2_node}
+| | # Compute path TG - DUT1 with two links in between
+| | Append Nodes | ${tg_node} | ${dut1_node} | ${tg_node}
+| | Compute Path | always_same_link=${FALSE}
+| | ${tg_to_dut1_if1} | ${tmp}= | First Interface
+| | ${tg_to_dut1_if2} | ${tmp}= | Last Interface
+| | ${dut1_to_tg_if1} | ${tmp}= | First Ingress Interface
+| | ${dut1_to_tg_if2} | ${tmp}= | Last Egress Interface
+| | # Compute path TG - DUT2 with two links in between
+| | Clear Path
+| | Append Nodes | ${tg_node} | ${dut2_node} | ${tg_node}
+| | Compute Path | always_same_link=${FALSE}
+| | ${tg_to_dut2_if1} | ${tmp}= | First Interface
+| | ${tg_to_dut2_if2} | ${tmp}= | Last Interface
+| | ${dut2_to_tg_if1} | ${tmp}= | First Ingress Interface
+| | ${dut2_to_tg_if2} | ${tmp}= | Last Egress Interface
+| | # Compute path DUT1 - DUT2 with one link in between
+| | Clear Path
+| | Append Nodes | ${dut1_node} | ${dut2_node}
+| | Compute Path
+| | ${dut1_to_dut2} | ${tmp}= | Next Interface
+| | ${dut2_to_dut1} | ${tmp}= | Next Interface
+| | # Set test variables
+| | Set Test Variable | ${tg_to_dut1_if1}
+| | Set Test Variable | ${tg_to_dut1_if2}
+| | Set Test Variable | ${tg_to_dut2_if1}
+| | Set Test Variable | ${tg_to_dut2_if2}
+| | Set Test Variable | ${dut1_to_tg_if1}
+| | Set Test Variable | ${dut1_to_tg_if2}
+| | Set Test Variable | ${dut2_to_tg_if1}
+| | Set Test Variable | ${dut2_to_tg_if2}
+| | Set Test Variable | ${dut1_to_dut2}
+| | Set Test Variable | ${dut2_to_dut1}
+| | Set Test Variable | ${tg_node}
+| | Set Test Variable | ${dut1_node}
+| | Set Test Variable | ${dut2_node}
+
| Bridge domain on DUT node is created
| | [Documentation] | Create bridge domain on given VPP node with defined
| | ... | learning status.
| | ... | - ${dut_node} - DUT node. Type: dictionary
| | ... | - ${dut_if} - DUT node interface name. Type: string
| | ... | - ${bd_id} - Bridge domain ID. Type: integer
+| | ... | - ${shg} - Split-horizon group ID. Type: integer, default value: 0
| | ...
| | ... | *Return:*
| | ... | - No value returned
| | ...
| | ... | \| Interface is added to bridge domain \| ${nodes['DUT2']} \
| | ... | \| GigabitEthernet0/8/0 \| 3 \|
-| | [Arguments] | ${dut_node} | ${dut_if} | ${bd_id}
+| | [Arguments] | ${dut_node} | ${dut_if} | ${bd_id} | ${shg}=0
| | Set Interface State | ${dut_node} | ${dut_if} | up
-| | Add Interface To L2 BD | ${dut_node} | ${dut_if} | ${bd_id}
+| | Add Interface To L2 BD | ${dut_node} | ${dut_if} | ${bd_id} | ${shg}
| Destination port is added to L2FIB on DUT node
| | [Documentation] | Create a static L2FIB entry for required destination port
| Test Teardown | Show Packet Trace on All DUTs | ${nodes}
| Documentation | *Bridge domain test suite.*
| ...
-| ... | Test suite uses 2-node topology TGTG - DUT1 - TG with two links
+| ... | Test suite uses 2-node topology TG - DUT1 - TG with two links
| ... | between nodes as well as 3-node topology TG - DUT1 - DUT2 - TG
| ... | with one link between nodes. Test packets are sent in both directions
| ... | and contain Ethernet header, IPv4 header and ICMP message. Ethernet
*** Variables ***
| ${bd_id1}= | 1
| ${bd_id2}= | 2
+| ${shg1}= | 3
+| ${shg2}= | 4
| ${sock1}= | /tmp/sock1
| ${sock2}= | /tmp/sock2
| | Then Send and receive ICMPv4 bidirectionally | ${tg_node} | ${tg_to_dut1}
| | ... | ${tg_to_dut2}
+| Vpp forwards packets via L2 bridge domain with split-horizon groups set in circular topology
+| | [Documentation] | Create bridge domains (learning enabled) on two VPP nodes,
+| | ... | add interfaces to each bridge domain where both interfaces
+| | ... | toward TG are in the same split-horizon group and check
+| | ... | traffic bidirectionally.
+| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
+| | Given Path for 3-node BD-SHG testing is set | ${nodes['TG']}
+| | ... | ${nodes['DUT1']}
+| | ... | ${nodes['DUT2']}
+| | When Bridge domain on DUT node is created | ${dut1_node} | ${bd_id1}
+| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if1}
+| | ... | ${bd_id1} | ${shg1}
+| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_tg_if2}
+| | ... | ${bd_id1} | ${shg1}
+| | And Interface is added to bridge domain | ${dut1_node} | ${dut1_to_dut2}
+| | ... | ${bd_id1}
+| | And Bridge domain on DUT node is created | ${dut2_node} | ${bd_id2}
+| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if1}
+| | ... | ${bd_id2} | ${shg2}
+| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_tg_if2}
+| | ... | ${bd_id2} | ${shg2}
+| | And Interface is added to bridge domain | ${dut2_node} | ${dut2_to_dut1}
+| | ... | ${bd_id2}
+| | And Interfaces on all VPP nodes in the path are up | ${dut1_node}
+| | ... | ${dut2_node}
+| | Then Send and receive ICMPv4 bidirectionally | ${tg_node}
+| | ... | ${tg_to_dut1_if1}
+| | ... | ${tg_to_dut2_if1}
+| | And Send and receive ICMPv4 bidirectionally | ${tg_node}
+| | ... | ${tg_to_dut1_if1}
+| | ... | ${tg_to_dut2_if2}
+| | And Send and receive ICMPv4 bidirectionally | ${tg_node}
+| | ... | ${tg_to_dut1_if2}
+| | ... | ${tg_to_dut2_if1}
+| | And Send and receive ICMPv4 bidirectionally | ${tg_node}
+| | ... | ${tg_to_dut1_if2}
+| | ... | ${tg_to_dut2_if2}
+| | And Run Keyword And Expect Error | ICMP echo Rx timeout
+| | ... | Send and receive ICMPv4 bidirectionally
+| | | ... | ${tg_node} | ${tg_to_dut1_if1}
+| | | ... | ${tg_to_dut1_if2}
+| | And Run Keyword And Expect Error | ICMP echo Rx timeout
+| | ... | Send and receive ICMPv4 bidirectionally
+| | | ... | ${tg_node} | ${tg_to_dut2_if1}
+| | | ... | ${tg_to_dut2_if2}
+
| VPP forwards packets through VM via two L2 bridge domains
| | [Documentation] | Setup and run VM connected to VPP via Vhost-User
| | ... | interfaces and check packet forwarding through VM via two