Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp340123rwb; Fri, 2 Sep 2022 15:18:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Pm8EWe98/v69SFwj0ZxnWNZkrYwAD/Bu+fNoxqhILYBcp9ZuPlXFKyWAytR/C5lNfmTw8 X-Received: by 2002:a63:84c3:0:b0:42a:88f7:d723 with SMTP id k186-20020a6384c3000000b0042a88f7d723mr5498276pgd.400.1662157116605; Fri, 02 Sep 2022 15:18:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1662157116; cv=pass; d=google.com; s=arc-20160816; b=Cywof2VLrtTeD55ZPXdZ1l6aKdcqYVnux0yVdLubfFSifH2mt6E6qvYk4D5RBj3JNN sOlGXIGTsmhq240g4wUUMz17W3RR8SpBVN5VPRJq2VU36HD8hMvlb/8DEUObtlLlnfEy 9oOtG3IwiuNac7zv1K5ms03gfKDaPcpCUKkiKjFn6JA/sKXzlEIAp0f6w1xu0KNX7i1P YoeqHs76GX2Wgqguz0QPZE6ZQIJPjBJBrx0MEpIfAVKfh9o0j3MzhA9Yd2wdz7kOvT98 WEYXujGbCaw/0jzxaysLJrvCAYYWb1+vI1+7YPO8/Q+7qnq+qpVGFKJfYsiNst5HT5xP R9fg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=gCPw1SOenx51GS+Pp/yEG6FEQsVAkXCbC+wj72ef+pc=; b=FBI6htJkdlmc7HN83kdO5G4GhcWWdBJXFgukgOQI0/OsrW11kQSwQJWvsD3YYFZe9K 7X1CH3kBjz+s+P1mowfHlvPpx+ZQ1wuLuHskRsURuv2Q198i/knDh5h6acZPtn9I4ADK sn0u/DXSYc6jNWvJyAtbjivYKyJl+hWLOTEA2dxmaIxsBIuo4uFAaz5QLUr5wUJoAekd QUVJaxi8Tef683t9mLsYYLOjfb5sonE+lRcUrjcFwQnfV4KYFA03Y3/dobvjthMe8oL0 yRGXkn+gjzU3j8C0oLuIRYoRIua6PKq9NCyuGUEHXW13xUzhTBY5E7i63a58QSx9QDq0 l3pw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="dHhH/m3b"; 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 j191-20020a638bc8000000b0042b74cac350si3000767pge.156.2022.09.02.15.18.25; Fri, 02 Sep 2022 15:18:36 -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="dHhH/m3b"; 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 S229965AbiIBV5X (ORCPT + 99 others); Fri, 2 Sep 2022 17:57:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbiIBV5U (ORCPT ); Fri, 2 Sep 2022 17:57:20 -0400 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2054.outbound.protection.outlook.com [40.107.249.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CA0EF54B6; Fri, 2 Sep 2022 14:57:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RjPVYeUZAEmhwmnFwePg1g//r+urYEj8w/BCzYcblvWek2ysz09T6Yvq9G+6pXeB6kWI5w1JImtCIEfml9itCvfbNSJgfTnnkYwEt7nnP7+URs6dZ0BLf3EJbY20dOxiXbXR/M6AdX+N/IvZu/SwM1D8v9VoAiyux1j8n3mIStaBlF9l3SSd48xpKc0fBB0S4gIzWfMticNfhEy8jsgeu91XSzaT4NtCUhgSf0Ie53AnwwflpRe31g5BsAESg+iqDznQvYnCpDw397zcykxpoZW0/drgKWr7dq9I5wOImxwgd5Y1T+Gu/qL3mOmT4OP/gpwMYN24t1PcVJKbCrglNg== 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=gCPw1SOenx51GS+Pp/yEG6FEQsVAkXCbC+wj72ef+pc=; b=Gt/vz7rBGUo4dgeDLtZR8vxClNQOstdKWqolo91/w31/O+GxSJQQaznR8NVlg4k1IX13R2uKfV6hIAolj9TcLB45efUuiBV1zZNMhYguAXkKQ5pDkWepog4jHv0u2wYdl8DgQCO7L9AvJco1+arTq/1cNKnRF//w3VEagC5W3fuOsDabq/z3l2XE9zc6Xby/FhnYwQYLfZ2CCSOcV9US0+O0go/z+ClRAGgXIOv5WRXHll9Rh2/2CB6w3soSHuOjqlHwRl7ixuIF2shGVB81i6Hl+EVXUXqPqZjzl+tKUJWvpLXDpVjrdXYDKdOwSaLnne9C1pOWxWcWR43x0MhlfQ== 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=gCPw1SOenx51GS+Pp/yEG6FEQsVAkXCbC+wj72ef+pc=; b=dHhH/m3bqLZT4VTHoMdyK8IeGwHvl7sriNKeTqAUfdJXUhrEX0PV9mKijU4zw2wiPSo3daOsq4EpNZo363bXSKx1oc7BcFRCr4Nx6V5LTWL7hKyy9/xf8ZjHNf8CpVToMrPXowbjs8B+NrvuJbAMl/GS2Hw+fpLvDHbLmXltDP4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by VI1PR04MB4576.eurprd04.prod.outlook.com (2603:10a6:803:74::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.21; Fri, 2 Sep 2022 21:57:14 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3412:9d57:ec73:fef3]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3412:9d57:ec73:fef3%5]) with mapi id 15.20.5588.010; Fri, 2 Sep 2022 21:57:14 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Xiaoliang Yang , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Vivien Didelot , Florian Fainelli , Michael Walle , Vinicius Costa Gomes , Maxim Kochetkov , Colin Foster , Richie Pearn , linux-kernel@vger.kernel.org Subject: [PATCH net 0/3] Fixes for Felix DSA driver calculation of tc-taprio guard bands Date: Sat, 3 Sep 2022 00:56:59 +0300 Message-Id: <20220902215702.3895073-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BE0P281CA0013.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:a::23) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 40fe3f4f-d216-49ab-8b34-08da8d2e1861 X-MS-TrafficTypeDiagnostic: VI1PR04MB4576:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oRmGeujuGKoVgqZHNZXQ63Ilgv2UwrVZo6qITVBUjW5mIjx1NX0czvWgCe3u2AcCKYK/5qiPeYBDVxBwj/cOjp2mjqvdYi3ncQ4JppAFghZhobYOvDwSuZQ7Th5TfoB2icGAbXF8oczRwnTvb/d+Fsiqa/HjJIyE0XXC5jiAuLf6WAUa/QyWSjxpZFhp7tXeXRKCRjjdWd5KNRH77ND71i737bnsKKiBkn3v7HuDXoiScAestMp2B42YXG5auO9c/OwmD8rOSjBDnL02Wiaxp9qht5oWSlUuXpOidnJftU7k/63b/VBWonOK1FPH8V4Ox17gsgLX2sI3Ta1UPjupHfTZUlAmLChmY+uEy6XF5oCUVBPGZqmSoILIgy2T1AO4P3ILIe5PvZiYZIpP9BuZ1lWLGKU1b1NW22W7HxdShGV5oCj1Pd6KQgtoYlwxUusCx7nNNK61W51+IxqhB7Elu/roayRvscvpWdVHEqz4e/Hz/OTTVqCfmJ6js1PCmBeA5kRBwIuWteuJxDx79nETU+Kum69kP5J+YK3GhAVjUhUa64TKKD1qafJ5WmXlveMZahkvrjFMTa13A7M04YeTDMbO1VS+W1VDybFAWD4CVXK66X2yTZd8O3iBglN5MwJGn2gfxQ4EdScpGoxoUk+MX24obICZKV+7a2f9VVYAhni/LA+s/BgNsqx+UPiFXkZ/Q/O09lsqK++849NNZEsvmY1b5/+w8aGg7rz0FRNyX4UDy9/0GM8qt7O5mq/oSOZ0 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(376002)(39860400002)(136003)(396003)(366004)(346002)(6916009)(36756003)(316002)(54906003)(38350700002)(186003)(38100700002)(1076003)(2616005)(86362001)(52116002)(2906002)(83380400001)(41300700001)(66556008)(66946007)(478600001)(4326008)(66476007)(6666004)(8676002)(6486002)(8936002)(7416002)(44832011)(6512007)(6506007)(5660300002)(26005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?qHofrv4RToULxLBby8x1rEEmq/x/q6Epqn/Gx88wfO/ShAHF4ueJhnRH/62v?= =?us-ascii?Q?bcHonCuAt9KBBfc3mobVbzOBg+01i79wVgDKXwkGDBmVrql04yecDB51+7OS?= =?us-ascii?Q?+HlM7SKkwlXrkKUasicXyXD5l5N7BXtpOIs2QKj1BtpaMG93mJ2w8GbfkHbR?= =?us-ascii?Q?rkFRXxta9J8lBxwnE5RpwCILIWVBwculP3hsTbzWXIEueaGDuYoLy97AFXf9?= =?us-ascii?Q?bElCrUcKrEczHtxwV0GKgCi1lzxe6aiWBQDi91ovodykpBeW3BtsreEWsA7B?= =?us-ascii?Q?vIY/6VpBPjAuhjJ4h0BDVQi+9dUiEX0rdMc+K7QKWtgxHJdhThyti2fdYvQ6?= =?us-ascii?Q?bCEkYf0soQWEQOmJv8xLiQiTG3aLP6dygKGA3Jdy+8EN/AdfB0vtI94joo7L?= =?us-ascii?Q?39izC+GgPnY3X2BERCaB1JFbxCfmH0zLEGGywQVYmbPFoyJMmR+7vk1mXCya?= =?us-ascii?Q?PoU0xaFmpwp4jW62zYAglw5l058kXsj2u4d9bEEPEApGsCA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r81kbMjIOSvTRWmj0/54KX1S4tZr1SlADkvsVBAArG1QX87tvD?= =?us-ascii?Q?Hz1ii+HhGv1XqoyA4cBOVhEviBj+ZHQCCawk9ZKqfp67lQtKtlwtkV6hzgXa?= =?us-ascii?Q?zg4GL+yOQQRyqeNkn3Awu1U5T/uDY/8dp1BPl6pEUdWuPBpi5YRACEPX2LLm?= =?us-ascii?Q?btD3aHyS2SR8DpXfOK7OuH3ApTqKcXFtCbeS4+jzA40+vS+WUiEy+B3MUPrr?= =?us-ascii?Q?Mw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40fe3f4f-d216-49ab-8b34-08da8d2e1861 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2022 21:57:14.5904 (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: 0NsIYyMez8GBnS1xNAOYzW0M5sd9ytc4EUM+quaCtaJhDhKEBcoYvJoihD9OWDcaCv+THP9Iax5ktIVt5iTrYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4576 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_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 This series fixes some bugs which are not quite new, but date from v5.13 when static guard bands were enabled by Michael Walle to prevent tc-taprio overruns. The investigation started when Xiaoliang asked privately what is the expected max SDU for a traffic class when its minimum gate interval is 10 us. The answer, as it turns out, is not an L1 size of 1250 octets, but half of that, since otherwise, the switch will not consider frames for egress scheduling, because the static guard band is larger than the time interval. The fix for that (patch 1/3) is relatively small, but during testing, it became apparent that cut-through forwarding prevents oversized frame dropping from working properly. This is solved through the larger patch 2/3. Finally, patch 3/3 fixes one more tc-taprio locking problem found through code inspection. Vladimir Oltean (3): net: dsa: felix: allow small tc-taprio windows to send at least some packets net: dsa: felix: disable cut-through forwarding for frames oversized for tc-taprio net: dsa: felix: access QSYS_TAG_CONFIG under tas_lock in vsc9959_sched_speed_set drivers/net/dsa/ocelot/felix_vsc9959.c | 141 ++++++++++++++++--------- 1 file changed, 93 insertions(+), 48 deletions(-) -- 2.34.1