Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1834924rwd; Tue, 13 Jun 2023 15:11:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6f2CnoxD67tIYqVjJxfs5RtdQPh9f1oIYkDwToS5QOwPQV7FdBHxZ+aE1SFwd+kF5MyBAc X-Received: by 2002:a05:6a21:3394:b0:117:497a:a936 with SMTP id yy20-20020a056a21339400b00117497aa936mr52178pzb.21.1686694289026; Tue, 13 Jun 2023 15:11:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686694289; cv=pass; d=google.com; s=arc-20160816; b=HHaH+IJeC8210e5FhBHsqZvP31cqFI74MYMWqIiIBwU02VB00QHDmjTp7IcxyP16xz 2NjMeZFSotiRITY2r9vhwtTkzMoaxv98DtEFAMdkorxyqaJWMSBjsXbbF9ksUv1VR6nX 80nn+DiDaatc8aTxqHtrjun0nS3xVuXCeZsic2ynC15C/fTePUKRuj5SXN3ozEcn6Mmm /kvlerhXezPpR38YH1aBMQRYcPtQ5xAaDVMiw9HXJEiruKzmnrYpycVkZ70Zrzw1gArb 82m2AQNhBb38I17Pns1VMIstLIpw+kogwHer2FHQCUh+bGfi1LKbGEI6zwgvoWhPaDoK mzvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Hn3UpXO7Q00pu73vp9aNHjp4lHyawb9kYjNGwhFg1Go=; b=bf4NT3PoEQfb4LWsz+BiyQtihuOozecCUu/U5bwYOTPSMeuA+iHxOrl757GRSYZu5S AaGeao0QRGjc8e2yx0u1rKrk/jYBzWKmPeVrYfwT9CznhNlCWK5cYhWpiMTYCsDf+P2D 11Az/clJRPN4c5nRc5SZ/oQGXPx2HyKVhmXr/FFG3aFxt3mBRJ7Ih4QDCV1RktY43ZAc 5ENu3m5CkdZ6rC+l6LjWHco5XhDO913NG6Xd/eyG8RyE/QlgmigmQgu1YwF9gMwGz06O gj2izOSZIbaXNYkuVSpcEE3/HP8hewMvri0sYuIYnV1CuCHkWAP+t4BL83QmlvQzuZaL RQgw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=PApYOyTp; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p129-20020a625b87000000b00648019bae38si9292976pfb.277.2023.06.13.15.11.15; Tue, 13 Jun 2023 15:11:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=PApYOyTp; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240276AbjFMV5y (ORCPT + 99 others); Tue, 13 Jun 2023 17:57:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233934AbjFMV5V (ORCPT ); Tue, 13 Jun 2023 17:57:21 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2076.outbound.protection.outlook.com [40.107.22.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F06C26AB; Tue, 13 Jun 2023 14:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MIuqSQ8f+1PYvrTpLUjUVv9IktO/rsLTYu3QPbQAEa4FV2MopKbmwsX5vmEhBxjSeT5hGl+xkcaqv9/78EqhLFkduVYfO1S2mCFr8gt6SmiLwjJivBZINYKMAMMVBJ3RCjiemNioF9pIILN3ZGokG9KotEx8W/dChqCYUmH/wpfVPZ8RTycqpK+dq4xJd7nwb4i1R/d5XflOE/1yP/slPhoIUlfLHgUibrLTEgpaB0x/TtkC+ZCgnmOdoOozwPYlbLo/5bNH2Csu0cI4NF6ZMWGKe9pkIxkxpqkmi2P+nMoUMB3/vZUmnoJykqRV00CLW+Yg15e4EjMyUmgFcOri/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Hn3UpXO7Q00pu73vp9aNHjp4lHyawb9kYjNGwhFg1Go=; b=ljyQPAlN+weF/gLkA5IFNsOmcl9LNluBiCVHKKJbHOx/hPaCYscJYK8gPf/2yv1A6Ehf629TQ+HRmGKiuwonCy59s+AolTJsRY/+dNu+FeTKnBUhjP1SCJBTolqFxXnIQK2pyJLt3KMCaj+L9C8CJpjfF2njRN9uG7yYgysr9R6kAVtvnDOJVNB7i9MbreT3XWvolbjFfg93yWaikNOCVRwnkXM4LaXm5WPK5vb1IvuxIm3/JPHJxIsriFsdq3nXAAubWxPGiD+0rkTRqjYWDBL64Siblr+r1rdSiSGBGThRTGRH2YSiuXdAoW/kz+TTeBzwBO0TsSbF5guAZZiozA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hn3UpXO7Q00pu73vp9aNHjp4lHyawb9kYjNGwhFg1Go=; b=PApYOyTppmBbg7Axee/EN/5rLLspGJEjokgiZes6Qisbr1ozxLi5g6E3KZz/BjNPW5n5xZt4rEYGXnt6pjJeeQ7IVeAcfRER5FMIIdq5/etfcoyiF+zq/saj08m0Ha00DUfsnxvpFD6+aijUTE37ME2BcZHUQSyzj9Rx2+Yngv8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by AM9PR04MB8081.eurprd04.prod.outlook.com (2603:10a6:20b:3e2::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.29; Tue, 13 Jun 2023 21:55:02 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::c40e:d76:fd88:f460]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::c40e:d76:fd88:f460%4]) with mapi id 15.20.6455.045; Tue, 13 Jun 2023 21:55:02 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jamal Hadi Salim , Cong Wang , Jiri Pirko , Vinicius Costa Gomes , linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, Muhammad Husaini Zulkifli , Peilin Ye , Pedro Tammela , Richard Cochran , Zhengchao Shao , Maxim Georgiev Subject: [PATCH v2 net-next 9/9] selftests/tc-testing: verify that a qdisc can be grafted onto a taprio class Date: Wed, 14 Jun 2023 00:54:40 +0300 Message-Id: <20230613215440.2465708-10-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230613215440.2465708-1-vladimir.oltean@nxp.com> References: <20230613215440.2465708-1-vladimir.oltean@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM0PR04CA0044.eurprd04.prod.outlook.com (2603:10a6:208:1::21) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|AM9PR04MB8081:EE_ X-MS-Office365-Filtering-Correlation-Id: a4a82d6d-17ed-4dc6-5a37-08db6c58d722 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nvUdjeURrhh5MeDOyFsQ1IeSQAq+T5BJjcNi6A66BARaz5bcvMYaucoxvML4qA1E3TPLHMXsMU7lDr7kXkcbFhmPNlaU2XMwRz49iAOIK6BXGf9C9FG4t62HN1WyE82PYBo2lQwSsOth+3NCtRrS4xyoTE3KTsFp5iypmhdYOxzN3x81iN3oNnHy18GYeLsVZ0vNxval6kyV2BKKEcPDQdRrDhh//gR6EJmyvCUKJqm+8xs7cZGlEWpwvCkl1djtKIdgFXcmPk9v00R6wgjQmyUMKYALKm2VJPYYiseMBDEMQj9by4HzPxJh6ovUsV+TuR5EXSIQSmCr5MPEotgHarPQjLuOhRJ9Onl9N/kl25pAufBp+EINo8XvNLLGPIy2f3Ep600WbqU6XKPegSxh1W68JmyuGwN7dL0TQrULsGXY3yLVtBx6gqPf2ZOsEX9YGwzDcopjsOhsOtkXwONX+nPlauzPQw3rwZGuhMJKFdDvVveRLqMP/v6hCi2RBUadnd++6/3utezNhTt6jgdXuvXFd2y2z0SGV+XrauBzrC8foM0kbHK6xQqzNu0INdBpE1OOFFHr+t9Yp4QDfOkpvEBjLRjU796/RUJrK4jH5SDi2+7j5kkLbh0Xvuq74ZX9 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(136003)(39860400002)(366004)(346002)(376002)(451199021)(15650500001)(6916009)(66946007)(4326008)(66556008)(36756003)(186003)(54906003)(478600001)(2616005)(2906002)(66476007)(8676002)(6666004)(316002)(41300700001)(86362001)(6486002)(7416002)(6506007)(1076003)(8936002)(44832011)(83380400001)(26005)(5660300002)(38100700002)(52116002)(38350700002)(6512007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6APviM9EZjXSD7y90t+V+aXQjlPyzR5o8XkEpFk50NRRpg/QHI/SaFYO0WyL?= =?us-ascii?Q?Pt2YfVzL1ngxEKOazO6l5UXxqN1evCI1atSFBF92Q/yo9m8SB1Pm5mhEkHmP?= =?us-ascii?Q?qkLespf7edMsnoN146QnT30nsmfLuSHq/1tZls3ZOQ5vgNzlVnS9wZL+60Jw?= =?us-ascii?Q?2P7yABwj02o3Li6Smfobx77nSYDRdqT9zEsjliaiBQu1Q8/sLIEx9LEhydGm?= =?us-ascii?Q?/AiRnDFiJo67z8CDavsOfO68Snzbvoyb5gH1sW9Nm5v6gX37RMkp+N24Z+23?= =?us-ascii?Q?RDq+T/VUQsi28vR2N8BEQE4Bi/gMp+cNzwD5NT3Ykgjt5v0L08GR837csv9x?= =?us-ascii?Q?2SaRjJl8/jiylbsGllKvALQkQG0lQA4hjeZLDT61Mn+pXHMTYP0NvDzkCy/X?= =?us-ascii?Q?Fy73XJr2BqCAKmHZ+G+OhUpAduDJaaBfgUKF93l145Lyp6M6JbdwrE5jL2ow?= =?us-ascii?Q?2oQi2lirUp0MO3k8jzMDxL0dYdKw05gvB0svhbIihM3XdZxhQO1DrX/tPHtk?= =?us-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ZpFzPjjRPnegoTWiiFK0eBmdlXr8?= =?us-ascii?Q?h3EwXZu6KSEfUktpn8u9ycfA9nzXf+/UrSvqIgBAQMfxnjbzA7/APweRVX/9?= =?us-ascii?Q?mKu5EmqjpzIKW9ZUfPIsqKVZBnXrDLxE2JSzjs+6Yrf42PhJGxOfytwBZA6O?= =?us-ascii?Q?WLDOKbYLRlxqmep7I2EG6fzW+hrl2BPbjX2LfWrIirIq3qMYsRZxxCfYHjjh?= =?us-ascii?Q?Nw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a4a82d6d-17ed-4dc6-5a37-08db6c58d722 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2023 21:55:02.6724 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8pVfWFRrPhUJ2bB/6gIXH+DMfTtRM4GIhAQulJ7paTHnU8KORpYzMXnRVWvEfWEECSGqkdZxyElZYS6FMRc+gA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8081 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The reason behind commit af7b29b1deaa ("Revert "net/sched: taprio: make qdisc_leaf() see the per-netdev-queue pfifo child qdiscs"") was that the patch it reverted caused a crash when attaching a CBS shaper to one of the taprio classes. Prevent that from happening again by adding a test case for it, which now passes correctly in both offload and software modes. Signed-off-by: Vladimir Oltean --- v1->v2: patch is new .../tc-testing/tc-tests/qdiscs/taprio.json | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/taprio.json b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/taprio.json index 58d4d97f4499..47692335bcf1 100644 --- a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/taprio.json +++ b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/taprio.json @@ -179,5 +179,55 @@ "$TC qdisc del dev $ETH root", "echo \"1\" > /sys/bus/netdevsim/del_device" ] + }, + { + "id": "a7bf", + "name": "Graft cbs as child of software taprio", + "category": [ + "qdisc", + "taprio", + "cbs" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + "echo \"1 1 8\" > /sys/bus/netdevsim/new_device", + "$TC qdisc replace dev $ETH handle 8001: parent root stab overhead 24 taprio num_tc 8 map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 base-time 0 sched-entry S ff 20000000 clockid CLOCK_TAI" + ], + "cmdUnderTest": "$TC qdisc replace dev $ETH handle 8002: parent 8001:8 cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470", + "expExitCode": "0", + "verifyCmd": "$TC -d qdisc show dev $ETH", + "matchPattern": "qdisc cbs 8002: parent 8001:8 hicredit 30 locredit -1470 sendslope -980000 idleslope 20000 offload 0", + "matchCount": "1", + "teardown": [ + "$TC qdisc del dev $ETH root", + "echo \"1\" > /sys/bus/netdevsim/del_device" + ] + }, + { + "id": "6a83", + "name": "Graft cbs as child of offloaded taprio", + "category": [ + "qdisc", + "taprio", + "cbs" + ], + "plugins": { + "requires": "nsPlugin" + }, + "setup": [ + "echo \"1 1 8\" > /sys/bus/netdevsim/new_device", + "$TC qdisc replace dev $ETH handle 8001: parent root stab overhead 24 taprio num_tc 8 map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 base-time 0 sched-entry S ff 20000000 flags 0x2" + ], + "cmdUnderTest": "$TC qdisc replace dev $ETH handle 8002: parent 8001:8 cbs idleslope 20000 sendslope -980000 hicredit 30 locredit -1470", + "expExitCode": "0", + "verifyCmd": "$TC -d qdisc show dev $ETH", + "matchPattern": "qdisc cbs 8002: parent 8001:8 hicredit 30 locredit -1470 sendslope -980000 idleslope 20000 offload 0", + "matchCount": "1", + "teardown": [ + "$TC qdisc del dev $ETH root", + "echo \"1\" > /sys/bus/netdevsim/del_device" + ] } ] -- 2.34.1