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
3 changes: 0 additions & 3 deletions test/support_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ test_start "$0|support test: does 'bpftune -S' show support level?"

ARCH=$(uname -m)

MAJ_KVER=$(uname -r | awk -F '.' '{print $1}')
MIN_KVER=$(uname -r | awk -F '.' '{print $2}')

expected="bpftune is not supported"
expected_netns="does not support per-netns policy"

Expand Down
3 changes: 3 additions & 0 deletions test/test_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ export PYTHONCMD="python3 -B"

export EXITCODE=1

export MAJ_KVER=$(uname -r | awk -F '.' '{print $1}')
export MIN_KVER=$(uname -r | awk -F '.' '{print $2}')

bold()
{
echo "${B}$1${N}"
Expand Down
14 changes: 9 additions & 5 deletions test/udp_mem_exhaust_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ SLEEPTIME=5
TIMEOUT=30
MAX_CONN=10

for FAMILY in ipv4 ipv6 ; do
# udp_fail_queue_rcv_skb tracepoint IPv6 support only on 6.4+ kernels.
FAMILIES="ipv4"
if [[ $MAJ_KVER -ge 6 ]]; then
if [[ $MIN_KVER -ge 4 ]]; then
FAMILIES="$FAMILIES ipv6"
fi
fi

for FAMILY in $FAMILIES ; do

case $FAMILY in
ipv4)
Expand All @@ -44,8 +52,6 @@ for FAMILY in ipv4 ipv6 ; do

rmem_default_orig=$(sysctl -n net.core.rmem_default)
sysctl -w net.core.rmem_default=8192
#rmem_max_orig=$(sysctl -n net.core.rmem_max)
#sysctl -w net.core.rmem_max=8192
mem_orig=($(sysctl -n net.ipv4.udp_mem))

mem_test=($(echo 10 20 20))
Expand Down Expand Up @@ -73,9 +79,7 @@ for FAMILY in ipv4 ipv6 ; do
done

mem_post=($(sysctl -n net.ipv4.udp_mem))
rmem_max_post=$(sysctl -n net.core.rmem_max)
sysctl -w net.ipv4.udp_mem="${mem_orig[0]} ${mem_orig[1]} ${mem_orig[2]}"
#sysctl -w net.core.rmem_max=${rmem_max_orig}
sysctl -w net.core.rmem_default=${rmem_default_orig}
echo "mem before ${mem_test[0]} ${mem_test[1]} ${mem_test[2]}"
echo "mem after ${mem_post[0]} ${mem_post[1]} ${mem_post[2]}"
Expand Down
10 changes: 9 additions & 1 deletion test/udp_rmem_legacy_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ SLEEPTIME=5
TIMEOUT=30
MAX_CONN=1

for FAMILY in ipv4 ipv6 ; do
# udp_fail_queue_rcv_skb tracepoint IPv6 support only on 6.4+ kernels.
FAMILIES="ipv4"
if [[ $MAJ_KVER -ge 6 ]]; then
if [[ $MIN_KVER -ge 4 ]]; then
FAMILIES="$FAMILIES ipv6"
fi
fi

for FAMILY in $FAMILIES ; do
for BW in 500m 1000m 5000m 10000m ; do
case $FAMILY in
ipv4)
Expand Down
10 changes: 9 additions & 1 deletion test/udp_rmem_locked_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ SLEEPTIME=5
TIMEOUT=30
MAX_CONN=1

for FAMILY in ipv4 ipv6 ; do
# udp_fail_queue_rcv_skb tracepoint IPv6 support only on 6.4+ kernels.
FAMILIES="ipv4"
if [[ $MAJ_KVER -ge 6 ]]; then
if [[ $MIN_KVER -ge 4 ]]; then
FAMILIES="$FAMILIES ipv6"
fi
fi

for FAMILY in $FAMILIES ; do
for BW in 500m ; do
case $FAMILY in
ipv4)
Expand Down
10 changes: 9 additions & 1 deletion test/udp_rmem_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ SLEEPTIME=5
TIMEOUT=30
MAX_CONN=1

for FAMILY in ipv4 ipv6 ; do
# udp_fail_queue_rcv_skb tracepoint IPv6 support only on 6.4+ kernels.
FAMILIES="ipv4"
if [[ $MAJ_KVER -ge 6 ]]; then
if [[ $MIN_KVER -ge 4 ]]; then
FAMILIES="$FAMILIES ipv6"
fi
fi

for FAMILY in $FAMILIES ; do
for BW in 500m 1000m 5000m 10000m ; do
case $FAMILY in
ipv4)
Expand Down