Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2805266rwd; Wed, 14 Jun 2023 07:33:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7b/dXFoccqcJ2HdFIDin2K3LPT7+/qmJOlygIKOfohrz95Lj+i9QGPJ2pFCkS8RZL7SWmX X-Received: by 2002:a19:711d:0:b0:4f6:133e:a0e7 with SMTP id m29-20020a19711d000000b004f6133ea0e7mr8079393lfc.24.1686753238641; Wed, 14 Jun 2023 07:33:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686753238; cv=pass; d=google.com; s=arc-20160816; b=qPYAFfMl2T8mP1TNeWTy817yu2MwVipfyjYIO79/m08EOO4GE8OXGCXb1QbXJP6xrl YKHpterMnuvi2MfAtBCH+jScO+KdUMjNS1M22bdI3XPmTv3GHfXjk9rIIRD/W5Rjpnpw 6mmyeSlZ209Ke5rubVgqd6N8nc7bTAjyHY3R2oIrl7iGZhKrk0b5tDGpQ3AQ6JrM3hEz zHZo0RoYuTsgWLsrCldreWnZeKU2zedu82y/GyuULTYiJB1OkGP2F4UmPV6HKt5JTyCD +ZIAt5sPDrrAAy4UXBAjmI8Qj/4XaJaGFZcFdiUWrXdsN0wGbQXxUJ1JlJ0IDLfG9S4G eL7w== 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=nvBU8h0ZPajUbg7q8YDQqmvNRCQLNdo9gjORyxnx0hk=; b=R5JOlJoq4PZtdEEkRpkzMjL/xQE9+F3zFdCVx3GwzcKIoE3NbNFe18qU3Ur7ped/5J sWa1qSGpP5gJ0NCPPZ2nw3khfXFyiUYpo66UN63kHmQUTKQ/jWOK8cq/Y+/z5VbMJP6v bvbtCgSoUWrQLF0DusrvoWLoLO1B+/2twfADC6l46iLCbdjLRumcxerrABKMk+/tsCNl fEHS6Psfacqe8cQZBBCuFbpu3TE5FLH1B6QxgU4BHIqLEKTkF/w6MFjngdlJdc9thUz1 9AKGIQCzn1kNTnsM2s1EdsIvYOW/gAy8xW+4kFvqQGGDt5Kb67ha03/KApEPVd6UUXL4 yQgA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=bvVVY6Uf; 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 u2-20020aa7d0c2000000b0050a021d39besi8794996edo.454.2023.06.14.07.33.08; Wed, 14 Jun 2023 07:33:58 -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=bvVVY6Uf; 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 S244953AbjFNNQ1 (ORCPT + 99 others); Wed, 14 Jun 2023 09:16:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245004AbjFNNQJ (ORCPT ); Wed, 14 Jun 2023 09:16:09 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2105.outbound.protection.outlook.com [40.107.237.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A10252108; Wed, 14 Jun 2023 06:15:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JG4hm06dihVYI8pPOlxNJzlKMolxrDX50woES2QS5yf3cKhm46yymixXXfu78TgFiL4O3FvGY8O4yoN6k6IF79Xs3TrrlYT2eisNvJeG4XHLAn6ECIs+XN0UAc9Quah1LK5ltbDeEPOPaAnGZAUiXX8eZyonTLDbMZGNdCZ+H+Usb4j8Hdy156tTLQ47/a4dcxhEyJO0voUnbgLMWhh3Pgv7BPJD9cIjJbhkZODi+vLcGEIcSAIqh/EzDPjk3PiL6XHw1DudD9WXkshpgTIiDwFzou5Pa5X/Ue/7uqRQo5jpCrz3IYgYfJAm0++S0rwrUOSDmC7kLGorxoR/OY+LLg== 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=nvBU8h0ZPajUbg7q8YDQqmvNRCQLNdo9gjORyxnx0hk=; b=QC7yWgaRvzATpwa3QvYwAgctszwVdBzVUqaSpAOfoHu3NFMjMX96Ibk8A+kO3JvQWNc8CE5uvx7k36WDcCHHxX+ILyW/E3Gstfvh0okDllR2lzxSN97Tq03r4R/QQlI7ktUhv4486a5/g5iBP4gEnqyRF+EJ+wcoJxCDcJwKyw7o/42/h8ob5vicxUndwujFd6rxfxYp9bqsqzgJZL9oniKqDLB6zdOuHuQodYoK8Zrlp2envrOmJF+NYR8Z0+qjWSwYZv3XSi2cAcp/mOQsbijjVWlNqYSEHI8VbJ2wCJHsHWGtavnQP5pW/PjBulsELCCfnPbHWnMn3d1/MQr22w== 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=nvBU8h0ZPajUbg7q8YDQqmvNRCQLNdo9gjORyxnx0hk=; b=bvVVY6UfE2kbVSgGO+++BW1yVnapZqqNnzQVpU9oCyBBdnAJsY0tZU14Ijcep2o4yL0e22ILfBb8RrEitA9rTQskR4eW3jLeOjfE/B8I8xktpYDNEwJFTwfLX2Cf1zNL0cN9pzj6eXh1zvfyJg3QD2pfMZt+MJJh3rgPt+DhfSY= 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 BN0PR13MB4565.namprd13.prod.outlook.com (2603:10b6:408:117::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.37; Wed, 14 Jun 2023 13:15:50 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::eb8f:e482:76e0:fe6e]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::eb8f:e482:76e0:fe6e%4]) with mapi id 15.20.6477.028; Wed, 14 Jun 2023 13:15:50 +0000 Date: Wed, 14 Jun 2023 15:15:43 +0200 From: Simon Horman To: Vladimir Oltean Cc: netdev@vger.kernel.org, Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Xiaoliang Yang , linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net: dsa: felix: fix taprio guard band overflow at 10Mbps with jumbo frames Message-ID: References: <20230613170907.2413559-1-vladimir.oltean@nxp.com> <20230614121759.riazt6xiskk74h6r@skbuf> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230614121759.riazt6xiskk74h6r@skbuf> X-ClientProxiedBy: AM0PR02CA0079.eurprd02.prod.outlook.com (2603:10a6:208:154::20) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|BN0PR13MB4565:EE_ X-MS-Office365-Filtering-Correlation-Id: 1bb296a1-aeaa-446a-a7aa-08db6cd9796d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lT33pZEBqGFHRGZ3zNujM9DdRnwULJApwHz54ZOfQpjhxROb6bRfO2lXKU23SBzsXv1YjTzuuA4Cal92wMYMgjwVa5CjS2fvFXF6RPwY6DSPefMwAn5FtCuk5LGe56mPrCT904wFenV/A51l8KvzxgvXbBuZZGTl+E5b2DqCJpU6bkx9lRNIh4owGDzCO13VqLRuySgPwNRnnLhYXQyAlI392B77jMcoa5RpkVQ9l7dJD/hz5NtlQTdeU2j09MmqcDmuV7wZy8vfBCckB9NnlbgARrO7DOd0O7lt+ujUrJBQL07GEpEe64qXW/tE9khIicN9AqhPlDVMcePF24EnIuIaYCn2kT4uPZsy4yEFzpIg1pS5nk5BfRnE9hujQLNX8ync6Jl2XldmoiSbOnf5wxDUHdwu1x757sEv3+A9AUKK2KYQdh3W3XuTN4s7sEeUxF9CfXN1SviB3ImYOTdbglfWc0zbfs5mHuxtc9l3OgcYXDwDeP4MjBKxIUlUrt0ZeQHCfIO1uRtK56KoJik7vHcBfaXS8fcRHMyMdBaf/fobjUladTwS66kPuNWsQsUwNfLTRNPOdgjs45E3YNqPrTWUPphEqXzYpZeti28wwQw= 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)(376002)(366004)(346002)(39840400004)(396003)(136003)(451199021)(38100700002)(86362001)(83380400001)(8676002)(5660300002)(7416002)(316002)(8936002)(44832011)(41300700001)(66556008)(66476007)(6916009)(4326008)(66946007)(54906003)(2616005)(66899021)(186003)(36756003)(478600001)(6512007)(6506007)(4744005)(2906002)(6486002)(6666004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?GzNaPk96jgzZMeqP2Bm5AUKPzrzMQZTr2pC8/jxP/oUeBn1LVFOFSjv9rDU6?= =?us-ascii?Q?xr3K1qB6KvnLbmQeypRBfHbuFlslBgrLIAyDo0wYzQz4NxrVe9dcm3GUU+W0?= =?us-ascii?Q?l7Q1EATVkgmz2pxbf1RuK1IgQG67YSDvWLL0qznPTaiWknJc2arXdizcAEX0?= =?us-ascii?Q?b2YvkdJd3/CsU3KrZz3o/qKw9flzuBIX7jnGdySnymswM2OaURsve1sHYR0F?= =?us-ascii?Q?Jr+Gx4iV05d5NaOStl+TbpKe9RXjvhhdiHl6TqeQ+b3NhBDRRRgv11y2O733?= =?us-ascii?Q?4vPd+RW/oCYzDDFkqNOLJ3eUm8wt7Tkic1R8YqLOOGGXbeiKX1B+JHxFOw1y?= =?us-ascii?Q?WKM5tphq5zO9NL0bTtjiG/q6cHWDa89oMDCdFwEVnpY8/QzoWGujT6rr71xd?= =?us-ascii?Q?Aa59DPRKOSW2/yOZlOltPqxKikv/KQbMEXv9W6Mvwu0+Z8fXcXHvNGyE2u9/?= =?us-ascii?Q?VbPwkwRZ15Ogne9S1cv/GiG9k/TZ9EJobyOMrcBsE3ShgluOjLwxeuig1JNm?= =?us-ascii?Q?cpOJ5xxSUiD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LWz6/Pzw4u?= =?us-ascii?Q?Ft8pYY/2NNGDw3UgClLKtB8/FmOTJpkIfwGB5kOx5CWcvm/+dotVRwTpduNe?= =?us-ascii?Q?AHUkXwt3eiu2qmtxnafMwAyb1s/f3Csepc+Pf1UTrmtmghL4DmMDHvi7n8v+?= =?us-ascii?Q?tLsbYoNBX1ynsBeymQ7atbZ1hw8Fbv4Ahf5+liKTUKfLFNwABDeTYCOVyXAi?= =?us-ascii?Q?E1224MYKUc8ak1h9CBN0o9fBMBhKThZ4Yi6DmzdV5GJuFyR/Jo3es+CvBQ+f?= =?us-ascii?Q?kcM85Q=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1bb296a1-aeaa-446a-a7aa-08db6cd9796d X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2023 13:15:50.5075 (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: bU/NEMeGBBTIcfFuQZ25nUTsZN3GYjYVszHY/bmN6Tm7mW1NvsE+ouH5SUkrgrnnV/s8oTWseUp/rBU/qk96IaIvUvqGxQ1T1kFSBTubhPo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR13MB4565 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 Wed, Jun 14, 2023 at 03:17:59PM +0300, Vladimir Oltean wrote: > On Wed, Jun 14, 2023 at 02:05:15PM +0200, Simon Horman wrote: > > Reviewed-by: Simon Horman > > Thanks. > > > In a similar vein, you may want to consider the following suggestion from > > Coccinelle. > > > > .../felix_vsc9959.c:1382:2-8: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead. > > > > Yeah, but there, there's an earlier restriction for cycle_time to never > exceed NSEC_PER_SEC (1000000000L) which fits on 32 bits. Thanks, understood. > Nonetheless, it is a good reminder that there are too many disjoint > places in the kernel already that open-code the logic to advance a > taprio base time. It would indeed be good to consolidate all of those > into a static inline function offered by include/net/pkt_sched.h, which > is also warning-free. Yes, that would be nice, now that you mention it.