Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
cong_test: support loss/latency combos
combinations of 0/100ms latency, 0/10% packet loss

Signed-off-by: Alan Maguire <[email protected]>
  • Loading branch information
alan-maguire committed Sep 5, 2023
commit 07cd5ab095ebc0a51cd4a7b4908501744fb764ae
9 changes: 5 additions & 4 deletions test/cong_legacy_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ TIMEOUT=30

for FAMILY in ipv4 ipv6 ; do

for DROP_PERCENT in 0 5 ; do

for DROP_PERCENT in 0 10; do
for LATENCY in "delay 100" ""; do
for CLIENT_OPTS in "" "-R" ; do
case $FAMILY in
ipv4)
Expand All @@ -56,10 +56,10 @@ for DROP_PERCENT in 0 5 ; do
echo "Running ${MODE}..."
test_run_cmd_local "ip netns exec $NETNS $IPERF3 -p $PORT -s &"
if [[ $MODE != "baseline" ]]; then
test_run_cmd_local "$BPFTUNE -dsL -a tcp_conn_tuner.so &" true
test_run_cmd_local "$BPFTUNE -dsL &" true
sleep $SETUPTIME
# warm up connection...
for i in {1..20}; do
for i in {1..40}; do
set +e
$IPERF3 -fm $CLIENT_OPTS -p $PORT -t 1 -c $ADDR > /dev/null 2>&1
set -e
Expand Down Expand Up @@ -121,6 +121,7 @@ for DROP_PERCENT in 0 5 ; do

test_cleanup
done
done
done
done

Expand Down
9 changes: 5 additions & 4 deletions test/cong_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ TIMEOUT=30

for FAMILY in ipv4 ipv6 ; do

for DROP_PERCENT in 0 5 ; do

for DROP_PERCENT in 0 10; do
for LATENCY in "delay 100" ""; do
for CLIENT_OPTS in "" "-R" ; do
case $FAMILY in
ipv4)
Expand All @@ -56,10 +56,10 @@ for DROP_PERCENT in 0 5 ; do
echo "Running ${MODE}..."
test_run_cmd_local "ip netns exec $NETNS $IPERF3 -p $PORT -s &"
if [[ $MODE != "baseline" ]]; then
test_run_cmd_local "$BPFTUNE -ds -a tcp_conn_tuner.so &" true
test_run_cmd_local "$BPFTUNE -ds &" true
sleep $SETUPTIME
# warm up connection...
for i in {1..20}; do
for i in {1..40}; do
set +e
$IPERF3 -fm $CLIENT_OPTS -p $PORT -t 1 -c $ADDR > /dev/null 2>&1
set -e
Expand Down Expand Up @@ -121,6 +121,7 @@ for DROP_PERCENT in 0 5 ; do

test_cleanup
done
done
done
done

Expand Down
6 changes: 3 additions & 3 deletions test/test_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ test_setup_local()
ip netns exec $NETNS ip link set $VETH1 up
ip netns exec $NETNS sysctl -qw net.ipv4.conf.lo.rp_filter=0
if [[ -n "$DROP" ]] || [[ -n "$LATENCY" ]]; then
D=$DROP
if [[ -n "$DROP" ]]; then
D="${DROP}%"
if [[ -z "$DROP" ]]; then
DROP=0
fi
D="${DROP}%"
tc qdisc add dev $VETH2 root netem loss ${D} ${LATENCY}
ethtool -K $VETH2 gso off
fi
Expand Down