Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5902734rdb; Thu, 14 Dec 2023 03:05:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpBLBvh3guTcGkG1BSWOpwTYYu95BE4UzFkaukMolMoQ/EJdrQnHXTkM60A7D8bXJ/xzXR X-Received: by 2002:a17:903:11c7:b0:1d3:4783:cfc with SMTP id q7-20020a17090311c700b001d347830cfcmr2583204plh.93.1702551919640; Thu, 14 Dec 2023 03:05:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702551919; cv=pass; d=google.com; s=arc-20160816; b=KhEYlz+yyzAM00P82GTWpEpGyEuzFse4OgZfy1E0XMbXi9We3tSAGSmgn1g8Sdu1im ZD0fUHBWx347LXvyX5bGeQvKtMP2OqojLWe4RG4utw0y8hcUH35p13JrNJBnm3WiRP+J OarllF/0c/38mhgRk1HTgCMUBb6YLwd6F7lfhlMicFB5k+mdSpooLU1+u/G+elINft2h 8N+W5oZRCOmirHU1yoriI7gi1TFK1acdJibkHWOtgP2+V1wJuslx2auw5YzabF5RyhrN j6Pxf4ePu6nBCW0pOpsC8Xn+hKAwMTIeipTYGjPyHXTqm/+B0It0QmS5jN//OeYiLAZb oveg== 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=pflpDcyv989TQf//x+qYNrITgMfQkkHbT14dyc+OIys=; fh=R1WjcUT4ifKZtYM9mQ2/hfpqLCcEMWgaQim+nFBSO8M=; b=FErJ39cXr0bLSuoCq33VrVFfsU72Dlnr7+SseXM/CBc3wWwlG+kLj2ZWR0850wMqCI eb2H50fQlgLdvUvVyFc8BbpI2QwvgoBdzyA/HidsANuELEDNi57gVxJxVenTy0Zw/yPb V273HwrZsaXJqwCUr8hTqJ5j24v2TJ9+KxxmPqtLUT2/E+40rKJIBaaIWae6nLsfG8ed x4QXT02l6TUftp/FEYlI9uXkiV6ufywX/c70wPBSp8vGMN0OH9OdhtVZKei94JO3yEQJ BJgWMPlaXF+KijxwoXO/F+dmhx+fYRzcv6wBjxjcesVew4//p9pZDonH58Cpdrq5xTC4 MSJw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=kLXr8E0N; 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 l14-20020a170902f68e00b001d0b5032ec5si1653493plg.438.2023.12.14.03.05.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 03:05:19 -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=kLXr8E0N; 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 0F5AF8339646; Thu, 14 Dec 2023 03:05:17 -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 S1443882AbjLNLE6 (ORCPT + 99 others); Thu, 14 Dec 2023 06:04:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443857AbjLNLEu (ORCPT ); Thu, 14 Dec 2023 06:04:50 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2060.outbound.protection.outlook.com [40.107.21.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63BBE197; Thu, 14 Dec 2023 03:04:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YsEvlg60p0zZ5TReJnExPWcY2ijrxDReB9OW4AC48p8CfdPHgm/OaUxBtS2FGn07FqB8SeIJDxwEhogZ0l4s5BneT+DzRoIRLrQ0ySxUCNT3yD5txtn9gehwmuVnQjMY4VG4hq3Vz4rV1Y0wpISqCOgQEEKIlAegQBR7dBuTz/Zvs9IkIv8eJLqLKOa8Psq8UZyaiRL604i8Rqxt3OGt2HEZjU74ERv19XEwyYVzvd/Tx9/t6kImhTECzyDHS54pWJVk9rOySL/cucjUCy+vzTqB8EXn/NhgpRzLK9i/EoBDXAa5P2H2Uq67vXENljjrtq36zq26tkLIYJOzMlViFA== 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=pflpDcyv989TQf//x+qYNrITgMfQkkHbT14dyc+OIys=; b=Ns6sSOF2BZm2XGBJdLfYhbVHITNCnf96qucg8AYrYnstFhcSgOVY5wiADtS9LWQBIJasQhUkmO/gMsFDk+Fmif7Qsj4tnjN0l2v8a4O8BeNJ/NHLr9bO2H1Gr4Pnm6dXhtYBGfZDwABfkccbmy8OpGI8WGT1yyNhG1/tD582RsHiboc4tNmUTJ1X5vnKCXKmmkoLkFGHHhSzbGaQ770MWmRUXT2LgGZpAx/zviXPChiAiZBQswNH/wcFBx9dfwOqhcCLMyn6kwHF7tYlrGO8Otwcbbuf5ZQaiQRiW2pssQpcTHi0VHO8Ub8WcResXV0M6t8CMHEoSYs1HoxGRwUAqw== 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=pflpDcyv989TQf//x+qYNrITgMfQkkHbT14dyc+OIys=; b=kLXr8E0N6upNbxGLfmXFJanxGE1s1iuqXodupnL894ZZPxJEn7Rgb00ktko1l/gL+v2JzxYj4B00AXq0rN1oSwYx5xMJji05I5N5ty+vZ/QHuX8rmaw602xqlCg7Iln0MtCkj/RarVs+FIrlozOh9E9Q2eEzG0PdWMOs3U8lDI8= 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:04: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:04:52 +0000 Date: Thu, 14 Dec 2023 13:04: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 09/11] net: ethernet: ti: am65-cpsw-qos: Add Frame Preemption MAC Merge support Message-ID: <20231214110448.lycg7yusrusbd7w2@skbuf> References: <20231213110721.69154-1-rogerq@kernel.org> <20231213110721.69154-10-rogerq@kernel.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231213110721.69154-10-rogerq@kernel.org> X-ClientProxiedBy: VI1PR0902CA0043.eurprd09.prod.outlook.com (2603:10a6:802:1::32) 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: 61a80626-6485-4645-e6a5-08dbfc947eec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xsyvzvJ06ljXOUvyouBP5pZb2rGlTKx819B8uqXQ+hPWbJiAJOzNcK4bUE4GV0CgZx9/FkWHiRpha4E/YWdoH22piUHqUojyTwsTU7V/bsxNsp4cGoFZVM60GNzYqgUeoc7PU1Ri8mT0NqaJSMOoiWy00pYySCbV+P5dpZVswRghof/FcLMAUsKWQ5+YdStIXv7Ral0syb1VaW12qq+rAeriT24MVdRu6UKhnjJFXvv/9pYIQX7GtzRfJgEAXhh+ccTIRV3S90RMu3g+Xo9GxbVqS2zNC6L+PrX7j0Tx45A4GzWGTiHL2PKjMs+7cd2j7IF4rlKAXlYD89qd81yNjewouW7GBa0RYQ14RGv3vTYsQ59Qn2hmRVOluiIPCFvzFmhNQyn5l2XXyqloE3ia1lDj4+c+4fOw+0UhufvVpUw1sdgglE3eQMncQMOnbF9z/NGh+yjxx9ZF5XZcGxn86lsJFKufM0KfFC3+chiiYvzNcUROOpz8+ihguAl5Y6zde9+F7UvTVs19ro6E8IMq6sy3VETm3zVE5mZp53cjqVrC5DxCkLSwHy6wh0748E0O 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)(83380400001)(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?ORDOpEgJwyFYqhcgNiChs/mOm5QKZy+eD1LKJQ3N4/VT70cEWlwH2FnKDaZ+?= =?us-ascii?Q?Z5X/ifcdHR5wQ+ifgOlDMABmQkqshBqbVtO54Pfznw3woL6kqZ5shE9sDwnj?= =?us-ascii?Q?/v1ffsj9e055ONId54bzyLXQTjIhyM4HkeAIYHp6zyhMkTyc6re/lJRWDJud?= =?us-ascii?Q?qVgQFd0/T1SpKksiMpHYXAdmoqSBSPcAm0m3W5hYWolydzPjb5Q4ONT/iPgK?= =?us-ascii?Q?bFG/7TedzKYDTli9ZT5pvbec3JpmJA3GBXp5vD9BNHLMxzMgwaTMgSrlYJhR?= =?us-ascii?Q?MeSDxMDfIOOsePTy8f5qeIv1yi1FeRM4A4ZiljUVPDjoL7K6jyx3eFvEjxK3?= =?us-ascii?Q?C4m2mNQJrhKoY+5QVKnrMUyKp8WagLmY0c5ms17E5o07sSbC0DN9q3KPnG9t?= =?us-ascii?Q?TkEgtLamgCvPupHMrPof4hEUF9TY5xF+Sxx3diqd+47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?Q?W3QIZ9Y8DxthvwBDz+4hJilYMSxumq8VWecuS6szyOffP7iWfxR74pzTElLs?= =?us-ascii?Q?WT3wnMMJwTlDWQDHiuv5RPL3vPRP5ZDMiwXI6Tr0f534xVnlcMcFj35N9cLI?= =?us-ascii?Q?d//rYXZ9B+Q8PJ13NUs1jczCU7b7aB88vN+TSa5kKto6uMrkgBhnGRHBcYpv?= =?us-ascii?Q?5/b2mFYo+MiJh3z3L0nwqHqGFUYigTJ1Mhf+zPhCexO/EI4+7cu3O2dHulfC?= =?us-ascii?Q?SqY8/TR1TLaVcQxe4WMLfOVsra+H2rp54zfZhl2ySGrOO6oMkdSmRQvNYRi9?= =?us-ascii?Q?DQ=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 61a80626-6485-4645-e6a5-08dbfc947eec 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:04:51.9968 (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: whyv5tF1krCMDf1Ryk45ty0bEWGGs5ceYep1Aq35z0rl8tOLZ7d9EMRJzEgZVzpL2dhOkFrsWWM07kAJNzuptA== 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:05:17 -0800 (PST) On Wed, Dec 13, 2023 at 01:07:19PM +0200, Roger Quadros wrote: > - Fix am65_cpsw_iet_get_verify_timeout_ms() to default to timeout for > 1G link if link is inactive. > + > +static int am65_cpsw_set_mm(struct net_device *ndev, struct ethtool_mm_cfg *cfg, > + struct netlink_ext_ack *extack) > +{ > + val = readl(port->port_base + AM65_CPSW_PN_REG_IET_CTRL); > + if (cfg->verify_enabled) { > + val &= ~AM65_CPSW_PN_IET_MAC_DISABLEVERIFY; > + /* Reset Verify state machine. Verification won't start here. > + * Verification will be done once link-up. > + */ > + val |= AM65_CPSW_PN_IET_MAC_LINKFAIL; > + } else { > + val |= AM65_CPSW_PN_IET_MAC_DISABLEVERIFY; > + /* Clear LINKFAIL to allow verify/response packets */ > + val &= ~AM65_CPSW_PN_IET_MAC_LINKFAIL; > + } > + > + val &= ~AM65_CPSW_PN_IET_MAC_MAC_ADDFRAGSIZE_MASK; > + val |= AM65_CPSW_PN_IET_MAC_SET_ADDFRAGSIZE(add_frag_size); > + writel(val, port->port_base + AM65_CPSW_PN_REG_IET_CTRL); > + > + /* verify_timeout_count can only be set at valid link */ > + if (cfg->verify_time > 0) > + port->qos.iet.verify_time_ms = cfg->verify_time; > + else > + port->qos.iet.verify_time_ms = 10; I don't think I understand what the check is for? The netlink policy for ETHTOOL_A_MM_VERIFY_TIME limits the range between 1 ms and 128 ms. How can it be 0? > + > + /* enable/disable preemption based on link status */ > + am65_cpsw_iet_commit_preemptible_tcs(port); > + > + return 0; > +}