Skip to contentSkip to conversation

selftests: xsk: Disable IPv6 on VETH1

PATCH In review Kal Conley 2 participants 2 messages Apr 3, 2023 – Apr 4, 2023

Subsystems (6)
lore
Share & tools
lore

Kal Conley

author
#0 lore raw

PATCH 1/1 selftests: xsk: Disable IPv6 on VETH1

This change fixes flakiness in the BIDIRECTIONAL test:

# [is_pkt_valid] expected length [60], got length [90] not ok 1 FAIL: SKB BUSY-POLL BIDIRECTIONAL

When IPv6 is enabled, the interface will periodically send MLDv1 and MLDv2 packets. These packets can cause the BIDIRECTIONAL test to fail since it uses VETH0 for RX.

For other tests, this was not a problem since they only receive on VETH1 and IPv6 was already disabled on VETH0.

Fixes a89052572ebb ("selftests/bpf: Xsk selftests framework")
---
 tools/testing/selftests/bpf/test_xsk.sh | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/bpf/test_xsk.sh +1 -0
index b077cf58f825..377fb157a57c 100755
@@ -116,6 +116,7 @@ setup_vethPairs() {
 	ip link add ${VETH0} numtxqueues 4 numrxqueues 4 type veth peer name ${VETH1} numtxqueues 4 numrxqueues 4
 	if [ -f /proc/net/if_inet6 ]; then
 		echo 1 > /proc/sys/net/ipv6/conf/${VETH0}/disable_ipv6
+		echo 1 > /proc/sys/net/ipv6/conf/${VETH1}/disable_ipv6
 	fi
 	if [[ $verbose -eq 1 ]]; then
 	        echo "setting up ${VETH1}"
Signature · 1 line
2.39.2
#1 lore raw
Quoted 10 lines · Kal Conley

This change fixes flakiness in the BIDIRECTIONAL test:

# [is_pkt_valid] expected length [60], got length [90] not ok 1 FAIL: SKB BUSY-POLL BIDIRECTIONAL

When IPv6 is enabled, the interface will periodically send MLDv1 and MLDv2 packets. These packets can cause the BIDIRECTIONAL test to fail since it uses VETH0 for RX.

Quoted 6 lines

For other tests, this was not a problem since they only receive on VETH1 and IPv6 was already disabled on VETH0.

Fixes a89052572ebb ("selftests/bpf: Xsk selftests framework")

---

Can you please resubmit with [PATCH bpf-next] tag, so BPF CI can test it against the bpf-next tree. Thanks.

Quoted 18 lines
 tools/testing/selftests/bpf/test_xsk.sh | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/bpf/test_xsk.sh +1 -1
index b077cf58f825..377fb157a57c 100755
@@ -116,6 +116,7 @@ setup_vethPairs() {
        ip link add ${VETH0} numtxqueues 4 numrxqueues 4 type veth peer name ${VETH1} numtxqueues 4 numrxqueues 4
        if [ -f /proc/net/if_inet6 ]; then
                echo 1 > /proc/sys/net/ipv6/conf/${VETH0}/disable_ipv6
+               echo 1 > /proc/sys/net/ipv6/conf/${VETH1}/disable_ipv6
        fi
        if [[ $verbose -eq 1 ]]; then
                echo "setting up ${VETH1}"
--

2.39.2