Received: by 10.213.65.68 with SMTP id h4csp385029imn; Fri, 23 Mar 2018 06:47:22 -0700 (PDT) X-Google-Smtp-Source: AG47ELva9JJBwiATSZSXjNhrAzBShgua3CnEdrcaaJpFRFzw7VRQSeY/d+nlUvSbokusVhK2va+L X-Received: by 10.101.66.203 with SMTP id l11mr4885606pgp.66.1521812842806; Fri, 23 Mar 2018 06:47:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521812842; cv=none; d=google.com; s=arc-20160816; b=QXUjR7Pi7qbA1LS1HwlRQJgL/qCfCpxIAlHMBaqLOBTCPtEWpKRqwqhW3UmTb1nkY3 FCKO1/spzVB7aSSTwJQQktxo6jm0jG+c1fo5pTPtcJRbqvVWVCawlwsytHXzbLMtSGBT frITyBsM8e9OO9AiR+iOMy2wrkSs9Wll3u5G9k7f+IM5d0YN/35ihUWZLYs/YvOy94Lt o6rr1RUQB9KbjbRrA3WnAFQ2toQZfhmLaD911VLuSPKz/mRWdRZZh0W2Q49hkAVgjACe upx6fvkm5Iw5sIPZcJjttmkLVGdZGoPIEmBMMdYqVyySbBY4MGSpuNuhFMW70KBr2/C8 rhpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=KCYBshN4K0zhvHJdqo9FupbZQ9ZWu2NDWFTW8Vo+HPM=; b=DicBFtVcCGa9aKxAtPToggj/tfDf/u3LpTUU0QDO4Pq3WMGY7fdXzAnQ2+xlmjqzTs ngdPLhkG6nN4211OeP3MTtqEnwKmk1mkGxBjBGLDUsFw/uaT+WfM7qU8dMnSlkJLnkfu V9Sfr4E5sRIPfJ3FqTvqUTDdSs52urEGzO5v1lFPQWARVDH8eMKvcF5q6dsEq2N4N8tA lk+TY/gNWKh4e03VUocRSwXAUvkMy9QZbM8Pt636a7cvFmAGue0OZjTHf/zspEOJr/1J TCorzPCZjf6KtSJnDgKJkiay1PCJ5A9hJxxUlII5+zut7Vu4NscxPPblTHQQo2tJNGoK NrUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=DprMnw5X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v11si6188636pgf.383.2018.03.23.06.47.08; Fri, 23 Mar 2018 06:47:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=DprMnw5X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752886AbeCWNou (ORCPT + 99 others); Fri, 23 Mar 2018 09:44:50 -0400 Received: from mail-ve1eur01on0062.outbound.protection.outlook.com ([104.47.1.62]:10935 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752863AbeCWNor (ORCPT ); Fri, 23 Mar 2018 09:44:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=KCYBshN4K0zhvHJdqo9FupbZQ9ZWu2NDWFTW8Vo+HPM=; b=DprMnw5X6YJX6KPcBwvwhzWVwwGL59UeuPHF6TfirjXN2R4ccuIuAzLyZdqmAhAKC+33TA11kmhelcGc1hWd0AyqGTpxMKT/CPdGyHGX9HQWdiC1e3KEQpJLcsGwc1BuHVeXRFYliOYGatwt+QJFRTPsQDbFT9lp7dnjrq+o2gc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ruxandra.radulescu@nxp.com; Received: from rhuath.am.freescale.net (192.88.168.1) by AM5PR0402MB2690.eurprd04.prod.outlook.com (2603:10a6:203:97::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.10; Fri, 23 Mar 2018 13:44:38 +0000 From: Ioana Radulescu To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 9/9] staging: fsl-dpaa2/eth: Change max number of Tx queues Date: Fri, 23 Mar 2018 08:44:13 -0500 Message-Id: <20180323134413.1532-10-ruxandra.radulescu@nxp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180323134413.1532-1-ruxandra.radulescu@nxp.com> References: <20180323134413.1532-1-ruxandra.radulescu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.88.168.1] X-ClientProxiedBy: BN6PR05CA0014.namprd05.prod.outlook.com (2603:10b6:405:39::27) To AM5PR0402MB2690.eurprd04.prod.outlook.com (2603:10a6:203:97::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 89c6a0c8-919e-4fea-bb37-08d590c43925 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:AM5PR0402MB2690; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0402MB2690;3:JdlZJKeBH2FWQPnS2DZiHXbM2eC57wNh2s9C015QdNn80mrSQaKALy2s3TCrOHyLcVKAppbA0yeLKSXgQ1uvYADGkEb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1HBGeL690Z5lmbXDvJOy/KjEJse3WqIldhD0OFHxPqGWArDyh1lonCsffhLS3QH3x1OHapDW++P5r6fvNGxjbNeTaoFBt+QhtiubBQk3Ua4GReGf4pk4RtPXfEqJU1ctESjQHmCUhTsHBg7JXUMl33Gcjs4FV9dKB5chiR0jbW9RGjC/ITL3k4YdsoZoCqQFJmXp9oCFdZjBlqPbJYAWGYL9+yixGZfDf85z1lPEpflIaSpRObiau;4:8/TzUulLkGNMYOMbB32futv7hbfmv5OnYL+lgUvBlWuX9Gf0lfgYuMMczg7kOUQfmZrsfFwU9qNq3TGTuSTHSFCgbWIHtQ3K8Olja5SUOzQ4zVmdaFX1ZZNqKnoYvqmOudC6IuToQCzbWQ39PtiRK/wtzBgEMcxH6E9cfdAKwuDOhbvUqUakD6IFY5br5vizZdND4kI9r13JkpjjC+rjP21Rj/mX4g/7WugRVT5GXvO6xIZNkB3bqKUPgQJohS1lch/9vjFruMFoLCC5n4mQBEuYBlwMQQYz/ai1J91YuQLfICU4YrFLT0mvbBZDPrOu X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501327)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041310)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:AM5PR0402MB2690;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0402MB2690; X-Forefront-PRVS: 0620CADDF3 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(396003)(376002)(346002)(366004)(39380400002)(39860400002)(199004)(189003)(50466002)(25786009)(6512007)(6916009)(59450400001)(6666003)(7736002)(305945005)(5660300001)(386003)(6506007)(81156014)(6116002)(3846002)(8676002)(16526019)(51416003)(50226002)(1076002)(446003)(2906002)(36756003)(81166006)(76176011)(186003)(66066001)(86362001)(8936002)(52116002)(4326008)(316002)(53936002)(68736007)(47776003)(26005)(48376002)(2361001)(478600001)(6486002)(105586002)(2351001)(106356001)(97736004)(16586007)(11346002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0402MB2690;H:rhuath.am.freescale.net;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;AM5PR0402MB2690;23:HNj3V+J+lR70njg4y07V706+dSJBZxM41FwA6TK?= =?us-ascii?Q?ZzxleiNu8UymM9L5PMe239yf1Ozfl+WhuoqSpO/UNmEsrvItxM1tnqdpsMwq?= =?us-ascii?Q?kj/Q5zuXMxYBgepos6thF4EC7gZ1k7DnlHBIRtVKg7tot4msad1Bx1wf9PR0?= =?us-ascii?Q?+/BgkbCudDimV/1Nnln/gJorkysisFRk+hJ69Yiwo4TyGzOUkzCgH3mQx6Fr?= =?us-ascii?Q?w3iLMqCIHVoknJI5Vqeg/rUAME4vkKf4VaBW/wP51k32IV+8fq8j3Z2GfN3v?= =?us-ascii?Q?Hl6l6/HzCEz1qFj9woUkumtEiRDgz7AhC9oj5pUTTDRr5ciEshZXVr6lhxyJ?= =?us-ascii?Q?YrOE0VxJHO7VTgR3fxjNZjsCvjBaCmtZaGEsnRUNUWRW53sx771WAhPokBaT?= =?us-ascii?Q?/yEWbLhWOUJZ8aL9/SZAC6thYxNuj5VKCgxHJ6pqmMg3/Ey0TZhk8fWZFdND?= =?us-ascii?Q?jGrohXlKaskxf/6J0CK+2KUAXdwzZmGJnys150xlD8cSDTPTUARuydICSt5w?= =?us-ascii?Q?5vNZE9o0l/NMdP7SFDIt2T1SbPiPmckORqfxzdPiE4PXHH0ak6P5L57hR42G?= =?us-ascii?Q?fN5hT22v9zxUSaZ1c1/TNUe3+cAv/1Qjil2vZWjutGQBMpyrShG+yg2ES10t?= =?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rnWEkIpOoTYFfsvb7vXa6p53jtyQJnc9XkbC9mqVicP9nYmo4tXJ8q4aZVo4QZtwPjdvQDDr5XRSoEh/gX3Fjs7rLflo0y5oYAvuaWq04549KVk3XB8j7mHF143BEauk4+2YJ4bhWonVUgnfYw1hY9TPScyLuZNVZuET1mpWb4bgoqo44cRnU5zbOfzuHTwflSL0dURDbk2PGbzxFzxl5tOKImhOS2lqjeSwW5tDF/yPZ8m3LtOst1TUKbc/+jyLQdI1/+Gongzj3FrSbjXwffpZQyHQI6iJCHWlMrrPmepu+imFwekig8kn1cdiXweeL8qn2MUwgVLCIgZnC9y5Vb+8/AbqPpw==;5:cOCHGPIuSzuEDTH2D+snZqTirzKY1wkop29KdwYDJrE5FrVvu0QjxTyjWz055GZh3MoOob2k/z0XVd7bnbMVTlafzFOV8oV2IpkiUU73nH+KbqzJUSghJaNxXNuYo4hS1SCIuJRCdK65g6so7Wmetp2z7IwpBmVA9tyWtTw1UtA=;24:AXntg+g2XElhwYdQm46pcLbu/4m63bJyTTaLcv27IvrQNT190U6b/aQSdcxfMFVqBjKAuO5gYM2D+P7meZ2vSJY6iUVCXSqaYP67anDNFIc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM5PR0402MB2690;7:EztSz4uJHaheVaKfMFlkFOjdcI3hXs+gURCNhfsLdCXWCr4r/YuK9DhKUzHWE2RkYd+tGHe5UZCHBeF+5VrpY13B3Q9YL7KlgrNqkAdPyd9gIMuXyKzZeCTPHR7elds4o3+3v9JL91Td82TZa+VDTHrf16jfT2FcM3hf6GH3V7Wc5UW+244AdR908syKFN5BwzRwBqebfupDb1TXYza7CzRhiq3/yRydm4jOopzNZi4F6Rswb7bezkuSWMWpEMe8 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2018 13:44:38.0259 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 89c6a0c8-919e-4fea-bb37-08d590c43925 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0402MB2690 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We use DPAA2_ETH_MAX_TX_QUEUES to dimension the array holding information on Tx queues. At most, we can have one queue per cpu. Until now we used the NR_CPUS macro to set the upper limit on number of Tx queues. However, the platforms that the DPAA2 Ethernet driver supports have at most 16 cores, whereas NR_CPUS is Kconfigurable and can be much higher. Avoid allocating memory we'll never use, by setting DPAA2_ETH_MAX_TX_QUEUES to 16. Same for DPAA2_ETH_MAX_DPCONS. Signed-off-by: Ioana Radulescu --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h index fc9a255..54cea2f 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h @@ -251,11 +251,11 @@ struct dpaa2_eth_ch_stats { /* Maximum number of queues associated with a DPNI */ #define DPAA2_ETH_MAX_RX_QUEUES 16 -#define DPAA2_ETH_MAX_TX_QUEUES NR_CPUS +#define DPAA2_ETH_MAX_TX_QUEUES 16 #define DPAA2_ETH_MAX_QUEUES (DPAA2_ETH_MAX_RX_QUEUES + \ DPAA2_ETH_MAX_TX_QUEUES) -#define DPAA2_ETH_MAX_DPCONS NR_CPUS +#define DPAA2_ETH_MAX_DPCONS 16 enum dpaa2_eth_fq_type { DPAA2_RX_FQ = 0, -- 2.7.4