From patchwork Mon Oct 7 16:26:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 833467 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2046.outbound.protection.outlook.com [40.107.220.46]) (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 0D2321DB92E; Mon, 7 Oct 2024 16:28:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728318536; cv=fail; b=V06Q5V5/wNVKhyQTx3UPkliE3N5grVE1btYbXtHjnju4LuUWm/LQNOa85Iqxy+tASODXHnz9ZzbT7ZAxL+XUytJcHB6Ob8R7ErkcJPq8ctFhZRNMkCiqa7xb/0+93xVuXyQ0ZmDMrHH2u43x7BTxL/utu8kBDcE2oFBKtI9ROjw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728318536; c=relaxed/simple; bh=MYv59dkjoziianeMsXYeay0TT6SUZQsse+/RXI86AOA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HfYnwRLS1T34wYPOC97P+m/qg0dlZXDToUqyfrkT5SmCEUej1GKpi0x2CyOC3FpD454Jrck8bH50x6u8PK2VQosGo46WLZKaPLpf68jAGW5ZiTdUdO0j0j7/mQ5Pst4R1zgPrFxc2WBGSbuR9Rq9bV9cDpDZkdtjRTNKHSOgb5k= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=h9JiKW0c; arc=fail smtp.client-ip=40.107.220.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="h9JiKW0c" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UK/iBsIiqg971XcZAjnz7WgD9M4xKyVA53UkYkBtnS4UBTaDHoH+EP5P5xwWUzxqitWA7r5XM29t8Q3rw3v0AhaoG468RZ4BY3BvrxIm3BZDRejHTFoFOQTVwXhyRzDXIH+JuwmU9LoN7bpHGGlgCLB/IRCZ6B9j4Qdm7Tu0qhP8+QX9Rr65b1bJlAxhXZcCMl8rA9ndVx5XXwrkhTl3VgHHOo+UEvicb3eUG0/I7nCt6bQOAHJ52Z3slPmXDOCiz9jzSsJQIXK1aLY5BEDKOp6Im6FH5/XF59lZesnAEaRjGmOLkXfVdtyESLTmZLJv1TAuogyT9O24MCv0DWwKsw== 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=JksvwnYpkQqZdxP8ANOhbgMdbERTbVHUTMV1ZA5+KeM=; b=XXxhZPjb/hwN7JkgMpWyFhHJQ4f4mA6PgV1yiXBH8vfuuICe5OOL4k9zeQd5Now7Qf3lX6p2ANP9658rrcy2HBwxAiPIXpexRMUbWMPdih2wehr5OMqiGe4Q58nTmR/bBNQMvaVuv+gI0hxkDidJ1ZZFCzun0PdD7BP0IyEIAT2D1UCd29dauhGBMUoag+0UIR2NPjBSmuTdvwIZQwdxULHxNFy+1NXBXFe+JOmWNczOAvQw6yJntozAjl2WfLBhp8MP5aNRIijGUxE2ptFOUuOa4hdTmr27myEcJ12dXvbnq1nWiCXgEHkIZSlqAgVrQ2K74LQgkJ+GfgloP3gsSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JksvwnYpkQqZdxP8ANOhbgMdbERTbVHUTMV1ZA5+KeM=; b=h9JiKW0cnH7R+lOXpipAt6zJWK86mJw8/2XDqDxgSPh+GwMrgzgNlPzaG5QmGMqkE4qz2Zq/x/RZcs/d1K3UTH+S0F8BJTE7zgBPurTcgkspnD0vR8Re7wXeSRB/s1ACINMcGcbDQzDKCWmCeUZhE0BFAc/5zkN1b9RMSymeErHlX7sCWwajeh/5I6rkSGzNEPH4FqjLUVqB+toEUd6J9nQzyJzjyT1YxNCHdWs6ZIzO/kejq9kvLOFXB23HIvY/LFBy+BvEutgcXJz0fQ0a3BHYO0z3mSwvlPAeY/Dl/lI4l0J0JUFzO07NCjaVZet+TUr9CPX8gMO1iCoPBh2aqQ== Received: from BLAPR03CA0105.namprd03.prod.outlook.com (2603:10b6:208:32a::20) by DS7PR12MB6287.namprd12.prod.outlook.com (2603:10b6:8:94::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.22; Mon, 7 Oct 2024 16:28:51 +0000 Received: from BL02EPF00021F6D.namprd02.prod.outlook.com (2603:10b6:208:32a:cafe::d7) by BLAPR03CA0105.outlook.office365.com (2603:10b6:208:32a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.21 via Frontend Transport; Mon, 7 Oct 2024 16:28:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL02EPF00021F6D.mail.protection.outlook.com (10.167.249.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.13 via Frontend Transport; Mon, 7 Oct 2024 16:28:50 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 7 Oct 2024 09:28:33 -0700 Received: from localhost.localdomain (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 7 Oct 2024 09:28:29 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Amit Cohen , Ido Schimmel , , Shuah Khan , "Petr Machata" , Subject: [PATCH net-next 1/5] selftests: mlxsw: sch_red_ets: Increase required backlog Date: Mon, 7 Oct 2024 18:26:05 +0200 Message-ID: <0821fb3aa8bb6a6c0d3000baab04995517c9a0cc.1728316370.git.petrm@nvidia.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00021F6D:EE_|DS7PR12MB6287:EE_ X-MS-Office365-Filtering-Correlation-Id: d082bb94-d3c3-456d-7932-08dce6ed20d2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: NEElubuhv4DwtFHYARG9c8xkWSIqSjkGoiKAtF6fEckzRKL2lcQrVund9MX1L0Rmwr7QJWBH2NhQHhIK19rKl5Uo4iD1k/aoq3BfsaZypMfSgyW3W7/2icruGoILfAdm2rL4F3yA82ZEuuUOB9TqTLsm7d5jKNj425cOJ3eX9ta7mcuM6IlRFjVmwzoRepgXDp7X6S+z3nI/9AFmEVYJrknAK+doobp9F9Rxaz6umhciSvjMR1TjhMWO7RQfh1pJI/lLbuIJKfO+amNe2DzfVv2VHomglb8uLW0adl5SH0l8hbovG6OEmi5D7CB8RGjQDcWho1Y+PSfFm04zgw4er4Gfr1/FnQXjdGMAY7YqRDkxCVrsW7VdjUf1E54LypTZS+pOfJBB7Z7tGiwlkFLNegKSWFU/oHsvbnVMDKvmrz6ovSHxFoWyepyVHCaigtp7VDbpiOzI+nQv5LJJdxN9wpL24ljO8MTb6bQvGc7DRbw4qCvIRa8eQFhHD7UjLPxh3ja9Yoj4//bNHkCKwYiHshfvpyOhqBeg2JtgnrAfrVclRUoGtMi0utNhE/cJrBOSkHuKYiNVT/wMxe60UkRyfLLquPvAEO0OKJMDSNQTDy4VNZn9VQNlTQtqS2TfgojUUS2zmhmok/NsSydwvnodloZvUJxca/oUkc+A0afwdnoMNhHfl9ssGIkOT2q4z4k76xS2GWOHI2nbDPSD2gKAPQJfkF6H7X0g5LLUFAYiO9SyXlbkC4D79owuBC0HMR9roRyGE5zlgOnAdv0hWlG53ORVHmrP3iEmhyTrm2qsumg/HU7+FwHeof7YodoV/gV+736OHwvYnKV75AZ+1cUGGdV1HLYJq88myC8deVOUPBvwUfeMaN6IynrtSjOGa6pkvNhFfOQbNYx4q0P7XYfHpjSADQq22bzynFZv8e8KLTvXIZIeMlGbIuPoC6VK5zpk/Fzma3diUIzKVz6TkIS9R3h56jqpA2K3lTb61YKRAdojiPPslxH5TuKNdraQIM8AMjv5nVF3fL6dY3GDswOq25+PoLGS+Hp/ahOKe+I+gLC/1GNndRKKlFuEp89DsHx6302rX6l+lR5NUyJcw+69BYE8keze3ZSBf/RQwsLhXpdiwKtRHsMxCZmM9MX8I3emNG5RKdcUR9Xs/7Sl9b2rQ9m3TqioDP/EN2BLo59wvBjJwW8GUigK0/dlBWRONAOjJf7llUv9SbiV0uOUPfmcdXO/F6ry3aIPOwU2bkUGWn9UP9sbOxwhAB7bcBfHGiMYesI1YZvQsvMLQiV3oNKnC3xDcMkseqo88q5oP5vlkFGlJ51Q/92DIIK/+HjkerHMbqQHyWS8RWsVkUg0f9515DyuxLswbnDP68XS0KZIRcQ= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(36860700013)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 16:28:50.9569 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d082bb94-d3c3-456d-7932-08dce6ed20d2 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00021F6D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6287 Backlog fluctuates on Spectrum-4 much more than on <4. Increasing the desired backlog seems to help, as the constant fluctuations do not overlap into the territory where packets are marked. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen --- tools/testing/selftests/drivers/net/mlxsw/sch_red_ets.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/sch_red_ets.sh b/tools/testing/selftests/drivers/net/mlxsw/sch_red_ets.sh index 8ecddafa79b3..576067b207a8 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/sch_red_ets.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/sch_red_ets.sh @@ -20,8 +20,8 @@ source sch_red_core.sh # $BACKLOG2 are far enough not to overlap, so that we can assume that if we do # see (do not see) marking, it is actually due to the configuration of that one # TC, and not due to configuration of the other TC leaking over. -BACKLOG1=200000 -BACKLOG2=500000 +BACKLOG1=400000 +BACKLOG2=1000000 install_root_qdisc() { @@ -35,7 +35,7 @@ install_qdisc_tc0() tc qdisc add dev $swp3 parent 10:8 handle 108: red \ limit 1000000 min $BACKLOG1 max $((BACKLOG1 + 1)) \ - probability 1.0 avpkt 8000 burst 38 "${args[@]}" + probability 1.0 avpkt 8000 burst 51 "${args[@]}" } install_qdisc_tc1() @@ -44,7 +44,7 @@ install_qdisc_tc1() tc qdisc add dev $swp3 parent 10:7 handle 107: red \ limit 1000000 min $BACKLOG2 max $((BACKLOG2 + 1)) \ - probability 1.0 avpkt 8000 burst 63 "${args[@]}" + probability 1.0 avpkt 8000 burst 126 "${args[@]}" } install_qdisc() From patchwork Mon Oct 7 16:26:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 833786 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2071.outbound.protection.outlook.com [40.107.237.71]) (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 A36F21DB34C; Mon, 7 Oct 2024 16:28:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.71 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728318540; cv=fail; b=PNhiksvcwa9CfCTVROjYydpn+JOWDuamVL9YXbysF5w+b+znsh5rAirR1fEHVhb3px7bOcl5S0CG1yC+VE9G/NhC5zICQ49b4xCTg7PjiPy6yzr8CO6NkHT/Jymq6ngKM7yoTN83hZ6c+nXJuFUJGJjJRHigbPZKmXrWvRajHJ4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728318540; c=relaxed/simple; bh=RG0Xczc3aZR/AIuRT/rYeaEyZ7vOx44rKeE8VdBJi1U=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=q+n8bAOS9+7LDxGJjRxhpNUs+w+QkcklxMdN/8SBFGp09OVx5O9W57hYdAGSsbuXugwtYcuXr5R4uj5PzXqKeg++XfUlv12nSH2ftmpzJ6ggU//aasHqqN4mimVdx2dOBPBLnT83w/1ZUv1orVfSshQ3zLomW4XuH7Z0WCvstWo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=QXZaMDpV; arc=fail smtp.client-ip=40.107.237.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="QXZaMDpV" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bvC1WWIZiB4aV98LeRFItSu7IBco+2PQwd8aTdyUDgPkx2XhKOPCR9k3i9UbEfkGhqUgCb+OeDpazEDd2X+noUuFuozbogpyNHToxew7knzQc8iXU1n6ZN1lvheSo8f7hw7aM0qicMc3Jxq8sZ8/1lQl3nKrV5CkI7do/TPmjnL9Bw/S8xFuv9mDreoNRxqiF5CV5WgD+nTinWsCSHNNPUdVr7DswhS53c7AtQ+QOlmPQ5TV8ZQN5NXjPkG0dUcyzcnIOSIlRiaZTLf+uLr/WEWls3ZdxIlp3jCXOKJ2ZRAUQ/blaQ3edKuOVMzLmSO29JBQ30/udZwLR/Zbx0wn0w== 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=6f34zSwvAG8F/brlnYCiCEduD36qeySoi3v6wbhbga4=; b=X51rTzqGrfsE0OfKXt1lrex8iaqnyyIjhJ8+VqRMOn6/nRR43idoKF8AzZZ1mdOdA5u/ys+KSoBc9d+iZiBBtLcq+Qqdi15uXYT24C/D9m8m1PwOHuIsgRD7GEFr+UPwW777esERCGIFh2mMhDtO2E/0VNUFmsXkUcpmwCu7u+cjNp7jCWN2hpmJXR+2VfXLhFcmeq0/RC1Zk+nwvXsyigMat2Ki2MQMYTfSNjnd5yhlDesUldVLsjBLzKkfQwfgPKQiltPoKVlocIH9gdJU03nSG7Okvrg8fmD058b8ZsKjqGevgNN+WvYbx0TGrayXXO2AI8VCuUvkbLtR+8iSgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6f34zSwvAG8F/brlnYCiCEduD36qeySoi3v6wbhbga4=; b=QXZaMDpVdO7CZuN9JQk2kYqvPJH/Gp+D98/9hBWHqMdbfkQPiSwSUp3BtHBKz4XgNxL3dN3LlBybcdICchcxOnnjmd07T/8kvv+QPbweUeg/H7Aasr5dvifPUxA0IZiZqg+JxzOyiULgSF/Ab5b+2PpKhMRDk50JTkm1NQAkEErlJvjv4Yr14iihnEWZZ7fYo62DHJKFrUBmCcKdxtoZFQm23QJF6tsvizxel12+ZDjNcdJn9BPO6oNTHrqetf/NRC/Sp8IvxNNZrJo1lZSO6CFMdEx4Pw6E1d8vYrpz27l7ABPobfFx8ud17EuHZ54ScAmWDnWTqBV1y5U9nhpRZA== Received: from BN0PR03CA0048.namprd03.prod.outlook.com (2603:10b6:408:e7::23) by SJ2PR12MB7823.namprd12.prod.outlook.com (2603:10b6:a03:4c9::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23; Mon, 7 Oct 2024 16:28:54 +0000 Received: from BL02EPF00021F69.namprd02.prod.outlook.com (2603:10b6:408:e7:cafe::3b) by BN0PR03CA0048.outlook.office365.com (2603:10b6:408:e7::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.20 via Frontend Transport; Mon, 7 Oct 2024 16:28:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL02EPF00021F69.mail.protection.outlook.com (10.167.249.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.13 via Frontend Transport; Mon, 7 Oct 2024 16:28:53 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 7 Oct 2024 09:28:38 -0700 Received: from localhost.localdomain (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 7 Oct 2024 09:28:33 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Amit Cohen , Ido Schimmel , , Shuah Khan , "Petr Machata" , Subject: [PATCH net-next 2/5] selftests: mlxsw: sch_red_core: Increase backlog size tolerance Date: Mon, 7 Oct 2024 18:26:06 +0200 Message-ID: X-Mailer: git-send-email 2.46.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00021F69:EE_|SJ2PR12MB7823:EE_ X-MS-Office365-Filtering-Correlation-Id: bd14f8a3-9e14-457d-7f59-08dce6ed22a1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: LBX6uAv6ZVsrD/DyR1cn8jduZte7vHDWxFziZLNlMvnsUwp1diss/7v9AYdbaI8bzogU4XQKgkhs/R7iM7gxiR0CJvDPYlOojI1zgaIszMqrX+I6IOSImgL3MZrMn2OKCJLfDC4xkS2usSHLnCGIEJm2CPlAwfLghQVAqxNQNYX1ImUrnHLKzuCxAVoULzv7TLB6noS2rVLvcvOYkTQIwu69PdJLGhGfdh/sSCBGbhXkBaI0mov//YFFUYye4MAW49NOE1ylShRMnnHgPp5ZXkwRXGQYMpeWKIqOw5JbEBVniEqqDFZC2pHmsLxP/DQuiEytSOfTJGUsTZ/epdb1mF/5PcmXn9lFaH0BlU/074qyiAHMHQAq+zW5Bz7BV0TnH2yKINLQi2mMucJ+6EAaGGAreNSfUIIs55nmRXO9l0a1T4tDx6PRrPVIM24wBeS54QVXiqAJ4g79Ek4fb8u+7s72mVynLzKpgrhDIDdPgHlH8thEAhtYIxmXVjT9jwGu1nZiSJf/73cz2usS+S5WQSvLKP0vdx+lWP9i//sT9mVs+f/tlJimyBQJRj1oyUEldOSJRDZDFgrQy0vlUNxbaIO+4xNLLrM6qE2zudZHrnS3Axh4xMIm5dwFtSU3nArwGuImMrqE+L47Apey+XaynT1iXJCWdnvD2Ba2qYuOAGOMPrPn2isubFmOhSWu+dD7CnYbREwGcoB3P+CPl/vXzz9uMlSHRlMel3P/eM8rKnS/AaphA0fNhnYFdW+WhYJ9qaEvb/qVfH7jkpa3Eq80dxpX3UDyp+6++6LgYgDonYC9oK/hmLYKyO3OrG1B0r3K3f2BOgo5sFCvB4mueSQEsme1sWc+rj1mHh+t0gnrBdNYwiBYqc/eug9jLL7TDXnbbedWtijlYCyudLlBeugG+88cMi/5F2ypFrc5UvgsqHE+0MT8EV6wPpvxi9UThSPFF3vQcwoQrkHpgmaOzYtQrE1oAjSzD4mJfYdlfMKNp37UPZH2xFhreG/06WYGfYhvvnAlECnf1cN3zc3/ULNtrL28Pae0Qtp+f7giIz33roJHgrzfGhSBCjkh3edEsdVn1a5nsOJDwA9poVl6GHNvnEAwo2T2X1cSi/Kz+Lzw4X+j9/XN1GCiUv3iWzUCW36F7mFXR6pDqDMg6noXhILobT5Eg3hh30weYigU9Z4DKOX4OQgQXO1x6neXO04Ja7pkxVaonr36O4Bfz4LBLGaQKS/xcxGEFtYLxWJqq5iYqbBFQuJtIsmUQVigYdRoMvWUIUTSUnPH3IW01vGtCK9VR1N2JzqtOu217Xatr5fYXuQzFpws5Kt8VZ/iF2gy/DCty0uGqYrjyd/IIb3gZJHROld2ajGUgAsJDbl57zng+CpDMRw/9VjWbe0Q7Ik3scNX X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(82310400026)(1800799024)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 16:28:53.9758 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bd14f8a3-9e14-457d-7f59-08dce6ed22a1 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00021F69.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB7823 Backlog fluctuates on Spectrum-4 much more than on <4. In practice we can sample queue depth values going from about -12% to about +7% of the configured RED limit. The test which checks the queue size has a limit of +-10%, and as a result often fails. We attempted to fix the issue by busywaiting for several seconds hoping to get within the bounds, but that still proved to be too noisy (or the wait time would be impractically long). Unfortunately we have to bump the value tolerance from 10% to 15%, which in this patch do. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen --- tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh index 299e06a5808c..a25a15eb6d31 100644 --- a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh @@ -532,10 +532,11 @@ do_red_test() check_fail $? "Traffic went into backlog instead of being early-dropped" pct=$(check_marking get_nmarked $vlan "== 0") check_err $? "backlog $backlog / $limit Got $pct% marked packets, expected == 0." + backlog=$(get_qdisc_backlog $vlan) local diff=$((limit - backlog)) pct=$((100 * diff / limit)) - ((-10 <= pct && pct <= 10)) - check_err $? "backlog $backlog / $limit expected <= 10% distance" + ((-15 <= pct && pct <= 15)) + check_err $? "backlog $backlog / $limit expected <= 15% distance" log_test "TC $((vlan - 10)): RED backlog > limit" stop_traffic From patchwork Mon Oct 7 16:26:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 833466 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2053.outbound.protection.outlook.com [40.107.236.53]) (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 74D741DB378; Mon, 7 Oct 2024 16:29:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728318547; cv=fail; b=IUDl7AUHj+DvtFmTqZ8Phk6aVQg6NRLT3fHTX7Sr8s+BMluCs7idw2y8BKhqx9aXnmb+oDEvrOyIb2FisWebNA64pe9r4DPxC/jGBcB05DlgkpNYWZuHUZVeSM4BMDaFLD1fP7kYA3NeEjpsi7KCM3pL/TnkID+FyDFEP5yN3+I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728318547; c=relaxed/simple; bh=CejQ5fR3tewGYyf3yY6A6HPDBCFaB3tf4rQkJydCQho=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=W/pS5Wl/JDONkmfs4Cki3bvYURZyASlPrbMLdc3PsNENMUJdQJbPpYbpz9jQZdkHqD4Vs5//iX0hRbcxzFLiVxksJCP3qm5ZBBlH7c5vy5rLK+T+j323fDCUCMh7wbFt6u3i9iPU/57aJdZTUKpVr+pkv9ASK52YLID/dlky3so= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=DQ0p76g8; arc=fail smtp.client-ip=40.107.236.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="DQ0p76g8" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yOkloP18kchtBseH91iRVZvNJFkVmtQIqEGk5DaExsTQs4BPN82Of4NrD+vobbA+qRqX7yFtML8F6AQ/pBp2lsEdpDpYiBYHycGGR+a6t/4in4VDOTICi1tAlOBU0dzctq3VYinseLiPV3jMc+uO4FLUvJVAkwjJvjFRoavaCJQpNRBG15OjjgPicE93NHgEmrb+LuuiHOsdzllYHV0oj9tlCfNR2FIkZFn6quD3aRZXj+e3L+IzQgEKvlOlyThz38BV+HcmKCsRLZg3PDTjn99D1afluPn7wAsnkKwJrGUBYlG4Qc1J6WJo4vtXH6N/5i4gBYMT9AonFIktHB/Peg== 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=eHPKeTu7TWkxAaRcGkQGbmIAZqux0w27Z5XzMEZ3KRQ=; b=SBgfcqzQzJKC5MDCbluMdlcPmObZnkR86+BDFLF59kM4TbDQ724zbDQr8Q/JozKAg5WqK37C3uJ3tTNMInaguhl/Ie3P7ucu03kXQ/Tqem2aWEKSDx65xBw+ekitPcjVIUsyhr9qDYsDs8gZSnoyFui7uD5n6nd2rpHxyvSgPFtbjehZouIMsmyNx2yrCNgjgQQ4X+e7E01D4wlUtTmeDg8rlmMqdPQ06XCNmdHtQZdKEsGhPc559h7cQJlq8y1uPNfRlgG8viescKWCkhBZxSVeXQTPdqlxSFPdqxPu/2jN1EDcJzn0LEg73dJGgFi9zIm8dLJ4Go5Fnuop6me0nA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eHPKeTu7TWkxAaRcGkQGbmIAZqux0w27Z5XzMEZ3KRQ=; b=DQ0p76g8WQHWrYBrPloB+sclZXRkTn98F1q9YEAsDt1d1kJnrdp+/GYiM38lFkQfqkO3FA2y3cx2KWlULyJyhnVBKCrREEpp69JfP3xK63Bctap+9oH/JjsDr5Nik3e9VV2HW1BP0DAXgV07wkZUoAxR24eIeYNkRzhGf85Te0ozIMqjqXlyX3rtZFzDqxv2sT+1O4cycATX0uD0LqfJPeVNliyPcJsJwZs9pD0U4lJWyLZvCb7cTjLnQzZClOE0Jge+krcrwEDzwW95gZnkSKavqXKrkZs0IbmA2z0bqJv+SvY1QCnyUpIR1lvSwHEGcixk2F6A44zN2TLYSOcX6g== Received: from MN2PR02CA0006.namprd02.prod.outlook.com (2603:10b6:208:fc::19) by PH7PR12MB6933.namprd12.prod.outlook.com (2603:10b6:510:1b7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.20; Mon, 7 Oct 2024 16:29:00 +0000 Received: from BL02EPF00021F6E.namprd02.prod.outlook.com (2603:10b6:208:fc:cafe::d8) by MN2PR02CA0006.outlook.office365.com (2603:10b6:208:fc::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.20 via Frontend Transport; Mon, 7 Oct 2024 16:28:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL02EPF00021F6E.mail.protection.outlook.com (10.167.249.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.13 via Frontend Transport; Mon, 7 Oct 2024 16:28:59 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 7 Oct 2024 09:28:43 -0700 Received: from localhost.localdomain (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 7 Oct 2024 09:28:38 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Amit Cohen , Ido Schimmel , , Shuah Khan , "Petr Machata" , Subject: [PATCH net-next 3/5] selftests: mlxsw: sch_red_core: Sleep before querying queue depth Date: Mon, 7 Oct 2024 18:26:07 +0200 Message-ID: <321dcf8b3e9a1f0766429c8cf3e3f1746f1bc375.1728316370.git.petrm@nvidia.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00021F6E:EE_|PH7PR12MB6933:EE_ X-MS-Office365-Filtering-Correlation-Id: 40bb49ec-3351-41ef-0e63-08dce6ed259a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: xRfk51OvHEmFe0IPxD3qGpeNG6/AsCdmQkqv7ew7vQ3kYLH4FOh2BxZFbu5ncGjJTi5YDKCrFinFvWlFrt+tZxhppwvYmy+Fyo5VVIcAl4OmZgjIy0ldcu5GvAxFSbNBjwwIQJH8QSWdSvJ9flatX+weQwigKtzTL9nGW1eCobnleaQJAkSwL+5endj90PE4MurF4HHHMJWKPw+FMQjc9e7xk0KIcEO7kMrPkBzdCJzZDviDmZTSwvMHpg7FqOMK7Gw5tUHzrJwQ47PCw+x21gKrrCxY04Rf0ISJbdobe0IiuOnhq/8zS1Mq67ACihLaH9ElVJwIvBsPfDiyD8ngtm3LySIAA41dSntFGglo1nqs1vt1tdWhXObjzF4aXlRoDMohFU7u2zBmfhD4rXSYHcaJXxvak/kzwvTRzKNh+BEKYdbQLyHEoUQsmW8Gap7sUkPvvQFLmtndOwxH6KE3+ao0SGyujt/u/i/mepwOrE5PGWo2FUNtIctIcPOYCetTNYhGc30L67ydVc8bnLeRrKTnWbjcJ4KQfJn0sZgINJCuv+QAfIeLvsY3N5xtwVfINCFLAm8Ew9azusFSj+BhT0FVKMoD8uOLqzAkEXZ2+rjML+b5nCj7OQcp9eyqOlHrVgKPfFckSc569Agd6pVg9qb7kwjCJRulwHjyHnALSFUdbNu8JtC9r/eKh127pKGA28tC/dk4ePWppbU2JxVu8+nqf9TG6/dCm9uSdCD5FDm0iHu2ZbVS31tPHZ/0NYPK8b2UyoJPMrc59rlEtkzg9N0N5y/u04posrtCR7N60XaA/4ZRQHuS6zqe3TS6Xligh8RX0yS9gWTt5oh2WUy1lAg2PzQvyJCeJqI7RvN6EChMoqrRJp35HctA67Wy51aN8dSatvuS10Sy0VHPyO0EFheR2k7Fn1C3F8khP0WrDFMcrpK7J+GHfMWXsZFv1NZdikTcv1l5D44r6ta9tUt0gVyK/Cp1rCtGURaFd+cLV95vqAt26TxFSDgCrXdR7iCUuYhbAaRFOX0GURAw5YZZ34MoDB0FHgtQODcnej6oi1sWOM6Dtur3rpwHOS8aeCeZsfuaMmxeiPLy9rP5005CVn3eMG6QC3nq4El/WtBInmrvY+YjWoPAzqRrZLMkZpkr58jNU72i01pF/sjyX47pE1y0NEnmdVD97ApwzpEYlbbebNso+LIpg0wBYOTeIAzaPnnvqBsTqfZtOLshS7BnCqwKeUSEOEBv6WSj7E4i6IYYT4dT/pf1wEgtn0q5uLoiBvI84ywWCPvieFt7lMkuxwHjgPWWXKLYLYcMJApOHyHmDKgJeuA6xpRj1bpqHHHD3YAeL41q2tz19yZYDakVYxAd34at2AOd+SpB1XSkYvo= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 16:28:59.0071 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 40bb49ec-3351-41ef-0e63-08dce6ed259a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00021F6E.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6933 The qdisc stats are taken from the port's periodic HW stats, which are updated once a second. We try to accommodate the latency by using busywait in build_backlog(). The issue in that seems to be that when do_mark_test() builds the backlog, it makes the decision whether to send more packets based on the first instance of the queue depth stat exceeding the current value, when in fact more traffic is on the way and the queue depth would increase further. This leads to failures in TC 1 of mark-mirror test, where we see the following failure: TEST: TC 0: marked packets mirror'd [ OK ] TEST: TC 1: marked packets mirror'd [FAIL] Spurious packets (1680 -> 2290) observed without buffer pressure Fix by waiting for the full second before reading the queue depth for the first time, to make sure it reflects all in-flight traffic. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen --- tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh index a25a15eb6d31..b1ff395b3880 100644 --- a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh @@ -372,6 +372,7 @@ build_backlog() local i=0 while :; do + sleep 1 local cur=$(busywait 1100 until_counter_is "> $cur" \ get_qdisc_backlog $vlan) local diff=$((size - cur)) From patchwork Mon Oct 7 16:26:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 833785 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2062.outbound.protection.outlook.com [40.107.223.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 B85711DB540; Mon, 7 Oct 2024 16:29:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728318554; cv=fail; b=oO1+CJV1vqwRIt/eRoSg6WylAfDF16Y3kkpTTdgSMYFQaWaALnSDCnacKbujBgydlQ+EkTWBjAlqmTN/nB+uajT4uIJba78IUS5DWFKpLOtELxXNJj3vUlZftYIsGpyU2VAzeKyMOnx/bKGM4X3Pwz/gooWDaxmfOEwhJw+C9sU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728318554; c=relaxed/simple; bh=evNv1oJdEls/x6ILOvbOlxP/BBM25xHqtMI8H86Asc0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=COozpB6J1FFhaG/er9ZvAxoawu2ReWG2wasNbk4BuWeUmDxDTuZaVJL+02qYTAcYCgUWELsEgXAljV5ol7U5JYxl8QLX3nnfZTy/D+IT9KTtnflrmflNTIxVuld90tknlNwQrtV70jdXtRRtqqYD9NRv4HnOoQAqhu8PhvZMUME= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=bjeq6f9p; arc=fail smtp.client-ip=40.107.223.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="bjeq6f9p" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ikH53AzAuTxA2NsqxEuOF8570bJ5dK3JfJUmVCiVzT+28VQJqN/smLARMvzmUySVogmG1U06Hqja5ojmrTJzba9KYZE5UtCLUubPdeT3bdhOxEnLMDY7T/f8R/Rx6yuXM5gV6rKztWP27Ddr4Eb+V1ozpBoDmvmTTY0Uvzqda3L+tSYtclg8wRE3va0gYZzSB2KdYothrS83I69wfmHg+uLfRamUaOd+8zcMDSMCKYsNgWFeOphES1+cEO4gQW6jpf9n4k+xKQpACuLD/0oJLuMbg/Cf2RnhGHDcXGStI+iGGvVR2vMOqbDUERjaEsprearVCD2WzmcrAMR8XLe3Ow== 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=RiWNSlx89gnJMC471eTT5GkBmMJTHv/WCrqJxkEgg78=; b=ZixQWPw5WI2KRLLzR9qwvSz71gnEAYiB9wVcDQhXSewcQbBH/CftVubqMOogz3cNzDsYjt0QNZH82JdS09MYt76t79GA/08EASSfT1YhYDoGP+49HQqfXnhtQvyuHNUTRUVtTEJSQoWb+gxzJNDQKd3R2afOiqf/Kk/JfLgKomou6syNx0yQVlYcaRzF21KKch5zVfJrZlodmpGLhllz3z7v1YwN2/Q/uXQKZ1hS/Ne+Ot+mqHWlSFY2E1ALgrcoGqRRfqmDuHxE/6Dte6RxUgAlljbqnN8uDSkABgliNcp66eWst6DbKo5/4tlkF+CTpG/s58Mu3KpjACEb03Ld2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=davemloft.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RiWNSlx89gnJMC471eTT5GkBmMJTHv/WCrqJxkEgg78=; b=bjeq6f9ploWiYmlMcIGoWiW96/VffufB7m/E/GxfZlRYiBG8pi+TEeVJa8+Omr/YEr2AeH9o5UbYqw4Q+ilXPbG9jqRtxcMRTd893p/0MJuwR+K66pXAUzYkXnPYLG1OsjxCq4+vR8F6lVbFhiXlcm+3lQy4XExefoiQsn2FTvzwYjqxjvqOjTGppnIjo2WVt8hNxopQJoEV4LvpCVgDwyMGHRQ09izQLeTpUpI3IKNHwYz40Ftp7CpVYVgSsjMWptyqDBnUnPd/Pclt7qHqkewYjCdhPg6eY5i98sb0J7jqEkcK5hCcQSbdUehN2HNojC8xS7tSWoXOPJqQxMZsuQ== Received: from CH5PR03CA0003.namprd03.prod.outlook.com (2603:10b6:610:1f1::19) by SN7PR12MB7834.namprd12.prod.outlook.com (2603:10b6:806:34d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23; Mon, 7 Oct 2024 16:29:06 +0000 Received: from CH1PEPF0000AD80.namprd04.prod.outlook.com (2603:10b6:610:1f1:cafe::77) by CH5PR03CA0003.outlook.office365.com (2603:10b6:610:1f1::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23 via Frontend Transport; Mon, 7 Oct 2024 16:29:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CH1PEPF0000AD80.mail.protection.outlook.com (10.167.244.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.13 via Frontend Transport; Mon, 7 Oct 2024 16:29:05 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 7 Oct 2024 09:28:48 -0700 Received: from localhost.localdomain (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 7 Oct 2024 09:28:44 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Amit Cohen , Ido Schimmel , , Shuah Khan , "Petr Machata" , Subject: [PATCH net-next 4/5] selftests: mlxsw: sch_red_core: Send more packets for drop tests Date: Mon, 7 Oct 2024 18:26:08 +0200 Message-ID: X-Mailer: git-send-email 2.46.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000AD80:EE_|SN7PR12MB7834:EE_ X-MS-Office365-Filtering-Correlation-Id: bd8d74a5-1aa5-4c1f-2fb1-08dce6ed29a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info: NT9B0r3YL8Y7Y1wSJ1zevjM4lezfv+6T6UxlD4eEc/wGLetwmgGLt1oY1phAFa+VpMKHaAYTxI0XYRLAvbRaxz1vtkdjrw12IkmwO0d1YxBC5yiqLDQCkMyeY8v4K/k9kxA8d8ef50G93IAR77npecUW4f3njiGlxao2EsmJ+odelXgyMBE3zeTdfxtRJJfTYlwVxIfhNkgLHZi2TJRLoC5oYGShI5n9hqLK720Y69F+vCFtJrlyeqt0lcsym6MLfftLZYxYGTa0U2wzxME2XJvILu01X2iKNsy2QNVPVp7IJI0R3owAPevSyft0v1qR/sH6QT8nctNv26qldBc07UO8XCSa68nsinUarD/Urxd+lcVAe0LjD4RHu4Tf4NBa2gz9NiHHdJ6ZVYfqcgmtQcTdHT7N9tn9H7B9TVYJnh2QE9O7xf6sb26EL2E87OPXPQFWFNwyzfb4VgF/48EFpMDYFXg+w+vDHuNhDjZ8P2n1bqEEpTTdh1OOROatPSDl+DlexD6uJAvgDWeRD4jtNGAGOEIqhBS2IztcLyaOcIZ+11KF+PLRXM7gvZfwrf+nm45bqqOnRPaiSDxfDu/1hsph1T7ZBlvVUHTAajN1m+QiYEnmu50KRGsllKJeFgIMM09DQAjbNYw2CFsna8BFgGLSApRfecGk/CZF4S+5zdOAZqx7bPiYJ8db1VKNUyPz04EzLIU697/1Hh71c8zyYI2+f9E7Ur2qGEEwrC56HA1LuLWRho4mPHAkFKNKrmKQyZnaGUYVTo92Gg/t8muhQPwHU8u6sk7J2YWGzXBTPT/Ux0UpD7L9hJOtijhsGjd29RO/erlkxYUmXHh24rDIuRbrLu2EFxnwSgjmK7gcUWzymXiV2LSeI2HCDO9/cuT6krPppnAwH0GQHZMeC+7+0v3VVfxtxYRPt8iueIOkcGlcWYrTMolNgkFwqvXU2+cltZY0pWwPS8apkdGkvCZXZwLamskkfAUw+bJonquzBy7UKiWK/CMQYwNQ8Ck6c+TOO1NoDp9XzYixnxDzg/vKd0AgPC7RPYdUl7ecIZ4n+yB+6g6oRo7SHOTBjmtT+IYy5Tq9/T0iJRuYutW3nRdvtNtbnGmmqxb2YvtkDc3mJVoqJLmoTQ7BJSwCFs83MtJ5v8TJ95cJlv4WXmeh1Mrj+JAdvXJe6ro+Z5heq3Rg9LcmQm+DZ/TW1AQsImKeg3b4P32Pc/DVF+qL7veebqamAu36wufXCffocbRG82mPx2aB0IeBm5skMGr0aPlmweus5M38tDuoQ9yPUpYtfpnYNF7r5T10xwWDXZb6FcfISFLxfZRwF87Y82Fvt8S6L6M4v4sTT7cpOgeBcfn32sKErlZQ6zD2dgOEZOY7eZQ1WOE= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(82310400026)(1800799024)(376014)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 16:29:05.8171 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bd8d74a5-1aa5-4c1f-2fb1-08dce6ed29a9 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH1PEPF0000AD80.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7834 This test works by injecting into a port with a maxed-out queue a couple packets and checks if a corresponding number of packets were dropped. This has worked well on Spectrum<4, but on Spectrum-4 it has been noisy. This is in line with the observation that on Spectrum-4, queue size tends to fluctuate more. A handful of packets could then still be accepted to the queue even though it was nominally full just recently. In order to accommodate this behavior, send many more packets. The buffer can fit N extra packets, but not N% packets. This therefore allows us to set wider absolute margins, while actually narrowing them relatively. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel --- .../selftests/drivers/net/mlxsw/sch_red_core.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh index b1ff395b3880..316444389c4e 100644 --- a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh @@ -653,20 +653,22 @@ do_drop_test() build_backlog $vlan $((3 * limit / 2)) udp >/dev/null base=$($fetch_counter) - send_packets $vlan udp 11 + send_packets $vlan udp 100 - now=$(busywait 1100 until_counter_is ">= $((base + 10))" $fetch_counter) - check_err $? "Dropped packets not observed: 11 expected, $((now - base)) seen" + now=$(busywait 1100 until_counter_is ">= $((base + 95))" $fetch_counter) + check_err $? "${trigger}ped packets not observed: 100 expected, $((now - base)) seen" # When no extra traffic is injected, there should be no mirroring. - busywait 1100 until_counter_is ">= $((base + 20))" $fetch_counter >/dev/null + busywait 1100 until_counter_is ">= $((base + 110))" \ + $fetch_counter >/dev/null check_fail $? "Spurious packets observed" # When the rule is uninstalled, there should be no mirroring. qevent_rule_uninstall_$subtest - send_packets $vlan udp 11 - busywait 1100 until_counter_is ">= $((base + 20))" $fetch_counter >/dev/null - check_fail $? "Spurious packets observed after uninstall" + send_packets $vlan udp 100 + now=$(busywait 1100 until_counter_is ">= $((base + 110))" \ + $fetch_counter) + check_fail $? "$((now - base)) spurious packets observed after uninstall" log_test "TC $((vlan - 10)): ${trigger}ped packets $subtest'd" From patchwork Mon Oct 7 16:26:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 833465 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2044.outbound.protection.outlook.com [40.107.244.44]) (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 775DD1DB545; Mon, 7 Oct 2024 16:29:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728318556; cv=fail; b=A7JjxBbaDfbmY2ifpIlZMnSsHXZrv+dJEndW/RSZhG7MDNe4h775AyMhAdNEUvVsyDC5NWSuM/2CVmPkJy39VyzyaG0CIGNAFZpzo1jT/ZoqMVtd8/w1ztRTbo6mNeBsCY43RmDastOxVLIQa5mS7KEdP26kYrk30VxNuRzcedc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728318556; c=relaxed/simple; bh=3uArr2WkUSxJOZJslTpzs3LF2GDFlY/MD+lN4lsrMm8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JC9OVHnUcGWm985XPPleAvbYxwNI0XIoEnHCmzjuQ7ByfmqiC8f0CYSf98+9e5eG+uKkH4B+TdyoPhPiA3WgQllsVl4qCc3BJcKj4gN8yliQB46wGd88MOxJpXt+9uB4HnWJjjZRlWwa2xhiMNMp4UigOnbwoXiJW/OdVycmdAU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=OpfONxLv; arc=fail smtp.client-ip=40.107.244.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="OpfONxLv" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=t5gfBYL9y7/7W8DsfcgzMJVG6cKuzLWrHAD647VWE8pkHqB+0ccc4TlPzaWOhYXLu2kB5lA2LVAIvuwBxDfBqFMzc9xTtef1zwzzJTPkNu4jllFfPhKlUvwmhD38JQ0qyzzm03dh6194/48mJyO8TWg73QOcgVNgbUqcpRyWbhgTxb7cFqudGqHc699O6/R3WeNEcdh8yEMrJBTLDqNM3PjIOFhtN0LN5quIvcoNO6s9bgiKQ3C65PNeShRAl8ZTCrfegC0OVAY6dyHxn4ig9fITj3fgz5POC6WT6ShaSF2PoE3oX3vgZg45Lg9NddxW/ronlh4bu277xIPxGZ/XxQ== 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=kucBeUaaD7T0OMvOyX/PlniBj+q//TbrV91GCESvcT4=; b=L9i5LXcox+r/zFqWBJST3kXx+PTd8a7LBUe1v25FK7/3/pIbVdX0wNN5CGjaV1yrer/GIEaJV6oqExfwZCs56NEYZcW1zxRYaMC2uixRF2ZSaC1f+5Dhk6BX2i6Hij0SLWHaA9wDfJBANyMP/k0+W3fL6kJS6TdU2kmN5K9ETZU6uqHJSxxPbpljH4sJj7zPfHIfpKHsFsVQtz0uClcbU0dc6RY54lnXaJss6nhTVtjr2RV7VqyqX7TA0AWW0hAYAZEJk3iD/wQjOIkNiNXfBGL158J8f/7INkTNEkkUWaMEnfoGa4kDNR/b7NlJbtaYXpTuU/65Z9wEQ/qQCo4rZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=davemloft.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kucBeUaaD7T0OMvOyX/PlniBj+q//TbrV91GCESvcT4=; b=OpfONxLv4E295j0iVWDi0P8R5tqLnIjGmO1t+Tfm0UnV4vVM878yM/dl+6PVOmhpFaUykWJ426GCcMWT2QpksI408PnwcwEF1kmaR8V2xPn5NGLu/U0p71hTKAa8aIBXdAcvpY09sPIbDdZAmFenq3lx6QJ6rmvLE5p4JtsPzUrhl8tZW557pVjgpaE8Jt4DDnHWBvwKRMKnsecdGGrL8q3vbrpaGsZ4N/RbYsObSUlGHDDP8LUOFmInaYslqZSAms+5FQot9S3CVSOqaJp2h587wg5uDprghYaET9UjuMSfcgCh1REjpgOEMdedqEB+3kuSMjldTCowrOpafAWudw== Received: from CH0P221CA0038.NAMP221.PROD.OUTLOOK.COM (2603:10b6:610:11d::24) by DM6PR12MB4204.namprd12.prod.outlook.com (2603:10b6:5:212::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23; Mon, 7 Oct 2024 16:29:11 +0000 Received: from CH1PEPF0000AD7F.namprd04.prod.outlook.com (2603:10b6:610:11d:cafe::74) by CH0P221CA0038.outlook.office365.com (2603:10b6:610:11d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.21 via Frontend Transport; Mon, 7 Oct 2024 16:29:11 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CH1PEPF0000AD7F.mail.protection.outlook.com (10.167.244.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.13 via Frontend Transport; Mon, 7 Oct 2024 16:29:10 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 7 Oct 2024 09:28:53 -0700 Received: from localhost.localdomain (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 7 Oct 2024 09:28:48 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Amit Cohen , Ido Schimmel , , Shuah Khan , "Petr Machata" , Subject: [PATCH net-next 5/5] selftests: mlxsw: sch_red_core: Lower TBF rate Date: Mon, 7 Oct 2024 18:26:09 +0200 Message-ID: X-Mailer: git-send-email 2.46.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000AD7F:EE_|DM6PR12MB4204:EE_ X-MS-Office365-Filtering-Correlation-Id: 066fcf55-d87f-42d3-e4af-08dce6ed2c8a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: XByQ9rK/SlITGnB8xoABWhvI8djiKjjde0+O9ndJbjqSxhsPG3wrDoEXgbYYSUcKvSy2XydYg2pvqc4Aikcm7c8zUpeUfVXzr06Gua8hHYdRb5UWUNQzLsimD1WDwmjQttPyZKDaMeWruBoxE4XlCyBV0WU2vC1ECJS/TwsMEbUxhAJ6RUbgze/ueyJUtv6Hk6jWzQtYkkYoLScmiIDNh/NqX1qL1XwmB/V7YEK+Opd3BsdUGNbLbNxMNijpfFAkvdr90Nbeky7fmj0jKx46VTQkQN2PBqTkUQsu3jqukn2EksKXSLA7Uixn9gWrAGLBnA4xOJCZTkeGZLEmSdFVe2d+1j9MTm2mS64GDNpZO4Yo+Uj+aYKwt4/DGWx+bCsKfQ2dNECCbUD0KCasdx2fOQa1E5cGTDOP1v359Jc9SK//OipSjK+vL29Lyr/+JnH2h38iUAupu9bYtiHtTDfuR4rVxjN3tBnF2WuhhSowxSmTAYzLOu/7xL90y/eBwq/1ZXPcyv8dhQkX3PshWlSjKKdt6/XHsrRXe6sMs5jvaXYHdGnbSY/A/fygAWsoyYj+tT1DDxsYlqf5KgprdL32bMk33cxXiUxF6CATfd+vX7Dc5UatotdtQifmqmaee2Fk224LaatDysr983La+k3ib8qRxi8TuJNZic37Xo4Z01cfyQWi/qkcZrwdhGmR0SRvEm51oJ8O0VJ0ghcNBTV64isexsXrCCYNYLflXFRyscj3PN5BpJcLWRcBclInTC8o1mXupM4eWW4XZ0lpkliPujJu2AoGiqk4+QfJchzeabPbKX496Ytyiy5iZxdGjmtJzAHG6yv3+kyrN91xGjB1gt+Lpui7/+hSXMSCPzos9vcqfBCaqjC08xbrrvlqNoKaBA2mzLfDPziFR0S8LxAKW9xEdZIH3+ecRoSq0+cxBjXq38vFSVethyOD4ID9QDVPy2F3/lLEaiA6sJBqo9DUszOSi5iZruPks2rOS/HMomcN/l+AsPWviPlb3T2dlDP98h83fkSTei44b/u7M3YyyT8jM6tFNb0qsvzES6tvySl4xtHDDCKFYTmvWdGE4IEtWUOttY9fuC9vmAP1bYvUpul3i/KGYMZaGBJuMBeHLyPOJoySFjeRMQMMPyNoftznI/JBYa8VkLBaNUM4R81o7rYm/m5I6+nrOvRpYx7srOfrTRwoxT1HYB/tBMfXlTHgBhFs52eQUXt0EO+7VRl6GaHXUFTawFwsrFuoolGxC/2Xg7MSRFgamThkM0CFvwusoex5wFEvJUHvQjken4IhzBYtB+uWowvhI4fr1iJyB8m710AhzhW2X+KOEIT+Jrap53B1FqmrqkR+M0OgLU6tSodBgZmk9tkx/z579Jk8xSo= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 16:29:10.6517 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 066fcf55-d87f-42d3-e4af-08dce6ed2c8a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH1PEPF0000AD7F.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4204 The RED test uses a pair of TBF shapers. The first to get predictably-sized stream of traffic, and second to get a 100% saturated chokepoint. To this chokepoint it injects individual packets. Because the chokepoint is saturated, these additional packets go straight to the backlog. This allows the test to check RED behavior across various queue sizes. The shapers are rated at 1Gbps, for historical reasons (before mlxsw supported TBF offload, the test used port speed to create the chokepoints). Machines with a low-power CPU may have trouble consistently generating 1Gbps of traffic, and the test then spuriously fails. Instead, drop the rate to 200Mbps (Spectrum has a guaranteed shaper rate granularity of 200Mbps, so anything lower is not guaranteed to work well). Because that means fewer packets will be mirrored in the ECN-mark test, adjust the passing condition accordingly. Signed-off-by: Petr Machata --- tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh index 316444389c4e..f4c324957dcc 100644 --- a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh @@ -137,7 +137,7 @@ h2_create() # Prevent this by adding a shaper which limits the traffic in $h2 to # 1Gbps. - tc qdisc replace dev $h2 root handle 10: tbf rate 1gbit \ + tc qdisc replace dev $h2 root handle 10: tbf rate 200mbit \ burst 128K limit 1G } @@ -199,7 +199,7 @@ switch_create() done for intf in $swp3 $swp4; do - tc qdisc replace dev $intf root handle 1: tbf rate 1gbit \ + tc qdisc replace dev $intf root handle 1: tbf rate 200mbit \ burst 128K limit 1G done @@ -602,7 +602,7 @@ do_mark_test() # Above limit, everything should be mirrored, we should see lots of # packets. build_backlog $vlan $((3 * limit / 2)) tcp tos=0x01 >/dev/null - busywait_for_counter 1100 +10000 \ + busywait_for_counter 1100 +2500 \ $fetch_counter > /dev/null check_err_fail "$should_fail" $? "ECN-marked packets $subtest'd"