From patchwork Wed Jul 10 23:00:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13729809 X-Patchwork-Delegate: kuba@kernel.org Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013028.outbound.protection.outlook.com [52.101.67.28]) (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 306EC155326; Wed, 10 Jul 2024 23:01:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.28 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720652507; cv=fail; b=oOTwqwkcS79K/ocRmcRan2LcONLsWCv5hoqKfHexmOWOvK8iYGuFE1U+Th3rOw4W3LZSHWXStmxdHy0J7zEw5guaeYvQU/7yiYcg0uOZ5WSpQh9PNyUsW6iWRI+EO1YQyj6rEhw984n1YneGwLKLcnpbWPzOxa+alEzLvnze00E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720652507; c=relaxed/simple; bh=lpAUi4pM9/5hCAeKmFxvsrqA3ZC7AgplMcL63t6Wm2o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=EQvR51m4/lLhSmT/pSIe1TDg3LExr7UhKo7cLerJpuMs8mTsnIAXi3ItVz/ggZyGkNhrW4dIpF02qC13vzyZkDukY9FkbiFnmffP5jx5IhotajEnigFVf697j5cHSXpRtrfuAS6PCx2nwZnLyTMX0pQj/ULn+YA/yvr5fn1c1KM= 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=lpCCVJfc; arc=fail smtp.client-ip=52.101.67.28 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="lpCCVJfc" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LFtUZu/RawSmkE7VQmNkkdsG1UNu3WFfLvxsxJgTq4b4BwxCb8ZUE/amUEdOmTc0DDyq6Ls2SpfLF19DRD3ToyLgRIWHK5SKU/SMre9BsC/zRkU8J3OrJlosa4Mb6DcB6a8v8/b6sb826rqSelR2YPCYzEj35utF31GaaP1rip1sQQnlyhBYkXT/VPhspI0yjxh/bxWbtS0Hni6f+f2sLK+lx8hlq1SWV4gOew666TLu7DjM+IpiHW/1MtSBLyVAXymlRouW0mLZ82F866/0aIOkGeeqSHY1FL4wehLvEDbzlIhraR13lrAUdwUJZodQUMutfJ9JNaWJydgvKDcwTQ== 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=GQRyglssA7asbrla1CO1yv3VAbZ797kWOfCB6/c+YCs=; b=aFtJCiMOZOcMZupKpSKnwxGo6jf3FuZky8StIp2QUpETDtEDEGhJVjGn3DyE+drWrotK5yrE5fYnGp2PvZcDB4Emz1A2lgT8VqjOUC0sd0v3VgsAoSvZNC+SRjO3TnP+mExn/jGHjW2G3TKK+CMv9iyGnu2OfdJ3Rp/zI04ZK3vMFJXc2UbuksugjE5VlzAgTAhk+HlxQZ86ZcBEBnUB9y4S/YH757uNcU+c/Yl5Axs9MKvr6eLBtmxi+aLVXUkBA95pDIGUUAbFJ3KvvlCNfa8rmGl1NNF08xaeb0/G8l0eGdSb7WZFR7xwmbhDsVhV2Iv0ab7gqha14DNsNPKT5Q== 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=GQRyglssA7asbrla1CO1yv3VAbZ797kWOfCB6/c+YCs=; b=lpCCVJfcX8eXTza9LAkio0aDdNYoJtf3OAOr3juwnKkDEQLVWKJ1AaMnEOXKhamka1xN2bspoECDkjmdHexRlBcsFkhGkEpWtbK5nB8EO878REyeKrpf1RixHVnYP2qRl2LIZ3RcHU3DvhF2WrJaZiw3wd+3Cnr0idIyfoO4sZs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB7PR04MB4555.eurprd04.prod.outlook.com (2603:10a6:5:33::26) by AM8PR04MB7425.eurprd04.prod.outlook.com (2603:10a6:20b:1d6::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Wed, 10 Jul 2024 23:01:36 +0000 Received: from DB7PR04MB4555.eurprd04.prod.outlook.com ([fe80::86ff:def:c14a:a72a]) by DB7PR04MB4555.eurprd04.prod.outlook.com ([fe80::86ff:def:c14a:a72a%4]) with mapi id 15.20.7741.017; Wed, 10 Jul 2024 23:01:36 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Breno Leitao , Herbert Xu , Madalin Bucur , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next 3/5] net: dpaa: stop ignoring TX queues past the number of CPUs Date: Thu, 11 Jul 2024 02:00:23 +0300 Message-Id: <20240710230025.46487-4-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240710230025.46487-1-vladimir.oltean@nxp.com> References: <20240710230025.46487-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: VI1PR0102CA0100.eurprd01.prod.exchangelabs.com (2603:10a6:803:15::41) To DB7PR04MB4555.eurprd04.prod.outlook.com (2603:10a6:5:33::26) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB7PR04MB4555:EE_|AM8PR04MB7425:EE_ X-MS-Office365-Filtering-Correlation-Id: 41984cab-ef60-4f6a-e92e-08dca1344000 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: 5CAriIpUCTVAjHs7Lv/7RAt/rNCK8eul0NtI1K7potRXBdjH3UkhWoeEvx/oAgOrd4ycu5vLLS0Dx65w9MH3xx+2Kh9I3PQVgtTL34cs1RZFQSKsDePuqsWDkK6OF2Nbi7FyYsoOfAO83Vm/GSSNQdep3GKea/SPOYvdjjmR/U4GlPMRWPkkN5L67j+iSTEwg5v6JscPb6Ka6WUlSPuieGTEh/J8IKFJF00BHkjF9med+Eh0D8EjZ5lp0wwqqlw2qSw7cvbFQGqBPH0pGxIydY4TQWBy/lV0u3e+2n2IYoIwPRX1orJyjJstSsOLKA1H1X1gnTsxBLXzOaYhpioxzHyLfcknULQYtyiahdKYElDUw1/FGE4JRoiBodS9UQqRAj/FdCKdD8LWBsXtS/LLGO/Fg27AWYpEQZsz915yohsA/9X/NHDZ6+X3410Pms6qaO68y2i0FblRhmr2xem/JST3JftGsP9SSwCYwzZQ2+ASkd9vDJrdXhVNOJnibS3stYgxF5cHttzm8u3eAA618ALp70AfqzZZ/DMBOeENMv1v8/bnp19EsXarMIKePmiTWPY53WMH+cBZH/Ihatq48YNa/gzJxWIPAIBiLjUJKL7qJVRZrnJvzGwpc9WVhaBpIrS1LY5zjBDRMkyXxTUq9RblMJLUo2SaXhrqr1T6fIWZ5hFi/mAZ6TpS3Rn8nIy6AgpZOfvOgxPkMH/gHFdgOB61Jk4PvzBevbN5akmwisCBh+7Ef9tn85QiGD/bgQqn0JUuOb7S4Xn45VYF1A5tedJeuJOmbGDLAcmfBT85jVoGc8p/PExlLPmRp+gblqSPmgiHvQLQsHMLHvYw/oxLyTIRmlTmaDw6jVoEmHhA3WZ4jII2xsvvuD6cAJjjBuEA8dXrD4sX6gE8vNGlqz/7sdNxZiGyvgW1Bzu79AxzM0cM21tb0+nkRdQU/g22JalDP42sR7tFFFvj+qcygjGFAApwBCdyznrjr+nbwT/igSuLkOmBLRFW/QqsMO3PyasxTKYT2PosMJr04bWJazkXJ22CXyFMqE+K3tuDUgfos5+udG3V/AscKpc3pBol5h9++hlJQukPWWkL9dpNZdroP4aH0RT5XvwD4lBov2K6Xr3WtAkN0HZgf+9xvm4YXWfhKb1btvd6ke8j6fQRIFTBoGbM9hZyWsoz9qB8ZgjZvu3w2j4AgL008iP1RM4vVUpQ83J7ufL6OTVfSVQResQnYdlR/PjfYpyiolWhdnbBBvtxTvYhRI/9yiy7O0FMs8/mya1wyVEgymiP0SBJ9anQHEvRJ/y9p1/9/gKL2LBnCKNR92PGIWNxrQFPrO+pRrp5kwvKUDu/sTEPBeRqnP8XrqKopzWcRQoIUjcn/etMOJlmfEgSe3Z1HWFO9SvF50YGShJk38lPsOrWLBP2XEDGmQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR04MB4555.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-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Rg/W3W7atKGqXjVe2Vbkrsh4Oyi7CV0dQmP8z++h1+XvT5HP/gSv1de3F7hSKUHSge7/vA/0pF4lJfnFRRoBcxHIjXWpvBViAbLl6va2arSevZtsmhx6zVRl5KD8itzzH4sQ206fqsF9e1qFkmcU4g+/Hc3ldAGJ0zNNlgB1k49Gf82LvUOuIfZtRloz4grA5oDRs1bmHLEgas7Z/QaGCeCH0Uk10DpbAySmGf1lFFA5CwlJl2wJ/AqRl9WSoammU07TZkUu701azPMVQk6xUsNdpjVISS430K5LNJ094wEAUS2ksm5ptMBEzH+K5iGs44R+w2jrjhAUd99DnpeEQ6NLn53dfMlgC12j4lHHI03GCu55p4eIfocfvXtO8pErjfETUiCZOXTVE5jALqiWJLG1X/sw1M6XG0Bvc/Kc5FGR81QUlQvy8MAJmtK5wGjEu+K/rQSZcsm2TFg/oGkgq5UVmyndCfkTdmwbWaLp5asyeCFdtAzTh2W1bAWsvSCZAoxhRpJ89XZw+3n7Y8Rb3fsEl6fwjeKsqx6VTumtgMDrpqU3nEDy9AoazaUw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 41984cab-ef60-4f6a-e92e-08dca1344000 X-MS-Exchange-CrossTenant-AuthSource: DB7PR04MB4555.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2024 23:01:36.5451 (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: 85IsT+RV+GSMwQyBW4lXPGC/e8D97v1hzYiEZ8ZG3JLUKK1O/55nJ/zIdKwsal2ugPoF7L0g7ie+DoAmR6S+LQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7425 X-Patchwork-Delegate: kuba@kernel.org dpaa_fq_setup() iterates through the queues allocated by dpaa_alloc_all_fqs() and saved in &priv->dpaa_fq_list. The allocation for FQ_TYPE_TX looks as follows: if (!dpaa_fq_alloc(dev, 0, dpaa_max_num_txqs(), list, FQ_TYPE_TX)) goto fq_alloc_failed; Thus, iterating again through FQ_TYPE_TX queues in dpaa_fq_setup() and counting them will never yield an egress_cnt larger than the allocated size, dpaa_max_num_txqs(). The comparison serves no purpose since it is always true; remove it. Signed-off-by: Vladimir Oltean --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index 7b0317020c89..e52f4cd95f97 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -971,11 +971,7 @@ static int dpaa_fq_setup(struct dpaa_priv *priv, case FQ_TYPE_TX: dpaa_setup_egress(priv, fq, tx_port, &fq_cbs->egress_ern); - /* If we have more Tx queues than the number of cores, - * just ignore the extra ones. - */ - if (egress_cnt < dpaa_max_num_txqs()) - priv->egress_fqs[egress_cnt++] = &fq->fq_base; + priv->egress_fqs[egress_cnt++] = &fq->fq_base; break; case FQ_TYPE_TX_CONF_MQ: priv->conf_fqs[conf_cnt++] = &fq->fq_base;