@@ -325,7 +325,13 @@ do_transfer()
cpid=$!
if [ $addr_nr_ns1 -gt 0 ]; then
- let add_nr_ns1=addr_nr_ns1
+ if [ $addr_nr_ns1 -gt 10 ]; then
+ let add_nr_ns1=addr_nr_ns1-10
+ flags=signal,fullmesh
+ else
+ let add_nr_ns1=addr_nr_ns1
+ flags=signal
+ fi
counter=2
sleep 1
while [ $add_nr_ns1 -gt 0 ]; do
@@ -335,7 +341,7 @@ do_transfer()
else
addr="10.0.$counter.1"
fi
- ip netns exec $ns1 ./pm_nl_ctl add $addr flags signal
+ ip netns exec $ns1 ./pm_nl_ctl add $addr flags $flags
let counter+=1
let add_nr_ns1-=1
done
@@ -367,7 +373,13 @@ do_transfer()
fi
if [ $addr_nr_ns2 -gt 0 ]; then
- let add_nr_ns2=addr_nr_ns2
+ if [ $addr_nr_ns2 -gt 10 ]; then
+ let add_nr_ns2=addr_nr_ns2-10
+ flags=subflow,fullmesh
+ else
+ let add_nr_ns2=addr_nr_ns2
+ flags=subflow
+ fi
counter=3
sleep 1
while [ $add_nr_ns2 -gt 0 ]; do
@@ -377,7 +389,7 @@ do_transfer()
else
addr="10.0.$counter.2"
fi
- ip netns exec $ns2 ./pm_nl_ctl add $addr flags subflow
+ ip netns exec $ns2 ./pm_nl_ctl add $addr flags $flags
let counter+=1
let add_nr_ns2-=1
done
@@ -1697,6 +1709,28 @@ deny_join_id0_tests()
chk_join_nr "subflow and address allow join id0 2" 1 1 1
}
+fullmesh_tests()
+{
+ # fullmesh 1
+ reset
+ ip netns exec $ns1 ./pm_nl_ctl limits 8 8
+ ip netns exec $ns2 ./pm_nl_ctl limits 8 8
+ ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
+ ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow,fullmesh
+ run_tests $ns1 $ns2 10.0.1.1 0 0 0 slow
+ chk_join_nr "signal address fullmesh 1" 2 2 2
+ chk_add_nr 1 1
+
+ # fullmesh 2
+ reset
+ ip netns exec $ns1 ./pm_nl_ctl limits 8 8
+ ip netns exec $ns2 ./pm_nl_ctl limits 8 8
+ ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
+ run_tests $ns1 $ns2 10.0.1.1 0 0 11 slow
+ chk_join_nr "signal address fullmesh 2" 3 3 3
+ chk_add_nr 1 1
+}
+
all_tests()
{
subflows_tests
@@ -1712,6 +1746,7 @@ all_tests()
syncookies_tests
checksum_tests
deny_join_id0_tests
+ fullmesh_tests
}
usage()
@@ -1730,6 +1765,7 @@ usage()
echo " -k syncookies_tests"
echo " -S checksum_tests"
echo " -d deny_join_id0_tests"
+ echo " -m fullmesh_tests"
echo " -c capture pcap files"
echo " -C enable data checksum"
echo " -h help"
@@ -1765,7 +1801,7 @@ if [ $do_all_tests -eq 1 ]; then
exit $ret
fi
-while getopts 'fsltra64bpkdchCS' opt; do
+while getopts 'fsltra64bpkdmchCS' opt; do
case $opt in
f)
subflows_tests
@@ -1806,6 +1842,9 @@ while getopts 'fsltra64bpkdchCS' opt; do
d)
deny_join_id0_tests
;;
+ m)
+ fullmesh_tests
+ ;;
c)
;;
C)