+| |
+| | ... | \| IPv4 forwarding with Vhost-User initialized in a 3-node circular\
+| | ... | topology \| 1 \|
+| |
+| | [Arguments] | ${nf_nodes}=${1} | ${testpmd_mac}=${FALSE}
+| |
+| | Set interfaces in path up
+| | ${fib_table_1}= | Set Variable | ${101}
+| | ${fib_table_2}= | Evaluate | ${fib_table_1}+${nf_nodes}
+| | Add Fib Table | ${dut1} | ${fib_table_1}
+| | Add Fib Table | ${dut1} | ${fib_table_2}
+| | Add Fib Table | ${dut2} | ${fib_table_1}
+| | Add Fib Table | ${dut2} | ${fib_table_2}
+| | Assign Interface To Fib Table
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${fib_table_1}
+| | Assign Interface To Fib Table
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${fib_table_2}
+| | Assign Interface To Fib Table
+| | ... | ${dut2} | ${DUT2_${int}1}[0] | ${fib_table_1}
+| | Assign Interface To Fib Table
+| | ... | ${dut2} | ${DUT2_${int}2}[0] | ${fib_table_2}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 100.0.0.1 | 30
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 150.0.0.1 | 30
+| | VPP Interface Set IP Address
+| | ... | ${dut2} | ${DUT2_${int}1}[0] | 150.0.0.2 | 30
+| | VPP Interface Set IP Address
+| | ... | ${dut2} | ${DUT2_${int}2}[0] | 200.0.0.1 | 30
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 100.0.0.2 | ${TG_pf1_mac}[0]
+| | VPP Add IP Neighbor
+| | ... | ${dut2} | ${DUT2_${int}2}[0] | 200.0.0.2 | ${TG_pf2_mac}[0]
+| | Vpp Route Add | ${dut1} | 10.0.0.0 | 8 | gateway=100.0.0.2
+| | ... | interface=${DUT1_${int}1}[0] | vrf=${fib_table_1}
+| | Vpp Route Add | ${dut1} | 20.0.0.0 | 8 | gateway=150.0.0.2
+| | ... | interface=${DUT1_${int}2}[0] | vrf=${fib_table_2}
+| | Vpp Route Add | ${dut2} | 10.0.0.0 | 8 | gateway=150.0.0.1
+| | ... | interface=${DUT2_${int}1}[0] | vrf=${fib_table_1}
+| | Vpp Route Add | ${dut2} | 20.0.0.0 | 8 | gateway=200.0.0.2
+| | ... | interface=${DUT2_${int}2}[0] | vrf=${fib_table_2}
+| | FOR | ${number} | IN RANGE | 1 | ${nf_nodes}+1
+| | | ${fib_table_1}= | Evaluate | ${100}+${number}
+| | | ${fib_table_2}= | Evaluate | ${fib_table_1}+${1}
+| | | Configure vhost interfaces | ${dut1}
+| | | ... | /var/run/vpp/sock-${number}-1 | /var/run/vpp/sock-${number}-2
+| | | ... | dut1-vhost-${number}-if1 | dut1-vhost-${number}-if2
+| | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if1} | up
+| | | Set Interface State | ${dut1} | ${dut1-vhost-${number}-if2} | up
+| | | Configure vhost interfaces | ${dut2}
+| | | ... | /var/run/vpp/sock-${number}-1 | /var/run/vpp/sock-${number}-2
+| | | ... | dut2-vhost-${number}-if1 | dut2-vhost-${number}-if2
+| | | Set Interface State | ${dut2} | ${dut2-vhost-${number}-if1} | up
+| | | Set Interface State | ${dut2} | ${dut2-vhost-${number}-if2} | up
+| | | Add Fib Table | ${dut1} | ${fib_table_1}
+| | | Add Fib Table | ${dut1} | ${fib_table_2}
+| | | Add Fib Table | ${dut2} | ${fib_table_1}
+| | | Add Fib Table | ${dut2} | ${fib_table_2}
+| | | Assign Interface To Fib Table | ${dut1} | ${dut1-vhost-${number}-if1}
+| | | ... | ${fib_table_1}
+| | | Assign Interface To Fib Table | ${dut1} | ${dut1-vhost-${number}-if2}
+| | | ... | ${fib_table_2}
+| | | Assign Interface To Fib Table | ${dut2} | ${dut2-vhost-${number}-if1}
+| | | ... | ${fib_table_1}
+| | | Assign Interface To Fib Table | ${dut2} | ${dut2-vhost-${number}-if2}
+| | | ... | ${fib_table_2}
+| | | VPP Interface Set IP Address
+| | | ... | ${dut1} | ${dut1-vhost-${number}-if1} | 1.1.1.2 | 30
+| | | VPP Interface Set IP Address
+| | | ... | ${dut1} | ${dut1-vhost-${number}-if2} | 1.1.2.2 | 30
+| | | VPP Interface Set IP Address
+| | | ... | ${dut2} | ${dut2-vhost-${number}-if1} | 1.1.1.2 | 30
+| | | VPP Interface Set IP Address
+| | | ... | ${dut2} | ${dut2-vhost-${number}-if2} | 1.1.2.2 | 30
+| | | Run Keyword Unless | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut1} | 20.0.0.0 | 8 | gateway=1.1.1.1
+| | | ... | interface=${dut1-vhost-${number}-if1} | vrf=${fib_table_1}
+| | | Run Keyword Unless | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut1} | 10.0.0.0 | 8 | gateway=1.1.2.1
+| | | ... | interface=${dut1-vhost-${number}-if2} | vrf=${fib_table_2}
+| | | Run Keyword Unless | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut2} | 20.0.0.0 | 8 | gateway=1.1.1.1
+| | | ... | interface=${dut2-vhost-${number}-if1} | vrf=${fib_table_1}
+| | | Run Keyword Unless | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut2} | 10.0.0.0 | 8 | gateway=1.1.2.1
+| | | ... | interface=${dut2-vhost-${number}-if2} | vrf=${fib_table_2}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | VPP Add IP Neighbor | ${dut1} | ${dut1-vhost-${number}-if1}
+| | | ... | 1.1.2.2 | ${dut1-vhost-${number}-if2_mac}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | VPP Add IP Neighbor | ${dut1} | ${dut1-vhost-${number}-if2}
+| | | ... | 1.1.1.2 | ${dut1-vhost-${number}-if1_mac}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | VPP Add IP Neighbor | ${dut2} | ${dut2-vhost-${number}-if1}
+| | | ... | 1.1.2.2 | ${dut2-vhost-${number}-if2_mac}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | VPP Add IP Neighbor | ${dut2} | ${dut2-vhost-${number}-if2}
+| | | ... | 1.1.1.2 | ${dut2-vhost-${number}-if1_mac}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut1} | 20.0.0.0 | 8 | gateway=1.1.2.2
+| | | ... | interface=${dut1-vhost-${number}-if1} | vrf=${fib_table_1}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut1} | 10.0.0.0 | 8 | gateway=1.1.1.2
+| | | ... | interface=${dut1-vhost-${number}-if2} | vrf=${fib_table_2}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut2} | 20.0.0.0 | 8 | gateway=1.1.2.2
+| | | ... | interface=${dut2-vhost-${number}-if1} | vrf=${fib_table_1}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut2} | 10.0.0.0 | 8 | gateway=1.1.1.2
+| | | ... | interface=${dut2-vhost-${number}-if2} | vrf=${fib_table_2}
+| | END