From patchwork Sat Jun 21 19:33:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chia-Yu Chang \(Nokia\)" X-Patchwork-Id: 898922 Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011062.outbound.protection.outlook.com [52.101.70.62]) (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 500BB2701C5; Sat, 21 Jun 2025 19:33:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.70.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750534431; cv=fail; b=nBLFfdTYL+STPwKK/XqoXOF45ve/Bmm3bKsxSgVJxNP37JrjPzaGyQOWr46y8JnRdDSaT/FoDcmFcdXj+1BFGNWbLpYQQr8NWUBC5/wJi6XPFpTVQd1UUG9V69C4mmI3xzyREXEB4rGftbo53A05IJ98hqyh8P6t/y9mC3KS1/0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750534431; c=relaxed/simple; bh=pzpl0CY/R+nN+DG2BeIfM76DFjYBParwq9vZA1VApd4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=Epvj/egPTTEqwGy8MoWdLgRTBavfNrm1on0d9vF4oepnLq1Y9HVEpAQ54qjFKR/Sq0sHcLmHdrgGgaLBDEycf+yY3bq0sq8v1/yG5WdGJZnrhGj/LxL0rK+4tO4Lx/Rc3qBfNMgk23ZXaN+nLzWt0HAzbdnQv+N1UHvkIWiPKbc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nokia-bell-labs.com; spf=fail smtp.mailfrom=nokia-bell-labs.com; dkim=pass (2048-bit key) header.d=nokia-bell-labs.com header.i=@nokia-bell-labs.com header.b=Y+l4aKC5; arc=fail smtp.client-ip=52.101.70.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nokia-bell-labs.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nokia-bell-labs.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nokia-bell-labs.com header.i=@nokia-bell-labs.com header.b="Y+l4aKC5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JsTgUtnUdpcFTJDfQTzt/LlNwXVwgLpOixLzerwL5oTb1gjZE/Msb+NCRaQwziYMAbeq78oLexz01NuGKe2twO+B2t0GQZfWeAR8j8DgXh71IFkdjragxw2W9WKIMof8mfztW93NGSluUnoNowu3mSB+J8ogHxJj6i8fE83KdYM1qhA4jeUWDfH49H/yxGXt3DRpt3+y3gk28MoZh1XdFnpwbXe1pOHCHWS76efyMCQCPr651+fa05eHsMJHEyvk8Yix0elpQC1kvBACJW49fM1240JtwG/8j4ka9b/1B9ZBpW7S5z4pIld8bILam1AgShRjJNHkcRh2TpPBABue4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7kZd+xMYmqRJgREmehQiqgrPjnCizDW5fT+4INzI58c=; b=jRILGFH3nnwqXlBmR2f+QiASW9PEa0+K+Y/MZ6qkj67dy4BPMEPX4HERMnfLN9uuVVSSG5ZzJzd//iHry4VnIOyo5oH7l/SdjJTLiG/JliXapowg5f9Ac20RLl/D4kse5QinM0JwtKezUc7PYFHkFCeqXyxpMjwGnBo9LJjuecs0TUt9sznoIFnzDHzlFTYz6UrpmKPOByyPuZhAi+tQkjY4u8AGnUTUpcR9qaq2YXRsc2Gp913BKCI5/aOImActgBPWySEXVy8aBE9OsfbbOjT1qyT7/2DmCwf4BnqlmOPpEV8Ne9mAQOw5l9trJdYt+1SLgfSihxOc5pkfUWEoxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 131.228.6.100) smtp.rcpttodomain=apple.com smtp.mailfrom=nokia-bell-labs.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nokia-bell-labs.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia-bell-labs.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7kZd+xMYmqRJgREmehQiqgrPjnCizDW5fT+4INzI58c=; b=Y+l4aKC5VYhoSDs9yOAZclOyGx5STrNvH5wt29cnY9CheVi+oFFgTpOBwXfn4po8M1oNmcKQtnMyamDMl81gOj5zO3I/Wsoo7bgly/bi0YHLRuDR9qaLN80uvI3P9JutbzMW0XW4AkbyTgf1oDRmYVvkJdah3a8nUthXXvufNW81L6OWqj9lWOnz38naN92XQ+rLioyqvQFUAuYlZhuobX+ahmjg6+E4DA6J2lvnCAu9KB46uvYrCvg6k8jbCwiFkf+PQ3bLNh9iOa3clYkfXLM+GG7R9+ja8bgrs/vWlspqHgsF6d/vpFuzrLL+e+fpM1D6CWsKj3WeljSj5RyOtA== Received: from AS9PR06CA0206.eurprd06.prod.outlook.com (2603:10a6:20b:45d::26) by DBAPR07MB7032.eurprd07.prod.outlook.com (2603:10a6:10:199::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8857.27; Sat, 21 Jun 2025 19:33:45 +0000 Received: from AM2PEPF0001C712.eurprd05.prod.outlook.com (2603:10a6:20b:45d:cafe::e) by AS9PR06CA0206.outlook.office365.com (2603:10a6:20b:45d::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8857.27 via Frontend Transport; Sat, 21 Jun 2025 19:33:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 131.228.6.100) smtp.mailfrom=nokia-bell-labs.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nokia-bell-labs.com; Received-SPF: Pass (protection.outlook.com: domain of nokia-bell-labs.com designates 131.228.6.100 as permitted sender) receiver=protection.outlook.com; client-ip=131.228.6.100; helo=fr711usmtp2.zeu.alcatel-lucent.com; pr=C Received: from fr711usmtp2.zeu.alcatel-lucent.com (131.228.6.100) by AM2PEPF0001C712.mail.protection.outlook.com (10.167.16.182) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8857.21 via Frontend Transport; Sat, 21 Jun 2025 19:33:44 +0000 Received: from sarah.nbl.nsn-rdnet.net (sarah.nbl.nsn-rdnet.net [10.0.73.150]) by fr711usmtp2.zeu.alcatel-lucent.com (Postfix) with ESMTP id 5DF4E680010; Sat, 21 Jun 2025 22:33:43 +0300 (EEST) From: chia-yu.chang@nokia-bell-labs.com To: alok.a.tiwari@oracle.com, pctammela@mojatatu.com, horms@kernel.org, donald.hunter@gmail.com, xandfury@gmail.com, netdev@vger.kernel.org, dave.taht@gmail.com, pabeni@redhat.com, jhs@mojatatu.com, kuba@kernel.org, stephen@networkplumber.org, xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net, edumazet@google.com, andrew+netdev@lunn.ch, ast@fiberby.net, liuhangbin@gmail.com, shuah@kernel.org, linux-kselftest@vger.kernel.org, ij@kernel.org, ncardwell@google.com, koen.de_schepper@nokia-bell-labs.com, g.white@cablelabs.com, ingemar.s.johansson@ericsson.com, mirja.kuehlewind@ericsson.com, cheshire@apple.com, rs.ietf@gmx.at, Jason_Livingood@comcast.com, vidhi_goel@apple.com Cc: Chia-Yu Chang , Victor Nogueira Subject: [PATCH v20 net-next 5/6] selftests/tc-testing: Add selftests for qdisc DualPI2 Date: Sat, 21 Jun 2025 21:33:30 +0200 Message-Id: <20250621193331.16421-6-chia-yu.chang@nokia-bell-labs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250621193331.16421-1-chia-yu.chang@nokia-bell-labs.com> References: <20250621193331.16421-1-chia-yu.chang@nokia-bell-labs.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM2PEPF0001C712:EE_|DBAPR07MB7032:EE_ X-MS-Office365-Filtering-Correlation-Id: 8d567c74-023c-40cd-1ad1-08ddb0fa8965 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|82310400026|36860700013|1800799024|921020; X-Microsoft-Antispam-Message-Info: sHhmpdbWLcZxGfFrrE2tkg72c0VfZ1/jIUyCKkAQEGeegcEr84Mt2Xub++6wZhuIHMwBmxxFSJxCNGA5Tx2AMACrwV2UUtuw4FxJ0gpRLWe1s64P/uC+GJONGWybQFOoDvI4ZC9OoFKjbgW0cZYE02oAjiS+8zQRbMjQqPT21SxCT6hnyuX4vUvRWbiRbqqIcgk9NuHeDLIvy53nHtIrPCPoPoG95pEfTlcMxVFSQNTjh+NKlvUxu90c5s+0zHe6umETpJ8q0WYKKaew4+wv494rjSPoxcRuxoBgvIxw1t8Ee3om0bLmz6sBhwKTuYD9AqniQNCFXw732cIk3deyEmnbQGroPPVKOfjv6lvncUCgzsTNjQ/7H3Qlf+OCdsWrVhsHNmkRB99z2adFXoLb1abxTp+YKPaj03H6v7tC6zNWPwC3fRuQ+lF54KwoTiUQjpJxFkaxMS+dxJ2TuDiOUp7cCeOWpdFLKkvqwleudkCrfUfgzL+n1O9YfPW/1sBfRwpukpMo+6/UAFBwajEd53Dxti6Qg8jv+ZBGfa3NwSq9N4Od6iR3oLTKQpdxCQ1HDq85IQ6KiS533AAOfTGhtntzcgQTEz+zO2ge6+pDQUlCNRcGkqv0GzEQmd3ChlbiA6DNrpQC6s86TClQPY/dsuPkwongfT4NBVyOOy8OcIr0AJWCjP4EfgfNKSOd9OaSyLbO/ZlhBAlDgQaxXSIvGq0qFBS7QxXhfBaY4XOW6MlGSeQy//gtEg1nsqVcIxLmX0BpDqwbD9t3AjTERIWPEdkTLxWQoIYjO+NEP23B8C8IxwKb9Ly0cxeo33lGzL7CttBolgGCqO0fFXZluN3WQo7AChnB0160T3+RlNhMhGxpWWIKF6igcW1JD74m9XCg9nZk+hrsTBkcnLamMUdV24Zb5mwCTNAMOWnThq1dGTpSQ5fa8kZICS6I1pNsQHGsHYzoFlmD74PvC0nitdhhtsCWaZoBOULb+6C0t0E6nC03IyNwGveTQ37+7AURaxcrIEqKIwvgS7gRSDYq7sX7YJ9XiOKBHUeMsThf9jDP99tiQ8/zGAkmGbq9eJLtiadj+Cy0BHUiC9TIxQ6PMIDYVoG+M6a/ZR88Hi98Oo7ZGgD3uFAg5ZZ468WH26Vj4naVN6hQhAglp21KWp6dGz1TgbXwx8VwRaU3gAnrYCocSoum4QIa4VX1kW1zbnJu7rD8BERKOTHe3LMJAKRHpJmCWiFSW3Er/2SS8TWiwXMe18OeFHtFOGQwgKoal/FU3Lr8qwW/M4RvHWzFWfy7BKlKGK/pSSeoek2ciKqIYaDSRzu8r7eMPwwF9JZIeWXQrVNPTZL6CPO9sgZZBHbrLFEZty2QkUB7HpWZ6SFMZ/4WYGB3rqaukb9Hq6LrpQwUOakRbOd27ty93kap5aUNEJ1DHCZWnPDeLA0yusc+lfCOjsNqCn62++j7tjfhwkJDOg5dlMI7z6Mhf9ne3aOE2cbiEC0LbvTAo5odUIhxbPnVa7zN0q0J2DrgJwHcXNt41wSbU7hKX5zujOjx0D6c+F/4/w== X-Forefront-Antispam-Report: CIP:131.228.6.100; CTRY:FI; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:fr711usmtp2.zeu.alcatel-lucent.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(7416014)(376014)(82310400026)(36860700013)(1800799024)(921020); DIR:OUT; SFP:1101; X-OriginatorOrg: nokia-bell-labs.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2025 19:33:44.9205 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8d567c74-023c-40cd-1ad1-08ddb0fa8965 X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.6.100]; Helo=[fr711usmtp2.zeu.alcatel-lucent.com] X-MS-Exchange-CrossTenant-AuthSource: AM2PEPF0001C712.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR07MB7032 From: Chia-Yu Chang Update configuration of tc-tests and preload DualPI2 module for self-tests, and add following self-test cases for DualPI2: Test a4c7: Create DualPI2 with default setting Test 1ea4: Create DualPI2 with memlimit Test 2130: Create DualPI2 with typical_rtt and max_rtt Test 90c1: Create DualPI2 with max_rtt Test 7b3c: Create DualPI2 with any_ect option Test 49a3: Create DualPI2 with overflow option Test d0a1: Create DualPI2 with drop_enqueue option Test f051: Create DualPI2 with no_split_gso option Test 456b: Create DualPI2 with packet step_thresh Test 610c: Create DualPI2 with packet min_qlen_step Test b4fa: Create DualPI2 with packet coupling_factor Test 37f1: Create DualPI2 with packet classic_protection Signed-off-by: Chia-Yu Chang Reviewed-by: Victor Nogueira --- v19 - Update commit message --- tools/testing/selftests/tc-testing/config | 1 + .../tc-testing/tc-tests/qdiscs/dualpi2.json | 254 ++++++++++++++++++ tools/testing/selftests/tc-testing/tdc.sh | 1 + 3 files changed, 256 insertions(+) create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/dualpi2.json diff --git a/tools/testing/selftests/tc-testing/config b/tools/testing/selftests/tc-testing/config index db176fe7d0c3..72b5f36f6731 100644 --- a/tools/testing/selftests/tc-testing/config +++ b/tools/testing/selftests/tc-testing/config @@ -30,6 +30,7 @@ CONFIG_NET_SCH_CBS=m CONFIG_NET_SCH_CHOKE=m CONFIG_NET_SCH_CODEL=m CONFIG_NET_SCH_DRR=m +CONFIG_NET_SCH_DUALPI2=m CONFIG_NET_SCH_ETF=m CONFIG_NET_SCH_FQ=m CONFIG_NET_SCH_FQ_CODEL=m diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/dualpi2.json b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/dualpi2.json new file mode 100644 index 000000000000..cd1f2ee8f354 --- /dev/null +++ b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/dualpi2.json @@ -0,0 +1,254 @@ +[ + { + "id": "a4c7", + "name": "Create DualPI2 with default setting", + "category": [ + "qdisc", + "dualpi2" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + ], + "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root dualpi2", + "expExitCode": "0", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc dualpi2 1: root refcnt [0-9]+ limit 10000p.* step_thresh 1ms min_qlen_step 0p coupling_factor 2 drop_on_overload drop_dequeue classic_protection 10% l4s_ect split_gso", + "matchCount": "1", + "teardown": [ + "$TC qdisc del dev $DUMMY handle 1: root" + ] + }, + { + "id": "1ea4", + "name": "Create DualPI2 with memlimit", + "category": [ + "qdisc", + "dualpi2" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + ], + "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root dualpi2 memlimit 20000000", + "expExitCode": "0", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc dualpi2 1: root refcnt [0-9]+ limit 10000p.* memlimit 20000000B", + "matchCount": "1", + "teardown": [ + "$TC qdisc del dev $DUMMY handle 1: root" + ] + }, + { + "id": "2130", + "name": "Create DualPI2 with typical_rtt and max_rtt", + "category": [ + "qdisc", + "dualpi2" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + ], + "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root dualpi2 typical_rtt 20ms max_rtt 200ms", + "expExitCode": "0", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc dualpi2 1: root refcnt [0-9]+ limit 10000p.* target 20ms tupdate 20ms alpha 0.042969 beta 1.496094", + "matchCount": "1", + "teardown": [ + "$TC qdisc del dev $DUMMY handle 1: root" + ] + }, + { + "id": "90c1", + "name": "Create DualPI2 with max_rtt", + "category": [ + "qdisc", + "dualpi2" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + ], + "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root dualpi2 max_rtt 300ms", + "expExitCode": "0", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc dualpi2 1: root refcnt [0-9]+ limit 10000p.* target 50ms tupdate 50ms alpha 0.050781 beta 0.996094", + "matchCount": "1", + "teardown": [ + "$TC qdisc del dev $DUMMY handle 1: root" + ] + }, + { + "id": "7b3c", + "name": "Create DualPI2 with any_ect option", + "category": [ + "qdisc", + "dualpi2" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + ], + "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root dualpi2 any_ect", + "expExitCode": "0", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc dualpi2 1: root refcnt [0-9]+ limit 10000p .* any_ect", + "matchCount": "1", + "teardown": [ + "$TC qdisc del dev $DUMMY handle 1: root" + ] + }, + { + "id": "49a3", + "name": "Create DualPI2 with overflow option", + "category": [ + "qdisc", + "dualpi2" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + ], + "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root dualpi2 overflow", + "expExitCode": "0", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc dualpi2 1: root refcnt [0-9]+ limit 10000p.* overflow", + "matchCount": "1", + "teardown": [ + "$TC qdisc del dev $DUMMY handle 1: root" + ] + }, + { + "id": "d0a1", + "name": "Create DualPI2 with drop_enqueue option", + "category": [ + "qdisc", + "dualpi2" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + ], + "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root dualpi2 drop_enqueue", + "expExitCode": "0", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc dualpi2 1: root refcnt [0-9]+ limit 10000p .* drop_enqueue", + "matchCount": "1", + "teardown": [ + "$TC qdisc del dev $DUMMY handle 1: root" + ] + }, + { + "id": "f051", + "name": "Create DualPI2 with no_split_gso option", + "category": [ + "qdisc", + "dualpi2" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + ], + "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root dualpi2 no_split_gso", + "expExitCode": "0", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc dualpi2 1: root refcnt [0-9]+ limit 10000p .* no_split_gso", + "matchCount": "1", + "teardown": [ + "$TC qdisc del dev $DUMMY handle 1: root" + ] + }, + { + "id": "456b", + "name": "Create DualPI2 with packet step_thresh", + "category": [ + "qdisc", + "dualpi2" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + ], + "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root dualpi2 step_thresh 3p", + "expExitCode": "0", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc dualpi2 1: root refcnt [0-9]+ limit 10000p .* step_thresh 3p", + "matchCount": "1", + "teardown": [ + "$TC qdisc del dev $DUMMY handle 1: root" + ] + }, + { + "id": "610c", + "name": "Create DualPI2 with packet min_qlen_step", + "category": [ + "qdisc", + "dualpi2" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + ], + "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root dualpi2 min_qlen_step 1", + "expExitCode": "0", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc dualpi2 1: root refcnt [0-9]+ limit 10000p .* min_qlen_step 1p", + "matchCount": "1", + "teardown": [ + "$TC qdisc del dev $DUMMY handle 1: root" + ] + }, + { + "id": "b4fa", + "name": "Create DualPI2 with packet coupling_factor", + "category": [ + "qdisc", + "dualpi2" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + ], + "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root dualpi2 coupling_factor 1", + "expExitCode": "0", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc dualpi2 1: root refcnt [0-9]+ limit 10000p .* coupling_factor 1", + "matchCount": "1", + "teardown": [ + "$TC qdisc del dev $DUMMY handle 1: root" + ] + }, + { + "id": "37f1", + "name": "Create DualPI2 with packet classic_protection", + "category": [ + "qdisc", + "dualpi2" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + ], + "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root dualpi2 classic_protection 0", + "expExitCode": "0", + "verifyCmd": "$TC qdisc show dev $DUMMY", + "matchPattern": "qdisc dualpi2 1: root refcnt [0-9]+ limit 10000p .* classic_protection 0%", + "matchCount": "1", + "teardown": [ + "$TC qdisc del dev $DUMMY handle 1: root" + ] + } +] diff --git a/tools/testing/selftests/tc-testing/tdc.sh b/tools/testing/selftests/tc-testing/tdc.sh index 7a81088802d1..dae19687912d 100755 --- a/tools/testing/selftests/tc-testing/tdc.sh +++ b/tools/testing/selftests/tc-testing/tdc.sh @@ -66,4 +66,5 @@ try_modprobe sch_hfsc try_modprobe sch_hhf try_modprobe sch_htb try_modprobe sch_teql +try_modprobe sch_dualpi2 ./tdc.py -J"$(nproc)"