From patchwork Sat Jul 13 22:53:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13732540 X-Patchwork-Delegate: kuba@kernel.org Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010054.outbound.protection.outlook.com [52.101.69.54]) (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 DF3451487CC; Sat, 13 Jul 2024 22:54:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.54 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720911249; cv=fail; b=pAPo7L4538wn9CBlF7K6GhNhSYjXUYZxhNJYlQBTmcMISYb/ILRP5axlQwJ+YQKJOvmUNFVK+DZJJsrghU2lTw+1V/YbnQYUfKg6EZnl/u3/MIjjzfUyOX9U0huuUcI8cNyD3QGsW7Jbx3z5vReSuA6Jl/vQunQ2r4V5c+iPtJY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720911249; c=relaxed/simple; bh=szYJx9HDhS6/feLnyeMCiBev4lGopZXetTCdqyC8Mog=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ebRI3cuKvq8loKcuuoA3P8ZkcdBKJPxKMNUXTm+XnGo757/eQ/yrJLeOeafezScyaBq8121rgjq/HJCLY3RlDvV8zbFsGubojV/91EE7k67NeOzgsbUFtIBwHkgpTVAjYnNmLMzE2kZ2vRed12cSaGWf+sk0XXaSfSTyYZYESPU= 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=P+ZSQlVF; arc=fail smtp.client-ip=52.101.69.54 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="P+ZSQlVF" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wrCvwcpJiFwcwxFxhQsjSGANK85aNwEcAXuMAT+hyyIcQMck+qSYoVsxXveQBuoek4Ca7aGsswL/q4OySO/IAd/8/lG4KFr419JXrxTiCbaxmR5N5U+9kmBLjAa+LDQE3hbGy24Dpo3dP/CtA2PioXGnFs/gY6SppxlAR/u8ViIreyf+vDKARVkJcwOH5HQ1rz2NsE7AZPXnBUoWNieE/JG8vSTulk2zcSmYusKnMC0b24U7/PY9NXL4Gv3rhK8wf7eQuYUMiqZSCSzNYrPFOFHmMZsp3MxyaM6k7jQvlFN21pV+S/NrxP7YSMpugGfiSGM3ivpAGGZqCdwYS7MOVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=9v4et4kqf6akDULpyb97OeL3zo9BKzIfcLnB6xgqBAI=; b=wABSfb8WYQjcpvPIlykBaTXODRZeXFPEP2mRqgZEcb+VXx3l+qFsGcEjtVE/qF+7yhrpkASOFPvBL7zZPykX6ukOlCSKUwfDIT7eBTWkDjXwOQ2l4df8uREq8Run+5//lebx2/XEm8L+/9Pbw1DyPx6TELndgsWu0biTuwoV0WBPkTDBZCPZLuYAmFbSohw/BkDFH0HTFE40IomcZ+Y0JSyHKijOjeP6KU8RP0CvJy+bUFbAa1xbsm51Lbve3iDl46JAJO9PXzkUQtotf7JU8XNjIbqV6QtiY7D3aNP0nGO9rA9L9AlJTmc5XbQKkbuw/im58qpGIndYus30ICnSCw== 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=9v4et4kqf6akDULpyb97OeL3zo9BKzIfcLnB6xgqBAI=; b=P+ZSQlVF3sWBrlo3u26u1gKn63vLwpx0NI62h0mWHq4FcZEka8u0a5HEjHJnGz4Zq7pM4PjPsLuaoHLr+oRVsIFNWShJS0TPqYTAms+gFQhQOu/5QUOgiHZF8tazzDtHujFzLf0e857mghjad/AEl04faJHz77KEz0KLKkYA9s8= 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 PAWPR04MB9911.eurprd04.prod.outlook.com (2603:10a6:102:38b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.24; Sat, 13 Jul 2024 22:54:00 +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; Sat, 13 Jul 2024 22:54:00 +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, Madalin Bucur Subject: [PATCH v2 net-next 3/5] net: dpaa: stop ignoring TX queues past the number of CPUs Date: Sun, 14 Jul 2024 01:53:34 +0300 Message-Id: <20240713225336.1746343-4-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240713225336.1746343-1-vladimir.oltean@nxp.com> References: <20240713225336.1746343-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: VI1PR07CA0127.eurprd07.prod.outlook.com (2603:10a6:802:16::14) 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_|PAWPR04MB9911:EE_ X-MS-Office365-Filtering-Correlation-Id: dadc02d1-e00c-42eb-ab04-08dca38eaf7b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: uzxs2KYSgqbqQei/KAwA9DOAf4+Zfu2h4LAvVp1FxmsU1yNqpTBZIKA7YnoWf2WpG++LAegQEx/0RJXmS4bSt7XxHUjVwvZdOHBtoLrF8Omm94SnCqs1m9rtdoZkOAohwBDqhVMP6wnClS7fTDk0Cx1CA7NNHz8IYbiZjmAPxzsm5Yxq8t9OZz/lMYUpBuOqo8usvfSjzmpvBp7UaWnQnNb1cyos4/iWQCEe/PxpZztikfQ7MHHypV9uRfXXhyFe1EnC4N0RjWIaEeMc0glcYh1t2zL2bokxSmQljK0YTBQ3GVAwCwdN08CFrVqvhG9VOmhqLhgezGq5R7sbjXVXdV1Cvd/vvCu6jpz+dqfCAtQ6iLA5sYSu8wepN1HU+HBYg8g7bNDlmNBhpIjW3vrGi22Ijp6B0Feo+qqXR4i+x+aKrSRwCs3lKKYm+SmofJLkr2Ue1Izc76XPyifS3FmGRWJw2KmP6AkvyH0FUGRTl5KLRh8UALpQz+FPiRdUKS4wS9pOm29K5UovHja1CR7rSDDLUOqNV/sOAqpKHDD35n3F+SY6S8HyoB92JGDs4SNvmhbf7Luha4986XKUB5K4iCLZqbPEeB+wcnZs4NO3K0rZ223EoIKsBBYslUXeSB1IEw3QMabkua8wc6iCjebfpoDLjKdsiOnL6N36MOupOie4huqBDJs1+HyTfMWH2jQ2/aUekc7WLjm36mRrNtT7Rv+70Gc1MfxdVsD5sBkIVqDmfd/0lzLSo+pfjck4Vjwhlu+XUouOLw0ITyUrxyeV3FL17ljCDQVEKraksopGhYKMuKPogHQUlYaapVlvvxFfvLb1hTJttdGm9aCbAij44V5fPv6GkyJraFMK/sniKNqIks86wvMj3tsZt56wq4H9FuQ5OvOMTniZi+v+wf8BPaA/1zzaifgmIWfHAitCe0mtFwO3Kxf+KALrLfVSSEYfU3oFoxXW50pPGktwTReRn424xde0mYcuWe1Zu5OKr04RaHMB6ttkgjQszYp23Mz9837yR5Gy73WBOIUEN17aOXfrQJ6RoeGZ2chI0oqGsOzndmUKFImK/JbtOlg9zgmOvM5DVhIaTbxGJgGMWf+5KozclPS38jEJMuGa5IRBk3YaSV7MQJtOQEeBGXvzRIe/+qYn7tYOQdpuEeBuj17mBLg2jLyrFBOEfJUJpyg4ovxyVjqt8L9WXF5Mp1grIAEdabiBfNZ+nQdXp+y0gTjrhdJozz0j56yHkWpRAyLjM9VpEOEx5JVj4J0tXz8hhGPNYEGIfvlJvlH83XAf3ApwDBS6U2McDOqlFRlXS6YKGDS/+jj/SDsYzQ48VA3QXZrW+XXnzjYt4SNspqBuRP6JckvYKdaaUyMBQDVbZaHpsLRNojTNF2Ep2JWoLJjz9Fbf4Oz/6jbs9jl7nuozVEWdwQ== 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)(376014)(7416014)(52116014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Ex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8WRmp4psxXzrvNyVW6R30XA9f2LPV49OseebeLXWGjyvIQbczjF0o7p6eEcF3WbQDA73Q/LAmAkBR1W2jZqUR9Urq6MoMBRPc8/CfW1l5RCirMlaNm0pH+AL9Y7cSiGUjDMrmgBT6RtsZig490SX48L/qldYlf7ZdK7vxjVpe4p/1nGJQZ65Ve37sXARwNoEaoLi96puDgXtbXSxirAfIWvQrvgJYuv2H/EgyGxmtY+NjRGdydyz7/bmGUYixQA4UidabU+DpgbjGINoqnYXSKRTEqzh4BsMXfmgM5Po9DLlqWAkrBOrqNSBexq2Ocdlu6/trVS7bkuN1+UYUiL17Ef+/S4Y5//fzN35zWnNeJlJsOfAGkTL5OXV3Dg07fvwGXFAb3Z78URYdULUflq+6gD4OsFrVlloWvEVFVct7Cv5APhmoig4dx24Qw4PZktawJNDgHmxJFfQ06axzyv9KYmbRIJaCw8zRL/uw/o/hDD7USuEAD+mNiyaeSEJwTJzQrpqDloGw56ALe8su/1JfUBs5iWCgacEGSIgw35DjJ55ByCROWsyyh5rq7g4Qux9+7fhYRRUnXqT6qnqnQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dadc02d1-e00c-42eb-ab04-08dca38eaf7b X-MS-Exchange-CrossTenant-AuthSource: DB7PR04MB4555.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2024 22:54:00.6214 (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: zjcaMi43707Fqx9RcPNN5LQar6lMEC4ouvuHOylgJM8KWHPH7b165EYyYcGvyMgVY3vBzxNB/Rebw3ki+4OCDA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR04MB9911 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 Acked-by: Madalin Bucur --- v1->v2: none 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 ea1fcee77f9b..f844c9261571 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;