From patchwork Tue Feb 18 16:19:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pablo Martin Medrano X-Patchwork-Id: 13980214 X-Patchwork-Delegate: kuba@kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79295272916 for ; Tue, 18 Feb 2025 16:19:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739895581; cv=none; b=KCOZt5WwLeiWAgnNzZakwENa4fPDPPgrmshioe/+peWXeBMxwTOmciEK/wqHULj0b+uY64Glv9MQpCUyvSnQwSysbJJNd37SS2XGyzY0AH/fOTrsHNoEZyCbdU+JP4lB4iNwBhtWvqQQQsTEVGtlBWhStmdpk+29kZdet1AVyac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739895581; c=relaxed/simple; bh=apT+0irN3TsIgxIQMcJljfIxUkxMr58gKChrZiqB86g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uwQwyOA7zd3rzYWgUZNEMNbk8KWgyW8t7SlxD9C1SwQZq4pWtigJkLeLfk2pVrMLMtpZTkCTpsXDZjz8XlpC56fF98/jtCFaAJtriVcgjS0RpJgm1zAfulyiVMaxeBhr0YYeuTvUCllaUuSlPpZnVShNFrZvdZRwQcUhlbIMGh8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Qrb22sWS; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Qrb22sWS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739895578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=iYudxug1slNvWYSf0LzmoZmtIzYss75vPDgfeFjT9aA=; b=Qrb22sWS8ce13YZ2Ik527dhDEWn03Ij9LeSZ6zxx1DMT9HzBo+u6WFnrYb8fyuyrvJfLaz 8f86XrMQUv7epXXEgpOaHCgx4KXe7gdxxK9bY6tMsnZaZqpsLFc+1Pt22DyxXtwp0CeL/f tWqdZeuphWFY0Fbgo+cgv54EMnW9Sao= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-662-IwsqAGP-PfuWmNaH5Xnbeg-1; Tue, 18 Feb 2025 11:19:36 -0500 X-MC-Unique: IwsqAGP-PfuWmNaH5Xnbeg-1 X-Mimecast-MFC-AGG-ID: IwsqAGP-PfuWmNaH5Xnbeg_1739895575 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7E13518E6952; Tue, 18 Feb 2025 16:19:35 +0000 (UTC) Received: from pablmart-thinkpadt14gen4.rmtes.csb (unknown [10.44.32.29]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 12AE1300018D; Tue, 18 Feb 2025 16:19:31 +0000 (UTC) From: Pablo Martin Medrano To: netdev@vger.kernel.org Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan , Pablo Martin Medrano Subject: [PATCH net] selftests/net: big_tcp: longer netperf session on slow machines Date: Tue, 18 Feb 2025 17:19:28 +0100 Message-ID: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Patchwork-Delegate: kuba@kernel.org After debugging the following output for big_tcp.sh on a board: CLI GSO | GW GRO | GW GSO | SER GRO on on on on : [PASS] on off on off : [PASS] off on on on : [FAIL_on_link1] on on off on : [FAIL_on_link1] Davide Caratti found that by default the test duration 1s is too short in slow systems to reach the correct cwd size necessary for tcp/ip to generate at least one packet bigger than 65536 (matching the iptables match on length rule the test evaluates) This skips (with xfail) the aforementioned failing combinations when KSFT_MACHINE_SLOW is set. For that the test has been modified to use facilities from net/lib.sh. The new output for the test will look like this (example with a forced XFAIL) Testing for BIG TCP: CLI GSO | GW GRO | GW GSO | SER GRO TEST: on on on on [ OK ] TEST: on off on off [ OK ] TEST: off on on on [XFAIL] --- tools/testing/selftests/net/big_tcp.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/tools/testing/selftests/net/big_tcp.sh b/tools/testing/selftests/net/big_tcp.sh index 2db9d15cd45f..dc2ecfd58961 100755 --- a/tools/testing/selftests/net/big_tcp.sh +++ b/tools/testing/selftests/net/big_tcp.sh @@ -21,8 +21,7 @@ CLIENT_GW6="2001:db8:1::2" MAX_SIZE=128000 CHK_SIZE=65535 -# Kselftest framework requirement - SKIP code is 4. -ksft_skip=4 +source lib.sh setup() { ip netns add $CLIENT_NS @@ -143,21 +142,20 @@ do_test() { start_counter link3 $SERVER_NS do_netperf $CLIENT_NS - if check_counter link1 $ROUTER_NS; then - check_counter link3 $SERVER_NS || ret="FAIL_on_link3" - else - ret="FAIL_on_link1" - fi + check_counter link1 $ROUTER_NS + check_err $? "fail on link1" + check_counter link3 $SERVER_NS + check_err $? "fail on link3" stop_counter link1 $ROUTER_NS stop_counter link3 $SERVER_NS - printf "%-9s %-8s %-8s %-8s: [%s]\n" \ - $cli_tso $gw_gro $gw_tso $ser_gro $ret + log_test "$(printf "%-9s %-8s %-8s %-8s" \ + $cli_tso $gw_gro $gw_tso $ser_gro)" test $ret = "PASS" } testup() { - echo "CLI GSO | GW GRO | GW GSO | SER GRO" && \ + echo " CLI GSO | GW GRO | GW GSO | SER GRO" && \ do_test "on" "on" "on" "on" && \ do_test "on" "off" "on" "off" && \ do_test "off" "on" "on" "on" && \ @@ -176,7 +174,8 @@ if ! ip link help 2>&1 | grep gso_ipv4_max_size &> /dev/null; then fi trap cleanup EXIT +xfail_on_slow setup && echo "Testing for BIG TCP:" && \ NF=4 testup && echo "***v4 Tests Done***" && \ NF=6 testup && echo "***v6 Tests Done***" -exit $? +exit $EXIT_STATUS