From patchwork Wed Jul 10 23:00:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13729806 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 9B97E77F0B; Wed, 10 Jul 2024 23:01:37 +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=1720652500; cv=fail; b=j4fFxeMgKGr2fWzDY47MvdLlWX/8FE0l9oMYIjUp7uCoe59mynr8109Cd9OMRE7PX8CUZbF+LbZJ2y09vhXxn50P2Dyg/uiTuDDjHbGW1P7yJIKV8aYpx5+LtTWNOk7SbTbGGn4MQg+kXLEc33ZLoAOyWF5LszgwXLcksGUUHsU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720652500; c=relaxed/simple; bh=Iiqc8RrXXfkC/M93qjIMIEWoKOiGUjbKC4KXEjQiaNo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=KNJv32EMeDHghMNSkjGQC8G66mj7Bj+CkuYjmEhzPw4xlIyEK1buJ5FZoPmJGHZntlKiTaWaIeJqDfLyQnx6n7D4qhJf565Tv0v4GNzvRo9+kCUlVoqlOTZcDT7ERpEaPLsB7vNP9H8lsJ2ivsaDbr1s5TUoOOUJO7Ry0yMdqO0= 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=qONo9SeE; 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="qONo9SeE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DFeyzavv0ZFTTexIGVicGBSxvnUVX/nsKuawh24ldyKc4SJrf5yXVYJN8PlbKMBBtyWLAdG6zs/Ke+I9GbnQ3HHjkLzBt67D8d3Aj/0U1/N1QbDeOdNkfktc+lQ21AQCnrYUtekpZu6subfOGOQl/fGqErNH7Jb+cX3zyj19BOQgX2sny3zhqbZGllHOl8FGdpjGX4ZZBLwXLtRMbbhUttAgZctlkvVHCKggbLzBEjBOo/5EBGeW+kDqrddCnGOop/wYHY8VMB16eLvnOfiO7z2O4FZIsVuvBaRxX/2/bCS2pBgzdHK80Kix5CUzn7Jee8oVTY4AaU90/NEN4ElTxw== 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=OX5Kxh2i7L1ONCVRUfVtr9VckOT4uj5NsOntuOFlsg0=; b=mz65lWSyHagVd3SjYy3NO4fNxDO1Xr/2VO2TxPBGrZzuUwYKA/+JnBhyWsJkS9t9LYGeFl++RIkvA6SKHvYKKCjH7EYXlu92+aKoJZ1Onm+Mhl36E+wplxIta+JNjbKxxCMvHi8+GhdIcLgAUM1B2WXuiQiyBz889qPIFLkGguY4TvDIkzA3OfC5chRpMb4cCHy0atlDA4Kpfg7j5jec5aBUd2OIS79wQ0/FtMXRJtfzF1IylXPJJoYjzLYWWyO6y2xJyh4GgA5cK3xmAMxsmLC9zSwchh00qBKxUnNkzJTmnGvTtLViRMe2EV9I2kqHq/HiPnUfis7chN40ipgcQg== 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=OX5Kxh2i7L1ONCVRUfVtr9VckOT4uj5NsOntuOFlsg0=; b=qONo9SeEaGG5+sNK5dOd5zghIwJr5FqMuWgTuL6sHzQrFE30aDvCGdrx5Ue9SRAn1ZuqTmfvflyBmve0HYfFHc/SSF3edJFwAS9Jb+iyO/K4IYEpoDMfaAC6r68aEySEpq9QIeJhee7uhw+uEdRENi8pt8EJSlJcg6xSbIDy8qY= 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:34 +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:34 +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 1/5] net: dpaa: avoid on-stack arrays of NR_CPUS elements Date: Thu, 11 Jul 2024 02:00:21 +0300 Message-Id: <20240710230025.46487-2-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: 357708eb-6dee-451e-7117-08dca1343eab 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: 465cMh7tJS1qQIiA4U/auNv6ttb53mLoCwvX0Uo5HpFQ5lQJUimFAlaYkaMb9FLjnCCnXVA+T7Q9FKTgIAX99oDVqexAqO4nWAetTRh3+qemTyjS+LFTc4CDCkpA6FTubM5gwHZBwO1Z+0qQRnOT7I9uQMGlZusS9BjG0sTpR0bqu4Ipu8G7ZO758d3eakGfS9Ng4Uv0n9fAw+QaEG7keuV/QoMaOYVZH+jFmjtEkleEpm9yn/gXqLu6ymugdxAJ2fR9qDZztlST9aW5guUF6Ou/VWAuvfLAN6VlmBAOR7PIZDsfA0cyhS34c89UKzJ3yfX8WQF06v9dpxALCeSJO7EUlMkLjWE5rpKTX7Zlr4VjXScMjDvLTr5oDGC3uGvORKd2hRZyxxXChnh+a/tOYnoS/bDKx+JSUwV81apib7WgPOvugIP7Df7MJ6m7JMfjdTy9YKsUZpNGhcpc16I5e9HT6shUBjvub55A/fsdEuESmbluTnge19laQ3vmVFIu0zQiVWIO6Wka0sr1WZl9mKH1bPF6cS5934kSqXFjzaREktM9QFyOFckjgYycb5FdA+mOIlNW3pmjFPW6Ehh5DBIW/nYj5SP1xwCKZSgcVaqIPmFrVAz54XONCM1vAt+MmwMiQaoFS24p6d+aLvWSdE7f/w0mt+yVE/XgFDyS8O0Ae+zYK+UM81nNOzs2v/c7dKnBRGMTMldmF9DgclIOQDjtkUojfu3Z5uyx7t8wuowae+AN7EdSGCeGM1T0/+cUjnLdn8jzlDF3NDnOcvYxQLySJ1/2bPyzey5W/+bpql6PnWummf/Uaf9t0kKr/obhZo46JTFsVpL34RfeXLk6Gr5hnYMHnkuaHH+ZDpb5CoB2/5qUHx8r+YehLlJweDJQnnZo8EsmBVPiojsIDrgsauUfPnGaPFwqmv9FYNFiCKvNki/LYsKjvfRESHZ8rZpj5EE1KjkEgb7PssvoIYd08r8hccmlkU0KlhEu2/VB9qjgn8iFHWrTvfiV1Pv2yU2FOWPQvj/cX6bwlxuZO61r3qf52cx73VjC3qbc5zIgMC9ACu6RjXFgtUgfYvNijSAotZeQLp3nTh5jfBYSOQtHKuRez6MyuouCnzjlT/oQaKGiIrFWCcfl3PKhvVUojbBUjuunAXvzwmM0eiEf+avyqC+uMu5wM6WA3weQuAJ6+gZTXXmHWqZl7XpxH252+Cu/+OB9nDLNnnwdEKe8rHrH9HWboMy4idXQDnk2r0IxUgf0x4OdfJNDgl/pRM0+nQ8Mq5cKinyVGQs3gr3xCyudMuaMZZclGBcMiytfFyNE02ubLIPmsEvasrA1x3swCa+UHfhbCZbnzAAlwdmyi1wJELn39f3W0tPZwUcUGuQ/kYY= 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-MessageData-ChunkCount: 1 X-M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ck/N/gRv23Oi6u/Ljeu+1llQX0x6JXA6a8cLOb2b+07vuUnFSyCU+G9OZS2Ac+k1Vz2lLxEaTTowR+wEXB6nJp9lD3PErowPS/Pozwca/Po9WoV9/Bca0V3J4KylzW3+ENx0F4fQkenuRaMx3bcp/LCW1mNBgFL8a6hWjHHhYW+YpaiOlVWJsIcvgkEKswm0HTNt6tTO+y3ZCNOOavW9bV/Ho8mxqPibbCPfDdL1sSlEsDX5GSAuzEtmauLXmXmJIT2H4xjqM/g5IRkF7zGfY964Hh2bp5he1fVJkdgS+VDhh0S5brbm1zu1ra66M/IloKT4G3xWa/sP3JktUsJOsPtzDfyv3SMkuV+Qa9IuhpakC3K1grbTp8n1YNXcMYNuJQvSmNBVq58BnI2O0OxTYIFRDMrM4bZBYdjrdzpF9IBiNxTO0CFGpJ+4L37YfZhZvzroxySh9BZgTbCz9CmJWPLgPo5SpCEyEcLJlECRCPzavTKX6Qm+5TIQp0DTBF9dJgElgIUH9SHT8UOBJ0vBH6S55eQb2vTXh56VlahJtouZcg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 357708eb-6dee-451e-7117-08dca1343eab 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:34.2935 (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: JrDSoGLKfszAhq/Mjdfu28S4damfoK2xaWXV1nd0TFMCtVwlFTfLvNCR+hsral8oNWaHbtFeFYBGvQKLdg0iMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7425 X-Patchwork-Delegate: kuba@kernel.org The dpaa-eth driver is written for PowerPC and Arm SoCs which have 1-24 CPUs. It depends on CONFIG_NR_CPUS having a reasonably small value in Kconfig. Otherwise, there are 2 functions which allocate on-stack arrays of NR_CPUS elements, and these can quickly explode in size, leading to warnings such as: drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:3280:12: warning: stack frame size (16664) exceeds limit (2048) in 'dpaa_eth_probe' [-Wframe-larger-than] The problem is twofold: - Reducing the array size to the boot-time num_possible_cpus() (rather than the compile-time NR_CPUS) creates a variable-length array, which should be avoided in the Linux kernel. - Using NR_CPUS as an array size makes the driver blow up in stack consumption with generic, as opposed to hand-crafted, .config files. A simple solution is to use dynamic allocation for num_possible_cpus() elements (aka a small number determined at runtime). Link: https://lore.kernel.org/all/202406261920.l5pzM1rj-lkp@intel.com/ Signed-off-by: Vladimir Oltean Reviewed-by: Breno Leitao --- .../net/ethernet/freescale/dpaa/dpaa_eth.c | 20 ++++++++++++++----- .../ethernet/freescale/dpaa/dpaa_ethtool.c | 10 +++++++++- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index ddeb0a5f2317..c856b556929d 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -931,14 +931,18 @@ static inline void dpaa_setup_egress(const struct dpaa_priv *priv, } } -static void dpaa_fq_setup(struct dpaa_priv *priv, - const struct dpaa_fq_cbs *fq_cbs, - struct fman_port *tx_port) +static int dpaa_fq_setup(struct dpaa_priv *priv, + const struct dpaa_fq_cbs *fq_cbs, + struct fman_port *tx_port) { int egress_cnt = 0, conf_cnt = 0, num_portals = 0, portal_cnt = 0, cpu; const cpumask_t *affine_cpus = qman_affine_cpus(); - u16 channels[NR_CPUS]; struct dpaa_fq *fq; + u16 *channels; + + channels = kcalloc(num_possible_cpus(), sizeof(u16), GFP_KERNEL); + if (!channels) + return -ENOMEM; for_each_cpu_and(cpu, affine_cpus, cpu_online_mask) channels[num_portals++] = qman_affine_channel(cpu); @@ -997,6 +1001,10 @@ static void dpaa_fq_setup(struct dpaa_priv *priv, break; } } + + kfree(channels); + + return 0; } static inline int dpaa_tx_fq_to_id(const struct dpaa_priv *priv, @@ -3416,7 +3424,9 @@ static int dpaa_eth_probe(struct platform_device *pdev) */ dpaa_eth_add_channel(priv->channel, &pdev->dev); - dpaa_fq_setup(priv, &dpaa_fq_cbs, priv->mac_dev->port[TX]); + err = dpaa_fq_setup(priv, &dpaa_fq_cbs, priv->mac_dev->port[TX]); + if (err) + goto free_dpaa_bps; /* Create a congestion group for this netdev, with * dynamically-allocated CGR ID. diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c b/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c index 5bd0b36d1feb..3f8cd4a7d845 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c @@ -457,12 +457,16 @@ static int dpaa_set_coalesce(struct net_device *dev, struct netlink_ext_ack *extack) { const cpumask_t *cpus = qman_affine_cpus(); - bool needs_revert[NR_CPUS] = {false}; struct qman_portal *portal; u32 period, prev_period; u8 thresh, prev_thresh; + bool *needs_revert; int cpu, res; + needs_revert = kcalloc(num_possible_cpus(), sizeof(bool), GFP_KERNEL); + if (!needs_revert) + return -ENOMEM; + period = c->rx_coalesce_usecs; thresh = c->rx_max_coalesced_frames; @@ -485,6 +489,8 @@ static int dpaa_set_coalesce(struct net_device *dev, needs_revert[cpu] = true; } + kfree(needs_revert); + return 0; revert_values: @@ -498,6 +504,8 @@ static int dpaa_set_coalesce(struct net_device *dev, qman_dqrr_set_ithresh(portal, prev_thresh); } + kfree(needs_revert); + return res; } From patchwork Wed Jul 10 23:00:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13729808 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 A322014E2F4; Wed, 10 Jul 2024 23:01:42 +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=1720652504; cv=fail; b=H4cvqDh+ytBBSXqcMGX9xkrMrRO74vLsCHdZIKxkbfEuCX2jbCWnDSkCinDaWVty6ZktwOs3TVwT7aqxdoojG4klNPouibO8it3hYTtYTqn16CRVnRnzo7N/cuFdJdCtrGBAztFpb5fQqJDG2nq5fZOW2aU7UYw9sQLbKcEqNKw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720652504; c=relaxed/simple; bh=botRxg0rwhhlcxaJBJdZkHd+Yl/0QewWkXDiypVkNuE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=X5l4KukFJUrtD9/lMolpucullcfG8f8+aElr/0vpaKSwqqQvCzRjviGXnR/L5+RJc/R7WygN/kkk9yenM5ubFkgqnah31kArEn5Qq6o8hvZzSsxUzrOtPFAP+O+tNcnN5X93S7+r0GozBd/pY6LkL1RJwwk3Cfobyg/fKT/0yHw= 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=cAWIyp9e; 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="cAWIyp9e" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M+8QpEZM8QdY3gxBmNRxhqd4n8n3um/UJr45pKgc+oA8Vij49KmlK0MXg5mxf+yw80YjbRYLG+c/WSTHdT5oQ4rzQZe+4H0uXAUpEi2SIAJcs3hx2uc5dpczpqkZZFfEMRQLjzTDHztLikMX51qP6tuAlcknSD0wavwhrb8jBPkgHH/JS/xrT9NhomjYE/6Dv9mrqkye+16d8hjYh35XzayW98gQpfk8Ql8Nb9M6EiaUbM2G/0L12te5bG6uzM7v4WtBZlpKPv1wN7XYnwUjaAsvfg5LGdvghN7sjniec4eRQKKCc1wtzOnMKz3BpFxs39p447yc58h5f7Qx8tVb6w== 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=QVziIGgqiuo//YWqE8wPtpIQDnNL9ns/3Nq4xxaMHYo=; b=ZIPIUZK2CDzl5hzyoEBu3eNyOGNJhUbevE5o84fnEXYh/5iLG3jDlW156zxRfcHP+CIyEgLMxNLdnvzuqBn4B905BQlswk52NqzU4z2DMAvZicZWhSJgsP1pf1pisOZBV5Uf4asFHELJsGvbwJyTW8eFkkMZ0x66Er89IYS/hSgcnJHbptlKS1/aAoTC5IYP7kKVgrg6qOmNvxAiQSQYiQzeTs7YUxEbBveVN3Wmp2rcIhUDFG71P9ZdtkDPdntgNzj6Owyjx3TMY0fVF3yOsTEv/zvqKlfaotKbZjlxHzSydgQXo3TyIW0snTBMSo60fAko6Py1Q91XwDBmgml7fA== 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=QVziIGgqiuo//YWqE8wPtpIQDnNL9ns/3Nq4xxaMHYo=; b=cAWIyp9e+EGF1oZtNkgFJF869OMXWiB8lLTGiLqf2LOXlOV+Iph1qztZpgVWipBlEj2WZe9X8AQjF1fOg5Y0LezG82Qy5CPPmD5Dx0YoBZBrpM/lyCs0lG7e5xK1DSxpmjyAesik0fghVte0PEoGfHlfzv84lLpwMmGv/FXc0RA= 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:35 +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:35 +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 2/5] net: dpaa: eliminate NR_CPUS dependency in egress_fqs[] and conf_fqs[] Date: Thu, 11 Jul 2024 02:00:22 +0300 Message-Id: <20240710230025.46487-3-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: d5b5c1b4-7686-4cd9-82d9-08dca1343f54 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: XDuN4V14F7cBchziZH0pt7I9rWdEJgg4h4BkVF/qdHCbC/dPWXAFGYCBpeKk82HR/g9PcncPya28UqtU96U//E54w8GAD3xYBynvQwFjEQiGUIBaMCYFOp3XHvXx5H89p4xdVwQrRbApFdl7l/JOIRjT7lTzEOwkDy/2tMYCrkQqzYtg/EEcw7wNuXr5Itf1D/FbPUWNxiCsSYgNs8RKf5iGdn4tMFiEPjsne/5HkmUseIqVqu2JSklIvAKhPWRHdTqMFLtQStRUnmQSjhWYXhXscaEGF4R8jPfnEwsEpGy95ID0QTbSFzMfNf5rkUgItOhV8ayVvmWGjuoghiKuwv2TMtp2xyP0z8b+bn9r97SEtrxJqDP4L3F1m4egtXwLSnqypd1gzTrEAf+yuxEs4wSrVEBVqOzwY8Rr3YYgQU2VtA7ZgrNz9IsqmD0xVc0TkKQtxm95WX2Cjp0JnNUPbCFRJYOAKqTVmEvMSVO7aImmXdPowzSXiQkgDfRaJx8FmTfdQ+zPHJ5ZkAzxcugIB20IsxLMwe7tvoahwz/qcLAXJ6gPx9beMXJh3ZdTcenOS+Zf3ouhHiPJb+SO7BxkWGXARYjP/rjNRb472qdICns+I+rpYUYAGjMSL3t4tl08Fh2a4CYRpPURhs3GFnE2pbmZNpCrHWGE9Q77klrm9R6E0Jkk4KvunxcTNQuvymvIZlLt6foeMInL2/y3sTyXIzD3sA2YFZJ7hyn9LG/lbticXCGWoI9ID4Dp7vtyQY3Mcf46La369b9pvfX0yVTGlRB+l5kIq570OvRsJQqSTvcBtzPnXERzw6/UcVpwIoApJL26Q+IhQKY2tOU0F41D4awME+OzaV1dYk3khi23CNq7eo1JvmFbMs+VD2JuCSY72ZIKb/zX6ci4a6FXRAi4Z+WXHbI86qx4FUpif/1Q75SynqakQ3hjQay2iCCBxVVw/KUJgH4ejsXFKEQp6T7EjDhRUwBbR5g4d5TKycFXbl5jA6PpctxQ1UUSIuYQNfCuQOInXv30SDf87vSLxoORzovAHHflzXEux2wdYRTFIgxVuYiHVWvUoda7Dw7QHpXI8cSFvKutrxlE03HpOl6wrZ9jhzz4wJX+6uDURR0O43A9OvbZU7Bg6exIEW34GPTdvIwyAxCew6S6dxtMXquiwVfESPAl8n7QTnMpxZ9nH8LyakWglQrRAPRbGJkCA4ZyGBEvjftBUvkfO0g3EGVRtq89iw+e+axrRcUhmo5Ttw/EsQZahmdWML/TXW2NoBSPi5VwWvlsPlgv602nBWmMlQPeNRC64WYP8Clia94xGr8HxW8olijPa5Kdlq0y1spi7VYKv5cOD1uMZ45XovxIe929Hp+n3cTSp4p7/LCxU2MG1315EmbYM0OXHcxZd3xD1qQby1+kSc6x0zb7TVvhxw== 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-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gkH0+ytB8yg3ChJe8o+zuh0O66qdZhs1Yq3SYjpaT9ZThxcG+CDAhHJctOz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+S5ByRoCnk8H9qwj72HpP/+9Sb85l2ReC1S4cCP2PipVSSqrYOQDk3HQOuitZQjDFTaW0aPk5XG9bBQz7xlj8Ag4QZPqXDN6lfQhk0L8yPM8BtFYkWomubPaAaC+XqfdQsmePGt52dPFCqEiy3tPcew9IzxgDKLds8hKTdx47y0Si9byfeGSbpKdp4CnNeHHTZMrhE6VL7Lwaor1GUEQmgtmQds2anKkulDekbQjWdPGiV9N5/vW4A3K+VdZA2C0r9zRW3xBkorlyaPgIQDqGxPuyXjU6Nj7PMktq9fYyhR7Y1J+CnwjlT7crdt9KMfjacJgtxoT879tNdBob8C+sBYz+ab5mGqkv20uPfkUH4wfCmxwrmodFyTAvrr2oAAjYoysaRr0pKcNt4WmdPV2QQRe+nIBsNERg6pPRBBx0pmCvY0BbI/fz3edAOOcHR/gwqrtBjRQ285GxDH55ECDsEmZGQghg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d5b5c1b4-7686-4cd9-82d9-08dca1343f54 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:35.4151 (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: 97E+EPn42t4iGijqDKnOeg3w32acdNEmNbJwuImZ8wZVjQKr1aSr1yc+Gq2K1uGWwPahUgEkOHKFFO/BC42RsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7425 X-Patchwork-Delegate: kuba@kernel.org The driver uses the DPAA_TC_TXQ_NUM and DPAA_ETH_TXQ_NUM macros for TX queue handling, and they depend on CONFIG_NR_CPUS. In generic .config files, these can go to very large (8096 CPUs) values for the systems that DPAA1 is integrated in (1-24 CPUs). We allocate a lot of resources that will never be used. Those are: - system memory - QMan FQIDs as managed by qman_alloc_fqid_range(). This is especially painful since currently, when booting with CONFIG_NR_CPUS=8096, a LS1046A-RDB system will only manage to probe 3 of its 6 interfaces. The rest will run out of FQD ("/reserved-memory/qman-fqd" in the device tree) and fail at the qman_create_fq() stage of the probing process. - netdev queues as alloc_etherdev_mq() argument. The high queue indices are simply hidden from the network stack after the call to netif_set_real_num_tx_queues(). With just a tiny bit more effort, we can replace the NR_CPUS compile-time constant with the num_possible_cpus() run-time constant, and dynamically allocate the egress_fqs[] and conf_fqs[] arrays. Even on a system with a high CONFIG_NR_CPUS, num_possible_cpus() will remain equal to the number of available cores on the SoC. The replacement is as follows: - DPAA_TC_TXQ_NUM -> dpaa_num_txqs_per_tc() - DPAA_ETH_TXQ_NUM -> dpaa_max_num_txqs() Signed-off-by: Vladimir Oltean --- .../net/ethernet/freescale/dpaa/dpaa_eth.c | 43 +++++++++++++------ .../net/ethernet/freescale/dpaa/dpaa_eth.h | 20 ++++++--- 2 files changed, 43 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index c856b556929d..7b0317020c89 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -371,6 +371,7 @@ static int dpaa_setup_tc(struct net_device *net_dev, enum tc_setup_type type, void *type_data) { struct dpaa_priv *priv = netdev_priv(net_dev); + int num_txqs_per_tc = dpaa_num_txqs_per_tc(); struct tc_mqprio_qopt *mqprio = type_data; u8 num_tc; int i; @@ -398,12 +399,12 @@ static int dpaa_setup_tc(struct net_device *net_dev, enum tc_setup_type type, netdev_set_num_tc(net_dev, num_tc); for (i = 0; i < num_tc; i++) - netdev_set_tc_queue(net_dev, i, DPAA_TC_TXQ_NUM, - i * DPAA_TC_TXQ_NUM); + netdev_set_tc_queue(net_dev, i, num_txqs_per_tc, + i * num_txqs_per_tc); out: priv->num_tc = num_tc ? : 1; - netif_set_real_num_tx_queues(net_dev, priv->num_tc * DPAA_TC_TXQ_NUM); + netif_set_real_num_tx_queues(net_dev, priv->num_tc * num_txqs_per_tc); return 0; } @@ -649,7 +650,7 @@ static inline void dpaa_assign_wq(struct dpaa_fq *fq, int idx) fq->wq = 6; break; case FQ_TYPE_TX: - switch (idx / DPAA_TC_TXQ_NUM) { + switch (idx / dpaa_num_txqs_per_tc()) { case 0: /* Low priority (best effort) */ fq->wq = 6; @@ -667,8 +668,8 @@ static inline void dpaa_assign_wq(struct dpaa_fq *fq, int idx) fq->wq = 0; break; default: - WARN(1, "Too many TX FQs: more than %d!\n", - DPAA_ETH_TXQ_NUM); + WARN(1, "Too many TX FQs: more than %zu!\n", + dpaa_max_num_txqs()); } break; default: @@ -740,7 +741,8 @@ static int dpaa_alloc_all_fqs(struct device *dev, struct list_head *list, port_fqs->rx_pcdq = &dpaa_fq[0]; - if (!dpaa_fq_alloc(dev, 0, DPAA_ETH_TXQ_NUM, list, FQ_TYPE_TX_CONF_MQ)) + if (!dpaa_fq_alloc(dev, 0, dpaa_max_num_txqs(), list, + FQ_TYPE_TX_CONF_MQ)) goto fq_alloc_failed; dpaa_fq = dpaa_fq_alloc(dev, 0, 1, list, FQ_TYPE_TX_ERROR); @@ -755,7 +757,7 @@ static int dpaa_alloc_all_fqs(struct device *dev, struct list_head *list, port_fqs->tx_defq = &dpaa_fq[0]; - if (!dpaa_fq_alloc(dev, 0, DPAA_ETH_TXQ_NUM, list, FQ_TYPE_TX)) + if (!dpaa_fq_alloc(dev, 0, dpaa_max_num_txqs(), list, FQ_TYPE_TX)) goto fq_alloc_failed; return 0; @@ -972,7 +974,7 @@ static int dpaa_fq_setup(struct dpaa_priv *priv, /* If we have more Tx queues than the number of cores, * just ignore the extra ones. */ - if (egress_cnt < DPAA_ETH_TXQ_NUM) + if (egress_cnt < dpaa_max_num_txqs()) priv->egress_fqs[egress_cnt++] = &fq->fq_base; break; case FQ_TYPE_TX_CONF_MQ: @@ -992,12 +994,12 @@ static int dpaa_fq_setup(struct dpaa_priv *priv, } /* Make sure all CPUs receive a corresponding Tx queue. */ - while (egress_cnt < DPAA_ETH_TXQ_NUM) { + while (egress_cnt < dpaa_max_num_txqs()) { list_for_each_entry(fq, &priv->dpaa_fq_list, list) { if (fq->fq_type != FQ_TYPE_TX) continue; priv->egress_fqs[egress_cnt++] = &fq->fq_base; - if (egress_cnt == DPAA_ETH_TXQ_NUM) + if (egress_cnt == dpaa_max_num_txqs()) break; } } @@ -1012,7 +1014,7 @@ static inline int dpaa_tx_fq_to_id(const struct dpaa_priv *priv, { int i; - for (i = 0; i < DPAA_ETH_TXQ_NUM; i++) + for (i = 0; i < dpaa_max_num_txqs(); i++) if (priv->egress_fqs[i] == tx_fq) return i; @@ -3332,7 +3334,7 @@ static int dpaa_eth_probe(struct platform_device *pdev) /* Allocate this early, so we can store relevant information in * the private area */ - net_dev = alloc_etherdev_mq(sizeof(*priv), DPAA_ETH_TXQ_NUM); + net_dev = alloc_etherdev_mq(sizeof(*priv), dpaa_max_num_txqs()); if (!net_dev) { dev_err(dev, "alloc_etherdev_mq() failed\n"); return -ENOMEM; @@ -3347,6 +3349,18 @@ static int dpaa_eth_probe(struct platform_device *pdev) priv->msg_enable = netif_msg_init(debug, DPAA_MSG_DEFAULT); + priv->egress_fqs = devm_kcalloc(dev, dpaa_max_num_txqs(), + sizeof(*priv->egress_fqs), + GFP_KERNEL); + if (!priv->egress_fqs) + goto free_netdev; + + priv->conf_fqs = devm_kcalloc(dev, dpaa_max_num_txqs(), + sizeof(*priv->conf_fqs), + GFP_KERNEL); + if (!priv->conf_fqs) + goto free_netdev; + mac_dev = dpaa_mac_dev_get(pdev); if (IS_ERR(mac_dev)) { netdev_err(net_dev, "dpaa_mac_dev_get() failed\n"); @@ -3472,7 +3486,8 @@ static int dpaa_eth_probe(struct platform_device *pdev) } priv->num_tc = 1; - netif_set_real_num_tx_queues(net_dev, priv->num_tc * DPAA_TC_TXQ_NUM); + netif_set_real_num_tx_queues(net_dev, + priv->num_tc * dpaa_num_txqs_per_tc()); /* Initialize NAPI */ err = dpaa_napi_add(net_dev); diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.h b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.h index ac3c8ed57bbe..7ed659eb08de 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.h +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.h @@ -18,10 +18,6 @@ /* Number of prioritised traffic classes */ #define DPAA_TC_NUM 4 -/* Number of Tx queues per traffic class */ -#define DPAA_TC_TXQ_NUM NR_CPUS -/* Total number of Tx queues */ -#define DPAA_ETH_TXQ_NUM (DPAA_TC_NUM * DPAA_TC_TXQ_NUM) /* More detailed FQ types - used for fine-grained WQ assignments */ enum dpaa_fq_type { @@ -142,8 +138,8 @@ struct dpaa_priv { struct mac_device *mac_dev; struct device *rx_dma_dev; struct device *tx_dma_dev; - struct qman_fq *egress_fqs[DPAA_ETH_TXQ_NUM]; - struct qman_fq *conf_fqs[DPAA_ETH_TXQ_NUM]; + struct qman_fq **egress_fqs; + struct qman_fq **conf_fqs; u16 channel; struct list_head dpaa_fq_list; @@ -185,4 +181,16 @@ extern const struct ethtool_ops dpaa_ethtool_ops; /* from dpaa_eth_sysfs.c */ void dpaa_eth_sysfs_remove(struct device *dev); void dpaa_eth_sysfs_init(struct device *dev); + +static inline size_t dpaa_num_txqs_per_tc(void) +{ + return num_possible_cpus(); +} + +/* Total number of Tx queues */ +static inline size_t dpaa_max_num_txqs(void) +{ + return DPAA_TC_NUM * dpaa_num_txqs_per_tc(); +} + #endif /* __DPAA_H */ 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-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vca+j1sOJT4A2fyp6tg8csocS90aCgYEXoT7i50wXshScmjUa6cjbj5s5OGR5PaMOWZixAk2cdsqQClqcdgWsuI6PWos/Ie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Q206fqsF9e1qFkmcU4g+/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; From patchwork Wed Jul 10 23:00:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13729810 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 6DA5E156F54; Wed, 10 Jul 2024 23:01:47 +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=1720652509; cv=fail; b=QmNpKI5GlWKzE/51GaKC9228FJSQ3ZH8xLmHoOtno53YdhlXY1+ojoSrLN1DxidVuE758UQ3HlveoQ6EzERoERNOLj7Lfzh1D1ljTCBng2ARDL0vDbU1d3E1lQa03VeyAzV8BXCjz3ZJQJtfNmzLpTCdfqCLlI0IwcxhLtb7E5E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720652509; c=relaxed/simple; bh=kMpSBs7ZtwwMYVsnVgx4LQJeIwotdegcwP97M8Od3pU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=iJDwhDz8wjML6u0xIh6yaZxwI++1W82CxP7iNsl8WXA1vDsoaq9bcrfXBjKb9zSXaNu5iXguSrzL8TRZIoESHk4NUIqVGL57Z+87/UvGDpWW/8NORrOkcqOO91pVEa4R1P3hZbQdRzX76Pf9ejVnxK0KVdUQXnLOC98tHRUuVi8= 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=bKwRYjnN; 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="bKwRYjnN" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EKu9VSnqd8jtuKRGY+XC0aiv1f8E6ZzH2VlDjeRhQO+kFUgUTK7eLX55ItwaBRKRo3HjSCabhfBPtfLF1kxblN0uNqZkjM0xdOFHSGwhmaYl7YsYU92mc1Sc+Fr/LPpjEM3+dgXwAeC2j7Fe5RZ8H/ECYhb6HAZK+7nEhmwCooj82VY8cxLa5+PzgAkNYbosVA92LpEFJy5Hgka2iSrxzlPWTc6+ep0lltr1OROEHbxN7TxkSJcsnrBmU5qcjO0gcmxxGD2dTeI5023k6IJ0d+AkTqtNv7HuSqGgd0qxCfV9D7I+WBhrEMgAkeY4dy+6T+WWUG8POQEJrUOh8Iq1tQ== 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=YsWsdmHly93/rDvmdQVyP4SfyLHyblGCvZkBjs9fKGQ=; b=S1YFtDYWtr2BdSTTVt+HpIt4dTRo6iq5fCNmxkHrFkQCV6kqlz81LBWuhck80OEj+ejrg2J7KLlSU1pnWvarnHbUTR54Y13hEalOOPcEL8iETa829nFp3xu939zlQNOvvDGpwrFbTZikd8Df1FFgaFhzUA39LnegpgssFVAkhlDNGy+T1QpWHG9swXICbzsI/sglf6QDdyqCY5GHdDxyPmIWyRDsz7VgVzAWjtykEQgwOy4IYYf+yiQDQ8/FLfafQ4x4SoxuhrDOZ7vAfdHISigP9GTyG/bnBqy5gMpMfuVpeNKKBDMGy/u9mGNYSFNmvJEtjMUwsKJhkpLU2g35IA== 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=YsWsdmHly93/rDvmdQVyP4SfyLHyblGCvZkBjs9fKGQ=; b=bKwRYjnNI9fP6uY4Kd7QAHnA3mE1coaOrLkw4u3d1vtplGqz2VePPtdi5iWhMUSCjz7KknqhBrSFORHNJjXEYlfBavLzZQ4MXxC6FdObh7SPqTpc4eUUR8k+RDHJLtArFt8Z+XcnvUxEe1z8RlquQgkTxDdYamtAr+47mdIMYlE= 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:37 +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:37 +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 4/5] net: dpaa: no need to make sure all CPUs receive a corresponding Tx queue Date: Thu, 11 Jul 2024 02:00:24 +0300 Message-Id: <20240710230025.46487-5-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: 24ca6036-6559-4553-3082-08dca13440b7 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: 0/sNvt2LEQO/egUOx4MTRfTqLkQ+12NghJxMik3epTXTcv/lqJ90XYkBD2Pr86qowvL3pTGQxLWcRwoysArhutjZhWz8DOWq7+aie/hScHQEkX+NvSMIkEqg7ji4jHzRdCPe6bSQ+gILjCh1Cmo+UDrn37d1HnFe6JBrgR3YWbu8DvF2fH8RcDbuWaQiS3PBQnaxZ0iGR0rzVa4vBqJwlZ85epuEek/smHKbZ1/xFbkk6Ny9pDST5XqFKz91r9bFr7lqt669k6n5fysspkmJD0Pyx/hRgYG6IsZdFSUU5wHD7J2/WEELcEjAM4CdeAs3mI/Mkl1+6diHFg8KdkZypdz+hQQnIm1xT3xIE2SM+DvooRbTpUsXMQXY4viTWIKhQ2PuHbYgabZCnw6gBXF7+0a/f7Uv4GpYhIr/DI7Za+Red0KeQSMrobrgmdAx7YacIAlNt7f3yywJSHalx7m84eCPsmhxs/32CalmVmW7FNtw8q0zQEFqrg5Hpl90+P/LKluKfuapCXXIyQt07Gu9dToujNimKNo9z5vyALsRG5wEv6lbb8e+y5cql4/0ywfQy9Tuyx4dgcJ58BOQyXTkjoaMJvtx/bfe5O0YBMc0QrxuNPwuQQWCX4CO8Jj6zmBKw9uOThnUWoltkKjmhXEtAAGQBH95iy17slMzgNYJ7LNV9vsNtrtay615h9VBwRbRs0dEoNucvd9+IR8/OHY0j7PmlD/oPXxICwfjdlcwAY/qEGGfTpM8wqnWn91PLPv+ZzRwCQ8E6Ff46RZ6Wnchk48To3wzfROVz2GHrT6n5W7t3nMxR8WmyZfFsJbiznnfIB3NTVmRWLqJfTyCkKfuFHK0cSLd46L9MHeKIZ6xzDZVg0y8xfSELPJRB0s0J0JDgL+CiqJDX/MM8RxzmfRmu3fwcQ01qxt0hcXyXM5Ir+OjtjotrkPTF+p/BYFuqGx4FhteMHLftDkOCAF1q6/cRsNQdHsuOHlPvaBfUWFDd8ozqNUXGsw42IW5ogQDS0hS2zsON2OV6bubnja+HLS7SUzEu9YbpkxwgEDkTDkPMJG6C0AHxassc+f+o85diKQUxlrpiwcLfXIBOfrGvj9akqmWwFoqALy2/dDrSb7AQ108MWClLlwPXn7qRMwbvEgEHb2fEVW8hE2mMhdZvF0blZ/n1vbrwl9NjItDh1uHURwoGX7zzMcQpLnwuiHekQSGETOExwRdKS4Po/q8aEPzgnSJiFsVWYBha3VW9tJQ/p4ZEk2fLZZnq0QfYxfB11t5odsQkkozxCvrcF9+P5ka+LYpzoL7M03P5SGplppt8Rxiqmpz5ViHKczm9xsHVAvrQeGG74TLSQPsXoOvfK/8wcGyQtTOd+35d+6jfQTDuDniFfxv3ITBDrGkZ2edqe/mRBFN3V5/yAoObjiPLRJCoQ== 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-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mK4isxRgqSftC4qfp5SneA+idMJPNeML9y6ybGPgk0xyt1dehmVvkuiz7ovz2bMJXPqqc4i7xEez3mB8tcR8CHYyVFhBtJqCxSXG8ohEfTkgzWnur/uoU9OrCiFK8u0R205sBdPQro2RxHpOh+gXYeR0li96b0eQVc2CQfYpRECemP9XAc+jfYTibKutagcXeAhHBJPT387L5jQii7SJmPw6k6Q2+9KEK8ohOO2FEkQZpBHb8nObqmoP7+DfE6SGV35P4hQAdP9ZcXhEYLC2Jg6nxDDHsH0FaFsUHwAEQu9lXIOiFf174RNgh2QFpAoYHwTw0xYr6my50C2Ab1xDJaQI5DAn/ZMOOspbHTR0EDEgNI9dTOW3ctYhrGelDmtsB63HY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og6zjR8CisoOLV6qAaoYfVdwRKsCIuuOMGsdfhuh/3OMYMCSCfQxRFdugOZvpFHxeG7RBQLHU78muwga5XsZH/1s+QVpv3O1ZzCOLVqQzXiD0HnGROiGE6Vyht90Dr9khViO3AzmosXdfNsaiSZcL3X1fKFJw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 24ca6036-6559-4553-3082-08dca13440b7 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:37.7347 (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: ZRCV+CNfoCLqoswWIdoMq2mR6afoxXFtsyAWAnYDnV59+iUKsTTd8qVnTn0Fx2JCGOsBqV9niGD/Vj86ixcmPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7425 X-Patchwork-Delegate: kuba@kernel.org dpaa_fq_setup() iterates through the &priv->dpaa_fq_list elements allocated by dpaa_alloc_all_fqs(). This includes a call to: if (!dpaa_fq_alloc(dev, 0, dpaa_max_num_txqs(), list, FQ_TYPE_TX)) goto fq_alloc_failed; which gives us dpaa_max_num_txqs() elements of FQ_TYPE_TX type. The code block which we are deleting runs after an earlier iteration through &priv->dpaa_fq_list. So at the end of this iteration (for which there is no early break), egress_cnt will be unconditionally equal to dpaa_max_num_txqs(). In other words, dpaa_alloc_all_fqs() has already allocated TX queues for all possible CPUs and the maximal number of traffic classes, and we've already iterated once through them all. The while() condition is dead code, remove it. Signed-off-by: Vladimir Oltean --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index e52f4cd95f97..9c0bac58a0da 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -989,17 +989,6 @@ static int dpaa_fq_setup(struct dpaa_priv *priv, } } - /* Make sure all CPUs receive a corresponding Tx queue. */ - while (egress_cnt < dpaa_max_num_txqs()) { - list_for_each_entry(fq, &priv->dpaa_fq_list, list) { - if (fq->fq_type != FQ_TYPE_TX) - continue; - priv->egress_fqs[egress_cnt++] = &fq->fq_base; - if (egress_cnt == dpaa_max_num_txqs()) - break; - } - } - kfree(channels); return 0; From patchwork Wed Jul 10 23:00:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13729811 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 BCA75158D8F; Wed, 10 Jul 2024 23:01:49 +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=1720652511; cv=fail; b=cTRoKW0lXqgvK6zreN49HMQCG9csuHC1Frhi3G0vJoB5jIYMN/5wLDlqEx1wCOPmJ/T72h+ktoD1wS95Mjk+QJq9CfynjVi8yYOfYSECFBXPnli8ZlO1q5LmpW1TCJRw/3mSmvVZuoV/ONgBJ0ZSTv6QNZkfJ3TNJ+JGXGFXDB8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720652511; c=relaxed/simple; bh=yqCbocuJTcY5fY1ymmOXS/wzclkieIcosqXkK7+tkFc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=g+wcCQHjgnzzkYGfDQxH9BSNL5veAFU7VPLvhh2BeFj5qv/JlBbL/Dp3HuT6vMEjbEFXJzs/8hLf8nD6GmgEreY5E5Y55hS4HoHhJsWO5HuLtE74MsniM3q9TdfoElaP9BISBxIsx+7AGuSF64rzrGIdPLQbwOPn6ANQoDD3PkA= 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=mzpdnB+F; 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="mzpdnB+F" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mpFUTFI2C/l0jnTf1a89TK1dGwVMFWqI5WZm94BYGGOiRl2WdwLQnw2zCv5xE2DCJZn/bJEMNs2SyiRvopOmhK3czOf2fOMVQMv8hpTqMuScuaV19U89ihdFyToM6Kv652HoRbEXEDlS6w/Jt+e7zrEPVahxXovlP39+qJwSKMuM8SHGd4B88hrlAANpG/U4g7WoOwnyPrOzYjADlOKNpyp1vxENzhB1fws8mmlUaLbsjxjg9+irOpvmI5Y4aemqUPFZB+B8HtcNHI4+mmH8W6rLURwR67+U4SW1hRdVcsk9h/FoF8vA4rR7zvlUUViuwyfsABsC7D1Pkj2xNjbQaA== 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=LK0sDcCs02s8klvKJo36buqPYOhHP35At8avbExFQ38=; b=Snms6XVN74KWOc9RSX1sV0KAdkdA3usxsHu6duAWWDugtIR0AbhFXZmqxkx5Lo+m4DqpP2yx+h+Im9mmud46gU3/7SUOU80ONWw3OGpR+/AYb/qCQ4gZWkF2DOxoC+PVjoIVdS8mCKia0dgLm+CpNBwe64LQ/c+zRP0b9RymWMZhjzx9mszs0puBoERE0LLj2ibG3F3gLdOauuG7u44jloeq86rbLa8jQsAyPIeVNcwYxKB+uES4LffTsUIgNP9T0R8xRtnNJ9GqppWmm6PQDA24KQ1QwV7h+WLdNhYFZOHg71QMLPa4EAcYBRPNlFrBbeU/X0Ef2W91KQTyueD/AA== 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=LK0sDcCs02s8klvKJo36buqPYOhHP35At8avbExFQ38=; b=mzpdnB+FkKqzA5KYI8X7jOmWKZYtv7Onazx2F93PX5z6CparBsXXl+JolN7XxEQyFPUe/gbw82JDQFinjKyFmXO0hZ2kKnrGmoxpOiYFJsz+G91tNmXhP/ISybqgYyFwvCa3FrBuCcuHYmQ6QndLipeLVU2JQgO7Mbu1rMF/0KQ= 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:38 +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:38 +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 5/5] soc: fsl: qbman: FSL_DPAA depends on COMPILE_TEST Date: Thu, 11 Jul 2024 02:00:25 +0300 Message-Id: <20240710230025.46487-6-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: 35464288-2b3f-444d-e3e9-08dca1344160 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: WVbp6EwsvQ9Bz/bUCLEifGXCGsiKaG7D/+vUZAOXseqrU5V8f9cQl2Lr5L/Oldgxx8A6yotPSBGy1whYdA1TH5dMVObFHomNeh0z6SMz4l1SqMJMKBOo5SPITW1IAx7+zMKX9m6nQrnIpWQ0v7aPsduqjR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3Mh4gvAieFAo+XGTH00PSPUqCc0/2lulQh+31gBp6X4mpkznFpAWA84/ifB5RmzP+mYK/ff1Sr7qiwTNAUrF9QpTReS9Af2FNylKfrfgmN5UowkII07GP0qSJ0riI6Oo9t5cyQQt55JXQuhxwD2440nW+KKJyoxALUTHVqf3IFLfdmeN/ia26TxFVYwdjoUwyj+g4Zdg== 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-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Mw5SgrDyJSZmjLJferkSQCQDzy02Ux3tt+T6fFZU7Hr/D2X44ftufPPfMaxEqOHyvAwzIiCnBfOo2/YYliZAXwVsFNzeFoFPUv9TxhOnKlegctMWd8cpxUq/Owy3FvstoMlUxIus2z4Y4fwPCpyZVw+2Vayc6Sp8MrcB+jHwcx6ruXS1e8ow92ZB5svwiWlAWELk53ExD+4+TdrPKRLUU0YUa9rtMWdSkZ0BWY06HedY+PQM+igjcv+Dh0q35WTwUopvUKPLiYFFfHCuzgHmE0ey5UWtyh1AhFxdIOjwbVpllhzBoSwSW/IqQ+6BDNG67dhHMSjXSHjCzToWrM6Wcehz5sRs5Jutyn+AWMWXWzUAHwJiz4cqqiuDDqbjjz/JF50E4B9NgqRe1ndI/JitqSS4YIEIVcSDQPPWG7nZAgEebGCBWCn4O6lxZWMzQwGiiqrngsRpV4N80KAdG4/nLry36nBT+9iA7S1hhskJZjfI5AAaf3TMurdTC3x28nEtilx7DVn69jf8BhzBqtI9KW48yXwoU+Ult4z506OgdOLttJ8hzFVWbb3kRNu9LNFWHlUcF+LExKaUlMrxSSXAEdFBg4fVAWWHTekHLg5wryHlBdqQXh/q3fgz/6wxPkAP1fzpRJVKjDNyydUVYXAkPng1mX/+xkhr6LZpIF1rvc54M0pIUxWbyrCiTqQpRsRIcxQ8rhSB/Hhn4yXCB3fuc2zSLYoQMcctmB3hlYMaEFR5AP8DNk6D9tgKHMb9Y3xAc/6SWe+KoScpfTVfzq/J0hfel9aSaeJ+zzQOalQ6sqDtXce/F/uIqXFlAw8zjQq6GBIQA98UMgYWL8IFBnlFPRBlOrcc2Tp5BNLg/jdy1+h0MXRwWrHruQyIIH1XcXPD+ZsR8DaNxMWyIEHP9qhFCMLclh8ZEa5B64/g6NylzBdPahzdqGekRGzdUvzHw6JibLHD43KV4ThOqLBOaZjslDRA+jR3xKJ+mD/Z4+f4c+a3KxooopUTyi+1rvg4ySQdXCkziMUy+54wBx3D+rIri8qEfBBDBEmQbRMy1S53V4hNvuLVukPP53ivfHIiJDaYrPIoEGzttZfmlTDXdS7fNriuSVggzPDsjyHYFMOA00yvcWjoEsCmpn+ehJO0PstCEAInyShqmvpIvu7aTb3GJs2grq3ZuKa67Uxe6uMVSm6r+zkUGNl4dB/0prbbzCGtGq6WISi/GuLMNDGVo18bYMA6yqKOdWSePCsRwBvo/klaCtbhNFE2btKX8eyseSG6YN/xAczgT+VA3JlAg4NAm7DKtRyEx4i4y0Anf55uYDnz23cHeuenW1TvPg7utXbPbfKmbjUMJEM5NDHdx0l8IaesRUSXxKps6JTREtXpMMy81Ivf66MUGiDu29EWJqP1lGR9zLLhJcIylJpadpcAG6JjV3vCrRRR3DQrxPC6kJBFwpEU9XgGtih8Jgi4ovo96+7iv8laUrN40oqo5sWyMdx775X7y+hke258+tY+C1A54YRDakXBZziNcDjmY1m4+cdIUITXpa83NllmtlbWf/vpD/joszsV9jvjLnNaN6ZhiTQ3JpQYQ4d1tc8705fOppPFoc07qs1pRr6xx8gz4g== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35464288-2b3f-444d-e3e9-08dca1344160 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:38.8788 (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: /AHmBsdTF4GGUCeDTQe676mWGff8xv+csDnnLGxZ0R9gfbRqs1pE+IuMlusIoT+CA4/zfUcsMs/d78qelwa86A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7425 X-Patchwork-Delegate: kuba@kernel.org From: Breno Leitao As most of the drivers that depend on ARCH_LAYERSCAPE, make FSL_DPAA depend on COMPILE_TEST for compilation and testing. # grep -r depends.\*ARCH_LAYERSCAPE.\*COMPILE_TEST | wc -l 29 Signed-off-by: Breno Leitao Signed-off-by: Vladimir Oltean --- drivers/soc/fsl/qbman/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/fsl/qbman/Kconfig b/drivers/soc/fsl/qbman/Kconfig index bdecb86bb656..27774ec6ff90 100644 --- a/drivers/soc/fsl/qbman/Kconfig +++ b/drivers/soc/fsl/qbman/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only menuconfig FSL_DPAA bool "QorIQ DPAA1 framework support" - depends on ((FSL_SOC_BOOKE || ARCH_LAYERSCAPE) && ARCH_DMA_ADDR_T_64BIT) + depends on ((FSL_SOC_BOOKE || ARCH_LAYERSCAPE || COMPILE_TEST) && ARCH_DMA_ADDR_T_64BIT) select GENERIC_ALLOCATOR help The Freescale Data Path Acceleration Architecture (DPAA) is a set of