Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1202080rwd; Wed, 31 May 2023 10:42:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6boy6VVSG0zS3V9D02BRCDDVEZDgTQ3i9CSU4GhQg/4wupv5wHUbmk57mZd9wlmaqBPpmO X-Received: by 2002:a17:90a:b298:b0:256:614f:d39f with SMTP id c24-20020a17090ab29800b00256614fd39fmr5499180pjr.5.1685554941101; Wed, 31 May 2023 10:42:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685554941; cv=pass; d=google.com; s=arc-20160816; b=RdynF5lwVp77E0jqGdpEjkZX9PGqOffdcoNsxENMGI5XWgwQxC8a9ofZ5DTFJUB2jb jfQU6Xf7JBQo2uNW5tjmMUGVfQTcuHe+ywgLUYeh6GZmJ0eGU1NAISKgM0RaN2SSXNdF KhsBAb5oZKdmWZexjFFlm+qZKPD8wKI+MrHOxLOkZxoxaOHz+kznQD+1I9BbRshXnocQ /oNMdFgn8ayDz4TRmJKiLbJz0sMWcxPcgFmHga4lfcm4RIwZohgO6ZNgIKeaFFSD8cFb /vd5SDTgQJiLbvJFCHLzLblQNAlWzASbsZbTi/KJCLsLjL2jH+5OVViIKsV+QkB2pNhj OO7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZQlh+ANcOvNl51W6EpHFYqOdFQUboyT3PuwDcdDOZCw=; b=Qy2SooBfwrEzxL9aiYoJAUiIwcU8kiZqSHOBIxcx0G5EDgKTcrWOMOcx2iKL2nhVYn JbnfPBZf3hAqG5eKArFTe/veLeHDEGaGao82yw71SBjrHEZG6sup6UBOgcjlJeZk28Th JFMiircfKFr0TQzji/pGGLIOFdBv2W2DTP2jhOcpay4mv7BJ/SJ7aelc1YHVIMnM6EMl 8TWiFa9Twj5Lu0Cj+x5Cb8AnEFcb5RkAgIAW+efytPaBVsvrpUUzIZNG3OJmzta1lWd1 QtOI7trJ6GA8rR2Carw/HdAmHD8v11S4FwfP6X9kgNyrxl2OuDTQoDFNkUELc1Ucqk5L pTMg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=ALsBokl8; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.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=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e3-20020a17090a4a0300b002475bc0a186si1278141pjh.69.2023.05.31.10.42.06; Wed, 31 May 2023 10:42:21 -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=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=ALsBokl8; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.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=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230056AbjEaRIj (ORCPT + 99 others); Wed, 31 May 2023 13:08:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbjEaRIe (ORCPT ); Wed, 31 May 2023 13:08:34 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2100.outbound.protection.outlook.com [40.107.236.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0A3E191; Wed, 31 May 2023 10:08:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZIKRpgAEdHZVY7t01rihYviAhw+F6hmPnBBS2nzUtJnHlyiaqFkY56UAUVxRveW+a2yuiSK/yZjKEqlzFj5Il5nTM+07zJkNRg47xRd3/E/Agj/XSyWgpr6qSO8BRqYiMzqoRY4NOpkMuNOg2UTRxWtAr1XZadErg5AkYlxzXOVcE8z6/jXsyypWr2E9Dt0Z4L3zM30dXlMzknLtQLT0XSe1xJYKWPIe3M7NpAtX9AoUdSJBXK8B/94BvaXgZk5XtXfKxart21TN8HRGASjFG+87QFQOmAeMBdjJY76w85bb4mwNpNpw2Vi9efMgpldi7IDkWy8lEaLbPyvtkDsjBQ== 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=ZQlh+ANcOvNl51W6EpHFYqOdFQUboyT3PuwDcdDOZCw=; b=PjLL5q707Mx1ZBICgQLpgmx05syCy9LD2NTqAdHx4cMo8WOIRsrV0Agnes0ptbJpDjQYy3r93bK4bVrZOfcPAI8UT5FStk/BGBruk0HKKkYH8wigjMVky5cchCrEaasEcRqfZVuxA8HPl7/qhczCg9KvUDhRCysvNOTvYl3HrSDZDxTK+0ryJ7DXWM73aZJpqiIb8rmMDyiYYLREPGXKpi+V33lqDoaPtvrIjJHU01B2vLjF5dc7SmBgfPZMr0+u7lp3wbQPyac3oW0fTHlZUQVLW29eWK3bHBQVAoPLQOL1sOIN2UbHJBR2eHZP9O6EF7MaR7FSUCMQM0RhVURDSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZQlh+ANcOvNl51W6EpHFYqOdFQUboyT3PuwDcdDOZCw=; b=ALsBokl8d+RDU8L5o0g+RIG+FRVMAtkE8ngmErw5llLX5xD6u0qf1q5s2CeX06KCgic0kxiUcEhx3Ri19bw8V18e4Fni8YVTQUf7yc027eHDGYXofTasm7E5rQvH3kPB0MaMISIHLiKivBaJhCJa8XseFV+dzNd0JL9YDPqf1kQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by MN2PR13MB3758.namprd13.prod.outlook.com (2603:10b6:208:1e3::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.22; Wed, 31 May 2023 17:08:21 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::5e55:9a39:751f:55f6]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::5e55:9a39:751f:55f6%3]) with mapi id 15.20.6433.024; Wed, 31 May 2023 17:08:21 +0000 Date: Wed, 31 May 2023 19:08:10 +0200 From: Simon Horman To: Vladimir Oltean Cc: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jamal Hadi Salim , Cong Wang , Jiri Pirko , Vinicius Costa Gomes , Kurt Kanzenbach , Gerhard Engleder , Amritha Nambiar , Ferenc Fejes , Xiaoliang Yang , Roger Quadros , Pranavi Somisetty , Harini Katakam , Giuseppe Cavallaro , Alexandre Torgue , Michael Sit Wei Hong , Mohammad Athari Bin Ismail , Oleksij Rempel , Jacob Keller , linux-kernel@vger.kernel.org, Andrew Lunn , Florian Fainelli , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Jesse Brandeburg , Tony Nguyen , Horatiu Vultur , Jose Abreu , Maxime Coquelin , intel-wired-lan@lists.osuosl.org, Muhammad Husaini Zulkifli Subject: Re: [PATCH net-next 2/5] net/sched: taprio: replace tc_taprio_qopt_offload :: enable with a "cmd" enum Message-ID: References: <20230530091948.1408477-1-vladimir.oltean@nxp.com> <20230530091948.1408477-3-vladimir.oltean@nxp.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230530091948.1408477-3-vladimir.oltean@nxp.com> X-ClientProxiedBy: AM4PR0302CA0003.eurprd03.prod.outlook.com (2603:10a6:205:2::16) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|MN2PR13MB3758:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e23b032-5eac-4bd0-d94a-08db61f9a2d4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: huwoeMTz1rYjn+YOfMe52Job4Ubla0JL9FwQz6MZrzODHtxwvKc64LOC+GbAnm343hzv8QTiL/l676rDR8BLIXmi7tnNgpBbzwfn7J5tPdM8s9hZKiwAerO1BmgEa+l+gn3Pa1KmMjlBTBl5Lb8fw6FAnCK04zf/+ylvW6eW0E/NruVw4ibqsOPS4VTYI5DedhlzZF9Ipz8kFOSMGbDEeeWBr+A3B3v07jz5V07cLCdgZ1FW2CAWegKS+jOYVR81wHht8NNHeyyiCe7z4ZnoakFK8xylgWNbVuIL8R0NylPL8d4L3i+8kNAijj9oVhl1kqyxZEMt2V6+HpBYb0sKueQ0RnADkobfpb4iwW1N5g2AQts0VWq4tdCnIzOEXDjmTISkNFtTce9UicZxf6xISVPkYi/k1LsGnrLU+kkPsJmoVHkVwv3lymSUYC5Xy1WBPwbDpbYZxp8QqWtyUF9DzbnIW3HY7SeGTFjbJvpNLb+RbGYkr447TF0wASVnGYP5WQUqwWoO/NNkgMaB0iAPs6tSlC7fh0WQxBAO2XIWGj7r7BM/MdY5l9W5eiAISh2T7e0H2sxytgEP8i6tdu3M6MYFEir+LFxqAqg641qGi80= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39840400004)(376002)(136003)(396003)(346002)(366004)(451199021)(44832011)(7416002)(66556008)(66476007)(66946007)(6916009)(7406005)(316002)(4326008)(41300700001)(54906003)(8936002)(5660300002)(2906002)(8676002)(6486002)(6666004)(478600001)(6506007)(6512007)(186003)(36756003)(83380400001)(2616005)(86362001)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?bg5KahjNYj2IYeLi7fPOxS85Tnke5FVe8S0H5vlN/yJQbS9NMW8itle5VIzQ?= =?us-ascii?Q?1YPvxqT/OGFlaSTgpwwY/oFAu4pzqqef9FrO++7uBGkpfBZwzK60TffaiBDC?= =?us-ascii?Q?kkjwoLUMP5W6ZYyIBz75nx/RmGcGn5DlSf4syeKGIuY1YVS8Vrd4qgGQaxah?= =?us-ascii?Q?TH5GqCetzqJsljikRX/ct04uNWVTvmLjOFugnfO7KkUaj1grDzv/vPlcAWl6?= =?us-ascii?Q?aHDzu5/RxswAWBv3OzScG1a/1WHjW4PkTvnesaN+ct23MMwsibticDWG8NCS?= =?us-ascii?Q?lCDHMlBrinSUL1sMSfE1mxyWIbeGSsTVPU7KuEtKWyRbwxtfth69E0IYIbNL?= =?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pXugxi9Hn2Y6vfbJFhqGOnE?= =?us-ascii?Q?szSQdDZdx6bt1U8Wm+/6aLUkRnPrda3J9n32nCfpN1V6LSLOtnxsV6KSfVXu?= =?us-ascii?Q?5tWB9XV6oHJhNeHvhK9uB7NbWFOUPOsheeY77nVfzO0MFxJb2hB788Hlj9pn?= =?us-ascii?Q?cAX8wFYPdh3GxdTsDO/3Vd2FpSS83JU+imtPf4vAffmbDmjLCU6IIBXwmwa4?= =?us-ascii?Q?5cDQ7yHt5bApoulXF48tPkmFl/FUMvguaKw7Z4LiPvLoqy/8AKkerBmKZ08B?= =?us-ascii?Q?Ufy5xgZKmk+6BC+76IBMpmCXyCOtHXxhJ7XmoVfwApmvFvDtZupihDxj+sUi?= =?us-ascii?Q?pfjcttvhI2deAKeQQiXVOtM1C6l9l48jgv2pgW2s8kw719qyGwc5MXPATVm5?= =?us-ascii?Q?UM7hBvx1GvOFI/QpawOvAjgS/mIfn0Fr/WkyuKenwgsy2sWa7lOt6zY7I1FF?= =?us-ascii?Q?7eWjYQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e23b032-5eac-4bd0-d94a-08db61f9a2d4 X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2023 17:08:21.0977 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FCd6RnTiuUotpy1/PeeO9ZxcAs39SISZfptxVELNuvztXQYX/r4zVARMnQt1LN85azFVZIiltRXqmAIbEwFvbtDgoBigtmXHcZSgwSgl2zc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR13MB3758 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 On Tue, May 30, 2023 at 12:19:45PM +0300, Vladimir Oltean wrote: > Inspired from struct flow_cls_offload :: cmd, in order for taprio to be > able to report statistics (which is future work), it seems that we need > to drill one step further with the ndo_setup_tc(TC_SETUP_QDISC_TAPRIO) > multiplexing, and pass the command as part of the common portion of the > muxed structure. > > Since we already have an "enable" variable in tc_taprio_qopt_offload, > refactor all drivers to check for "cmd" instead of "enable", and reject > every other command except "replace" and "destroy" - to be future proof. > > Signed-off-by: Vladimir Oltean ... > --- a/drivers/net/dsa/ocelot/felix_vsc9959.c > +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c ... > @@ -1423,6 +1423,8 @@ static int vsc9959_qos_port_tas_set(struct ocelot *ocelot, int port, > > mutex_unlock(&ocelot->tas_lock); > return 0; > + } else if (taprio->cmd != TAPRIO_CMD_REPLACE) { Hi Vladimir, Do you need to 'mutex_unlock(&ocelot->tas_lock)' here? > + return -EOPNOTSUPP; > } > > ret = ocelot_port_mqprio(ocelot, port, &taprio->mqprio); ...