Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5904032rdb; Thu, 14 Dec 2023 03:07:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IH415wokn5y2OA+S/84JFaTweyZFuBnwXrX5js4VW94RYPDDr0Xsb7fzv+HqfYpCcaYidpp X-Received: by 2002:a05:6e02:1b0c:b0:35e:6ba2:5359 with SMTP id i12-20020a056e021b0c00b0035e6ba25359mr11169693ilv.38.1702552049235; Thu, 14 Dec 2023 03:07:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702552049; cv=pass; d=google.com; s=arc-20160816; b=Yuoo0FiMWRucuNmN7J/t7LIR1n6FYjrjX7dA5ZkfQ9i/jt8+8ltCRSbqV8pfx1GwGP BZ2fA0NNWbT1jSKZX5WFFfk7qumBS69L8bRYeoE6N4VKeWP4YYARYeNSw/WgLte6DKBT Nj6x4I3aGPUS97OtszfNbkIo65UMMaujwXxjOn17Wy/SfLksXXP4eAmRLvtBVa65oZIE tHwpGy2u+x2uc34Vm5jodkEZOv+al40YI5KQUhm0oyBVH3IMaKy3Nj1xT2CoImDoK2fb MD2CJNHXrjV7HwDV+E2YaHdb2uZ7yyWmHjxpBAIp7u8GSvD4qbzBEXzty7xIrTVgVyZa Tn2w== 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=9vMhvVFsqz+3UhDuTSNpeSgl9cRGfiLAapnhP1MpaLY=; fh=R1WjcUT4ifKZtYM9mQ2/hfpqLCcEMWgaQim+nFBSO8M=; b=KQUv9jaIXi/N0kRcawycXGP5vlH2ebNz4XTX4NajBB/n9/bxODXUlIryJv/WIGGvVf O8DoPmfFwF2TjKk7gMH8+yjFU95ylRIVT1wmlBDcfklua1gOGxW3GVsTNF9+kselXUWH mhsxY+OB3bqQgAcvt8weAcml30wkaRDgBUliIAOSfrgzspOq0U4HILNif8z7qLhZnA+w IdK0lQunJ/CcAiUWYh6BHmfn7cK0jQSWK+fZYImehq/kKBnp0mr/Wd6zRtEgPLKscIMv KLavlQSajXRiJ9MmYN1oF/Pk14oLV1mQTxgnuoPQzPIpcslrPmJvH+7YiOmBNhs1JfXt vPKw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Y7mHwu2D; 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 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id c17-20020a631c51000000b005c657587706si10920679pgm.228.2023.12.14.03.07.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 03:07:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Y7mHwu2D; 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 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id F08828233655; Thu, 14 Dec 2023 03:07:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443958AbjLNLG4 (ORCPT + 99 others); Thu, 14 Dec 2023 06:06:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443936AbjLNLGu (ORCPT ); Thu, 14 Dec 2023 06:06:50 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2068.outbound.protection.outlook.com [40.107.21.68]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EECE5125; Thu, 14 Dec 2023 03:06:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GAAdKDFUtS3Co9b+DOIKkfZ8I7p00ZOtb7IZ0TN1Zc4sOyBa7ByTIZrkZ5l7UeDAM5vbYGH6qEKVo7BKBxe8g9dDpT7DYtkGg73I1EHLPTSj/XsaDr3iTRkb0tSgHdW6lGDgFY2O7nlTGbiYEV22m3oY3fpIaI7wTTzZRjH3Hgt5xr6CSEJEvBytAHauxPqiWMjlRfpYJB/Vztef3eT+tkS/G5Zkbj1ojV+ZWhzqayIs3mQk9QHXPzFLHjimDf1Tx9gfZSgWq1OnmaFKkAeZR5qY8VhpeOkgTcQYP4V64Niwck3AgPSUf1EiOuK4c0ziRCoCx2jGCGSJeJgkAcSG4A== 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=9vMhvVFsqz+3UhDuTSNpeSgl9cRGfiLAapnhP1MpaLY=; b=XUJ3nweSEty+hbbGVUcLd335Dsld5Z6Jl4jj9LHf+gjipuEiAqmLlrrqlBR9E1plfwJdpKVqVRNL+TYxC8hnL4JLBzrKegVohZxi3WsNidLzP6JPZWsI0bKO2PxYGGyfbG0BhsosP6FxXGXgg9L4CCyWjpYhp9LByLoCXfdkLEGegLhz9AzqsQJLluQAF8nGAV6A4OE5P8bWZmnx4wj8RNQUeuVPb99Hjlpb9DmF+KLTyKfIH+TJ4UiujlcZJxnJf9TNi4BOhgC0gJW/cOTM/7hTBLi/Px2xouXSBlK872mnUFSNSmKPQOYKvo3v1NOZNnYbq6KrFuyE49iuQ3fUvA== 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=9vMhvVFsqz+3UhDuTSNpeSgl9cRGfiLAapnhP1MpaLY=; b=Y7mHwu2DfogBy3JRBSlLn1Z9xpTdnPuT4u3CltqxN1EGpuRafqYibifNsOOdIhbw+ORWz1Sw9nwZN9oP5zeCOGyq2bWqn5F22tt8HdHrTX/Gj7k3SDDp0WM+CLXUuhJh8v2XR2Qyvc9bM5zRdsAztGTCSmff6V2fepb1xkSmX5Y= 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 GV1PR04MB9070.eurprd04.prod.outlook.com (2603:10a6:150:21::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.28; Thu, 14 Dec 2023 11:06:52 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dd33:f07:7cfd:afa4]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dd33:f07:7cfd:afa4%7]) with mapi id 15.20.7091.028; Thu, 14 Dec 2023 11:06:52 +0000 Date: Thu, 14 Dec 2023 13:06:48 +0200 From: Vladimir Oltean To: Roger Quadros Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, shuah@kernel.org, s-vadapalli@ti.com, r-gunasekaran@ti.com, vigneshr@ti.com, srk@ti.com, horms@kernel.org, p-varis@ti.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 net-next 08/11] net: ethernet: ti: am65-cpsw: add mqprio qdisc offload in channel mode Message-ID: <20231214110648.n7rz2i7qobikavtp@skbuf> References: <20231213110721.69154-1-rogerq@kernel.org> <20231213110721.69154-1-rogerq@kernel.org> <20231213110721.69154-9-rogerq@kernel.org> <20231213110721.69154-9-rogerq@kernel.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231213110721.69154-9-rogerq@kernel.org> <20231213110721.69154-9-rogerq@kernel.org> X-ClientProxiedBy: VI1PR04CA0052.eurprd04.prod.outlook.com (2603:10a6:802:2::23) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|GV1PR04MB9070:EE_ X-MS-Office365-Filtering-Correlation-Id: aa51e1de-7c5e-42c0-25b1-08dbfc94c695 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iXAL0Yo3xO5AWtfx+0yr2x1r9wUA9QVnOyhrBtfv3vFoFI22RbXJzf+jecIc4+qWC9E3KxlI9pwuDVzYY1SaKUmTw7T08HBl3FgVMau7sdD28jadoMeJ/+uTYHV6MutGiDoGJG8ZujyJQnQEcWBpOHPiL0oFEUKGYVoHE1By1Pt1iLJCQUa677Nn4iw7jFN4n3g8i41UAlqnrPc9G27MDNNJ4PwgO0KUomJslNBaB+9rDVes17VROfPFu966uAZcYYSiZNYsiIpXFAijaFS2HzzThrrYoPZZxMkwvjZ+xnJ30owxCRBbuq+4rsxorhofbzWvHm06oGaZ3UzsM9u/xNhPQN/41LJoDhs35sd3N7/5FoP5tqqA4X3bKbtVS0Cfjz7JdbAti3sOv62uTQhLi9ABBqRT26h9BW6jVVN+cAF846v763aj4GT9fffN30lCfxPVma8GMpkRB5BEihgnUQJC4A+FPS3lIhsqkLSybSHlRkQD3HmKJUVfgeuW0VmcBAK8s+RQJF1aNlAwFvBS8JxWiKPtrnUknqpUH/23auCl19M44Y07K5AYlqvkbLwA 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:(13230031)(7916004)(366004)(376002)(396003)(39860400002)(136003)(346002)(230922051799003)(186009)(1800799012)(451199024)(64100799003)(6666004)(478600001)(6486002)(38100700002)(26005)(1076003)(6506007)(6512007)(9686003)(2906002)(8676002)(41300700001)(8936002)(5660300002)(4326008)(7416002)(86362001)(44832011)(6916009)(316002)(66556008)(66946007)(66476007)(33716001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?y8+UQ6wjompOJBrGwsb8FYPOl6sK6O+BziZ5X3MTA0gL9n29llkILd0KQpwp?= =?us-ascii?Q?nnEg4Enn+BmQxQwn3jDSfDeQt7YEaofDgibEkmzdT/7gYuMFiHRlKIhi8BoP?= =?us-ascii?Q?VgZuQdNpVink/LLStHIAHwxlNdjrQVHrUqBIbgwDJJ8o6lhcnlkXCQr95cRi?= =?us-ascii?Q?V/jxksfqqaQGzyiMDqqZjM82aqevAb+Jn2SaY/LsrPZRo0wiVbfbtXa9CkC4?= =?us-ascii?Q?YO8+CRg03LvcQGtX2c3Idou17ZqcgHOkCKQV6iVirGJkbRRM+kNoLyfuwowH?= =?us-ascii?Q?d4tDpHtw4cvNCNthK39aATdPvSYUjBEhDxrv5cO+GtRCwQulRMpkJBjqEN+Q?= =?us-ascii?Q?Y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?= =?us-ascii?Q?F2Rdy8boeu6w2muJEyr7yU+cESIME9DQAhnQ6oRub8ynl+w4ng2N9bgg1NAs?= =?us-ascii?Q?/MaG960/PnWh1sK0jVLMKsDXp1DYn7JKwmkOsjKatzkJzQJ3WKLThudqYUmQ?= =?us-ascii?Q?4wvT+8JD0PiHPCPXj5hr2IcGOruMFdvP1rzBiVloER+8qmICOY+Qg1JPEnie?= =?us-ascii?Q?PHeJ9/UzlkwSOekrJSyNHToo7bNSE9l8TzYrQkZSId4n88MvB6p8zBchYTaq?= =?us-ascii?Q?2IhVxHgYHMq5BjYY3sWDsn/aGLKRUlqgZ+JdhtGnaurq3vNcpZ7ti9XiB8Oc?= =?us-ascii?Q?aAmNcbLlpnyKZZb0Zj3WT8TSlurV1ZAU9Da44vyd6nuogdxcr8I7JMlduARB?= =?us-ascii?Q?jw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa51e1de-7c5e-42c0-25b1-08dbfc94c695 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2023 11:06:52.1393 (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: wUXsB1p5lfSx7FI3VEnVh4wr74EFFfPlgJ+F+A8YyGDAqKsD5+U1RLnAoCGBhsH2ulKxI//Wr/c0vJyXyUJL7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9070 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 14 Dec 2023 03:07:23 -0800 (PST) On Wed, Dec 13, 2023 at 01:07:18PM +0200, Roger Quadros wrote: > + for (i = num_tc - 1; i >= 0; i--) { > + u32 ch_msk; > + > + if (mqprio->min_rate[i]) > + min_rate_msk |= BIT(i); > + min_rate_total += mqprio->min_rate[i]; > + > + if (has_max_rate) { > + if (mqprio->max_rate[i]) > + max_rate_msk |= BIT(i); > + max_rate_total += mqprio->max_rate[i]; > + > + if (!mqprio->min_rate[i] && mqprio->max_rate[i]) { > + NL_SET_ERR_MSG_FMT_MOD(extack, > + "TX tc%d rate max>0 but min=0\n", > + i); > + return -EINVAL; > + } > + > + if (mqprio->max_rate[i] && > + mqprio->max_rate[i] < mqprio->min_rate[i]) { > + NL_SET_ERR_MSG_FMT_MOD(extack, > + "TX tc%d rate min(%llu)>max(%llu)\n", > + i, mqprio->min_rate[i], > + mqprio->max_rate[i]); > + return -EINVAL; > + } > + } > + > + ch_msk = GENMASK(num_tc - 1, i); > + if ((min_rate_msk & BIT(i)) && (min_rate_msk ^ ch_msk)) { > + NL_SET_ERR_MSG_FMT_MOD(extack, > + "Min rate must be set sequentially hi->lo tx_rate_msk%x\n", > + min_rate_msk); > + return -EINVAL; > + } > + > + if ((max_rate_msk & BIT(i)) && (max_rate_msk ^ ch_msk)) { > + NL_SET_ERR_MSG_FMT_MOD(extack, > + "Max rate must be set sequentially hi->lo tx_rate_msk%x\n", > + max_rate_msk); > + return -EINVAL; > + } > + } Netlink extack strings don't need \n at the end.