Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp986394lqj; Mon, 3 Jun 2024 07:06:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX+zy4tg+C3Y5c46tFfajpqhP4XYnreRr58JXS/2uivI/xhFeqe8dbtFGyFs3weUDYsbGnSM49MZzXfcjssFUiBv3ldYXqFB8KsOxUn+Q== X-Google-Smtp-Source: AGHT+IGt+D+yQnDIYBy/qM4XjKIVeGtPxYU5m0j1BymcZQ/of7ms255xzTGk9qTOilkz2Pk3gIYK X-Received: by 2002:a05:6214:3a87:b0:6af:cd91:96ec with SMTP id 6a1803df08f44-6afcd919810mr1887336d6.31.1717423577702; Mon, 03 Jun 2024 07:06:17 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6aedd503d57si69340276d6.354.2024.06.03.07.06.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 07:06:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199266-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=AUBAebJl; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-199266-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199266-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5B61C1C22321 for ; Mon, 3 Jun 2024 14:06:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53B8A12E1D9; Mon, 3 Jun 2024 14:06:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="AUBAebJl" Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2087.outbound.protection.outlook.com [40.107.13.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41E8712DD92; Mon, 3 Jun 2024 14:06:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.13.87 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717423568; cv=fail; b=nyLh5Xni3TJLtl7lt7smcM76ER6+60v0oXSTa4mn1s+RZCubmQfx/50lu7w7mHOOubxVHS1MWBNWBoyme9zN3veUQ5Li7pE9O3+tpgdYJwzAZdn5udVqj8ND5df5wlTtYD1YPTHoAeNguNJEZ0lyFwXuNmc1Qt2ZdrpxHO7+uc4= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717423568; c=relaxed/simple; bh=H4122ts51rq6xf8tw3avuay8zhiQ1FuwJUM73lmboRc=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=jmESY2F41e2A8QOLxjjUCSA7K1v7nDoHNAiQDOEcjcdVOcDM74arT+m0YAEFZbh/Xoye6YkatCSvyRI/BZafGLk5nGEVwBWpT1KsapWs+SdTS7ACJoIoHZNsLxhHNjgtbPGHqupAXerD4ajmWErJDZgQjOVLpH25YWrrC4+iqQw= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=AUBAebJl; arc=fail smtp.client-ip=40.107.13.87 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nlrXmjZm5X40Hq8KE+3mL/4nrCw67F1RZMmGrHuccOrEozte3I7hoxSURhGdfsUr6VzpHTRICkRFodSiQkTI4ankvWxaR/DrI4hKWSZhhbLnVvIXOpR0FvTcbLQ/3rP73e6dLnQ9QPoqAoEcz1MbmMsrm1ifkYigS1/oru52W7a+K7lqCkOwPQuJSlxUkz8dCwp60TGd23TmippYTHYxbgug6lO28hKuD49HoCXL9WWKd+yNcmo1U1wYY6Gfaobx7sOtYnI51EqB3E5Prie227b5idYv1k7hilE2bG6XvCjTIKTPGGbnqV0VMzqdWFcCsx2tSiiviWmty3SHP0kErA== 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=q+TmaNeolPNcRYxryylsatlr/fIONDS1WSzO0D14AoQ=; b=B9fPJDaex7/mqwYjM0rP1PrdXEvoIwMIP/yx7XXzrwxujagzN5g7w+trQfRDUrylHkKyw42lIFmKVbDq6Gbn/OnpNykipwMQl1CNSfkNjr+3+PPe7mIYPdwQEhnFKIav1erizVa9tMyyrSPlN0A9wGplmD1TxgDSjJdtuV1R12tSVepI50hfDwuxglyNAo8IocLW5/eJXXeEMRBY1+7brng/hA5Ek4Okr2MNiqwTNHnkYxXZ5uXmz7nSOteV1jMLL000/fxCWL6CaBYLqVYEck48cFOY3+GY5pp2swPiMoNJ08k81HE7ZSbGMD0vMTKN3T3r3O6E7orU0kC3Cg6y5g== 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=q+TmaNeolPNcRYxryylsatlr/fIONDS1WSzO0D14AoQ=; b=AUBAebJlBZ5+FLiBoteVZusX5BW/HmWtNS90xZJh7oevlfKeLV/f7qNpCQjqGsEhBkC8neBePguC71NK9ioV1rE5L7axjDeFYPHodfyVACez6O1VS/SmBggx1QuF3eG7SbzqkxHIau2k5OTJyawOJeSzGfZdegF/ly/fRzgA/6g= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4551.eurprd04.prod.outlook.com (2603:10a6:20b:1a::24) by VI2PR04MB10571.eurprd04.prod.outlook.com (2603:10a6:800:278::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.28; Mon, 3 Jun 2024 14:06:03 +0000 Received: from AM6PR04MB4551.eurprd04.prod.outlook.com ([fe80::5b1c:9249:b225:f6fa]) by AM6PR04MB4551.eurprd04.prod.outlook.com ([fe80::5b1c:9249:b225:f6fa%5]) with mapi id 15.20.7611.030; Mon, 3 Jun 2024 14:06:03 +0000 Date: Mon, 3 Jun 2024 17:05:59 +0300 From: Vladimir Oltean To: MD Danish Anwar Cc: Jan Kiszka , Dan Carpenter , Andrew Lunn , Simon Horman , Diogo Ivo , Wolfram Sang , Randy Dunlap , Niklas Schnelle , Vignesh Raghavendra , Richard Cochran , Roger Quadros , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, srk@ti.com, Jacob Keller , Roger Quadros Subject: Re: [PATCH net-next v9 2/2] net: ti: icssg_prueth: add TAPRIO offload support Message-ID: <20240603140559.krc6ap5qbltutsvj@skbuf> References: <20240531044512.981587-3-danishanwar@ti.com> <20240531135157.aaxgslyur5br6zkb@skbuf> <20240531044512.981587-1-danishanwar@ti.com> <20240531044512.981587-1-danishanwar@ti.com> <20240531044512.981587-3-danishanwar@ti.com> <20240531044512.981587-3-danishanwar@ti.com> <20240531135157.aaxgslyur5br6zkb@skbuf> <9bcc04a9-645a-4571-a679-ffe67300877a@ti.com> <9bcc04a9-645a-4571-a679-ffe67300877a@ti.com> <20240603135100.t57lr4u3j6h6zszd@skbuf> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240603135100.t57lr4u3j6h6zszd@skbuf> X-ClientProxiedBy: VI1PR0202CA0003.eurprd02.prod.outlook.com (2603:10a6:803:14::16) To AM6PR04MB4551.eurprd04.prod.outlook.com (2603:10a6:20b:1a::24) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4551:EE_|VI2PR04MB10571:EE_ X-MS-Office365-Filtering-Correlation-Id: f1a3ba35-89e8-4b3e-4332-08dc83d64d97 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|1800799015|7416005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?mMwFvd2WcyIDNuMIuvAs5YIcpsULjidUWxv2fJWls7AxblcbC0nkd0zTqLoz?= =?us-ascii?Q?C7Hh/D67WBT6UIFwub5hNV1U3aD2MU7f5ZloEV0WI091Q/iIGlujGbe5ZK7L?= =?us-ascii?Q?Dr4KXZSoKy1a3tL222KNUKT3atyAEyQUnE/vhFw0QndvxDp+kBusQ5lR5ssI?= =?us-ascii?Q?foN3cq/p2FX034EO+R2QvRVpD9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9YFKZveTgkAc2RouHIJkfv/8OE/ln3T1++83LGCUBIhsqXCBe8k1?= =?us-ascii?Q?kCNIKmDzefUOmo4+YSFCqxnkZ2IDhww9y77EOWMIp/ShYDwgGqxFu5ADWRk+?= =?us-ascii?Q?ValoYhSVkJRh3XjZYqXbyXlejTTU/7fwU1rfow7sfNB+yFHlrMjwr94Yi1x8?= =?us-ascii?Q?ZDjdd1uG8tDp0p+Nc5jE5q3hy/Is6ibvD9aRBbwiOg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB4551.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(1800799015)(7416005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?2hECoWV2KGY03SKSO1FyDvA7CN5/LZssEc+4qTH1Z7ojtikkM8Fucu+RrvCG?= =?us-ascii?Q?qfDrx31TVLI7BFri1CTzh+DVLQt2Abi1+f8N9mcqPpq065WULOIhHt5rVA+Y?= =?us-ascii?Q?FuGPBZP0rOl6cDSzGAi8MFavI4H7IvYjhHHYYRcLb2DYBesJn6C/1ty3kVB7?= =?us-ascii?Q?+samfaiZw2f4KCQqs11AECDmOEQqErGrcdnxywP0r4RavJHXB/AnbYWbI8S0?= =?us-ascii?Q?ru+5sEsoJ4THFdPys5+ZRtiK4Rgagc/qmegEPfemQPYJOx4w/G//vPFLfZjF?= =?us-ascii?Q?RIM771q6FZwpTbSf0CbuZd0aEbEH2lT++ovvlgy74DNHThe88zZBw09Mf+Uj?= =?us-ascii?Q?EuoYwVoJP8rQLyV/yXWPk8tfKSK+1p6RRnY7cFjkhgshTXCtRLrTdP+sFffG?= =?us-ascii?Q?P2iFqFrOVHC2yJ8UEtbYx4ICg0v2mwTbREXT9VYxCsksgbyUAO1fP6ggI6nN?= =?us-asc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U+03Fwh+e883xiE2h1Bbu7HkNOYN6Q?= =?us-ascii?Q?33aXlD4W2hFlaQjNfFSBDqkSGvisOO3MQZRfRzKodAoxoRSYEKCvdSE98q3p?= =?us-ascii?Q?fYwWV7MqCmnnhDD0qSro0HicGeok0+drpm6cRyMHImDEysFSOZdqTEEG3xe1?= =?us-ascii?Q?IcxzFb/GnO3EyKNBU02qV4KxwkDMNuaQlSmNQXF4/kPt4w3ojKNzpW0xt4dK?= =?us-ascii?Q?AlcdoCQtMNCw52NCW/duNM4ikKq4yigfvc/TA6CTsHVrNAe48wZ9uyMX1/+U?= =?us-ascii?Q?hQ=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1a3ba35-89e8-4b3e-4332-08dc83d64d97 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4551.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2024 14:06:02.9671 (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: bGsbtDcl+vJdwdXF/lsSSgPtSIFeMC8fpnDge0U38Tu1nzjuAR7wGtXKmzRu1oCMMFffQ7hMzsEAbhipQF9vdA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10571 On Mon, Jun 03, 2024 at 04:51:00PM +0300, Vladimir Oltean wrote: > > >> +static void tas_reset(struct prueth_emac *emac) > > >> +{ > > >> + struct tas_config *tas = &emac->qos.tas.config; > > >> + int i; > > >> + > > >> + for (i = 0; i < TAS_MAX_NUM_QUEUES; i++) > > >> + tas->max_sdu_table.max_sdu[i] = 2048; > > > > > > Macro + short comment for the magic number, please. > > > > > > > Sure I will add it. Each elements in this array is a 2 byte value > > showing the maximum length of frame to be allowed through each gate. > > Is the queueMaxSDU[] array active even with the TAS being in the reset > state? Does this configuration have any impact upon the device MTU? > I don't know why 2048 was chosen. Another comment here is: in the tc-taprio UAPI, a max-sdu value of 0 is special and means "no maxSDU limit for this TX queue". You are programming the values from taprio straight away to hardware, so, assuming there's no bug there, it means that the hardware also understands 0 to mean "no maxSDU limit". If so, then during tas_reset(), after which the TAS should be disabled, why aren't you also using 0 as a default value, but 2048?