Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751599AbdFFPD0 (ORCPT ); Tue, 6 Jun 2017 11:03:26 -0400 Received: from mail-dm3nam03on0074.outbound.protection.outlook.com ([104.47.41.74]:30432 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751445AbdFFPAr (ORCPT ); Tue, 6 Jun 2017 11:00:47 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Ioana Radulescu To: CC: , , , , , , , , Subject: [PATCH 18/18] staging: fsl-dpaa2/eth: Update number of netdev queues Date: Tue, 6 Jun 2017 10:00:41 -0500 Message-ID: <20170606150041.10955-19-ruxandra.radulescu@nxp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170606150041.10955-1-ruxandra.radulescu@nxp.com> References: <20170606150041.10955-1-ruxandra.radulescu@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131412348454525146;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39400400002)(39410400002)(39380400002)(39860400002)(39850400002)(39450400003)(39840400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(8656002)(50986999)(6916009)(106466001)(53936002)(356003)(305945005)(2950100002)(2351001)(5660300001)(105606002)(33646002)(7416002)(38730400002)(54906002)(110136004)(50226002)(6666003)(81166006)(8676002)(77096006)(86362001)(85426001)(4326008)(36756003)(189998001)(48376002)(15650500001)(50466002)(39060400002)(5003940100001)(47776003)(8936002)(104016004)(1076002)(76176999)(498600001)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0301MB0902;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD040;1:Mj2QddlScoKKnt/5mXr5+2CS9udg/+CorpnHS6eMeN8JwTUwyOYyPRicD60Xlgw9c8tNfHSL35t2VI77UnImYtXuY5DzcCL5M296Nrtv5A8Gp2dCcGJUGP4+r2XIb+b5Q3YHBtFsVe/TlsH5sVWE7ndwW9k3YRQFYd/TzMOlrFaYBh0bg9+kwaUkA21EQ0xq/yX5R4dylaBxBc/1JzdiyQzjvmMMKRfG9qumooI6WQEVvAOiyoSMJJaen1+36sww0Qrh97q2kRakIudV1cbyJXpwj+FwuSQ1bdmo5IDV2JC+CWHqbFJrLP+ipzdmnyts/H+8dynSRgOKxbHjwryG0b3qXl9fKaeMgrSYqpxPnJuB4+HlO2zb1rScCwQh1S3AhBZ2YZiAcLR8bW6lSEFuChwINxvTB0K0v99dlcdeMoPpxn7ke+sUVxAUPvuy7AhNgmDnCBjaM7FuoBhWPYBTMW/9lvdUmYcSm3rG81ZbZdZhUXQLM/c6HQ36VsWocrdw+iaDzJLXtirsBga4oaM9YpvtJUaaqDbbsDU9PLXFdCorOPAkPOK3BEc2HAfCOcrT+ZOtj1ZtXKU0ZMajKiZCoCYkV5HxAdw9EedHpyIbO9NSM0q1RRYh8jZ5+yMRkh+Ihbrw0G0/fIJhJ1yGVNoyxpeZetjzg7kBrrVMcUdeh/3nu27HsfMqWNCQPY2Abbn6 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY1PR0301MB0902: X-MS-Office365-Filtering-Correlation-Id: da408aee-9d2b-4e8c-f779-08d4aceccf2f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131430075)(201703131517081);SRVR:BY1PR0301MB0902; X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB0902;3:r7iipUs0hVzX4hDt4SmtCD7cFFshgOxSU934M6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gXwELlBD9VTZMkgBOXOnV5yqmnOS14bSSy747DIDo02O9RgzyUgGb4jVl96ykRKJaLbYQQycE5CYU/ZVNjvhXD29KN5TG0EsvHcP0EOVGn0sgRGzrH9TtqRm6+Aw88d3d3K0g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(5005006)(8121501046)(13018025)(13016025)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123565025)(20161123559100)(20161123563025)(20161123561025)(20161123556025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BY1PR0301MB0902;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BY1PR0301MB0902; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0301MB0902;4:FdxwCDKlTSVIyfwLVSrFnOb8cqZuIdTwfeO/3GDj?= =?us-ascii?Q?jp8pKPdDHeyfrM+ySGfL99dxJRHjs/qE8yQSV5FsRg3UNgTzJdPstVwsJoLS?= =?us-ascii?Q?tjgbeHhEQYg01YeA68vMMb+o2vOdbMeeLBxG6WBRL1zn8yajj2ZMP9QbUXtH?= =?us-ascii?Q?nguhlTWMKM9nfQ35z01/4wwkX3G4SddS1+hjwL0VzjAj1leGMzg32TbSviby?= =?us-ascii?Q?bqfpStuOPJnu3ic/DcTGCcrFg7XnKlQWT4U1bH3HxMK4VKQaBXoZTDxyQ2bm?= =?us-ascii?Q?y2CIFnWiVebMPv261QFQyK59kFVO7EL46ml5eQtKWhh4fmfw9a4WiBYVfEhR?= =?us-ascii?Q?NdJaXUSz2B+XV9I5r1mTjiytPL0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=?us-ascii?Q?IS92xPNtR5xknQkNA8QMH5g+T9Fv9UlNZWrD+Q30?= X-Forefront-PRVS: 033054F29A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0301MB0902;23:BaNG5Lh11JJjxM5zF2qT/VrNc0yQKBwtLnJ/3kK?= =?us-ascii?Q?IMt9qocnG4QrCCFkCkcFC7ZADTl44luqAxSD+Et2v9d8O5LnoFLclGGgj8nJ?= =?us-ascii?Q?k5CY/GyJmowFGPqF9b11N9ztilo8dEGDf/dxobDvlKac61vHXG4XrT5niau9?= =?us-ascii?Q?GVnqeZnRWajaUmOkYaGmDxdiZTERkGrR9LMuzaxOHCbCtIRHq6xSXOlDD98B?= =?us-ascii?Q?ctCX5miJaZcSXIAFpWhLI++N8QCdu6ZBZLovnnKRHbTXwwKHAAesxvQwmeCv?= =?us-ascii?Q?fesUrm/IyrHeUVeEnRHG8c6y7VgRNU/XOEOKI7K+6JKgOpIXjlO9KMC7/N0d?= =?us-ascii?Q?vrgsA8yvnPjcNmB3VJNRFipQ+MpYFGIVlTaJ9T1qIn6LBeq+NjCRfV2jqUqH?= =?us-ascii?Q?SWH0bHHhZQfNRQEyUPmWsvswX5SO1GUMrPSUxxuxG3JVLgD1T+Fo87vlUXDL?= =?us-ascii?Q?euXgJ1qcZIz4aS/svgS14p3b8XQG4zA0VKANA57WMaofxPnApjnM9c9Z1w31?= =?us-ascii?Q?ehbIlVPAtOpbUwqlTP1wLySk36zS/dMA+T/rZQYDvA0UWs9424CAzPW2FCJw?= =?us-ascii?Q?44LNX8LnKBKSY1e5RqBXzTb3gNVe+Dqbq+EmgCcjeAs3CjK0JNdbFFJO1bnv?= =?us-ascii?Q?BrNXdGuLpOO8fX6QzgUGGOr4pIMlQhva9B34raZoD+dZJYdZGpskwAx9YWK0?= =?us-ascii?Q?pueE2fvEsUz77rKQtTop42+VODb4eeRpKxOFO5JbDSH4slZOcWrYpNHldQ5c?= =?us-ascii?Q?yMqg/JWXJ9niH/ZttIcTkyw8RdCV8F+195/QdOOzQxomesqF0OA2eQTp6qs9?= =?us-ascii?Q?Uy4pwAfQTPaDUEYfNMZjJDuOfjlh5pcDYlLBkuEipAV6xy1tui4Q6wnDQE+W?= =?us-ascii?Q?NG2yytq8UThvCK7+O2w9w0hJqc9p4xIT2Mir/ewyoILTd2rlZvfBWbydysYF?= =?us-ascii?Q?RrakR60LYH/FVzvtG6/0GMxS3omxWsh6OlWi4Fikf74rQjnJfAt7y+XqwHXy?= =?us-ascii?Q?tlYki9EOQobzdh+y3r1Bm3k7aRiW8UfotdOzIoguliIRf7okBWxKhRzBmVKM?= =?us-ascii?Q?b3bgRn8ct6h1WJk4E4iub+IdwI0pT2dNdbQ0WsEhfbA/VudP+JFc5b3nN9Ck?= =?us-ascii?Q?MhVRERSlAPefHW7fLvNBRueIva3gCU07UjSdv4LATrRduklsTooASUCR9JiZ?= =?us-ascii?Q?lHeMa11TUF4WHHy2T+pfOJ1pkNEO/cN54BaeQYDvy8PSCMZX38I4Vz9fexpH?= =?us-ascii?Q?WElSYud+2msUfTwctVWNehAUK+9DyyKb7tssUwdKZY2KICHv+1UdhmrsMUTZ?= =?us-ascii?Q?QdzzL6KNF5c5dOEfrjaOHm+CffNl8o0jzM6FRTrjx56ZL?= X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB0902;6:YpEyUW3YfK51HtPeN5wuGbCkba5g2XM3ZneN3TNGtkYkXzv48edDzfMS/VlS2PssKYobLBIJ32sskWDziEquWeRhDJO8m5HzLUaHGwrKL8wKUNXzNENVkemcjcBlurRPccg9qTlkxqc9aEvnoJdJIHATvypNor4/j/N/uOJ/+edPvTfjPuLM6awCPMaHdNVbCyFJC++IeX5FfEYbgZmVGTyKZtaIQBCaj/O2cetXJKwmov3IU4lVydgg/eY3NW3SZwPe4ZhZcWyv4+3ym0XbBwJ2tAfLdlWomMov7G1aPgh3NvVH7Ww28/td4qnHXhdFibGMFQmYJKgRwSWHvvwdWc2dxTtiWXTFrKY+YufZxG7cLNMT7y0s2CGagAsE2x/k748Hj4E4vV3/K8jP+SU+bGJvuVrfl/MLAQKGuA3KhG9HplZfTg589t3qPSpO5ZcluEhQLcN9xqHjqzgwvWtr3nsnl3Z5AZX7kM+fsnwAYg3eVcuNowI9qxUWxehWFnWOFKS+diO4d9RUj2Jc4gTw9Q== X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB0902;5:7PEnc/yXF0DFZnGSgrP7WlEyT6fPP9q11BI8NXDHVA7D/gB3tpm432PFMmUkeHSywnRzG2cMs/Fxw56tekp+Dat15TxHIYayNnz1I3iiflacuWcuJ6VzjEMoQk21NLeMvzYR8Yi78Jjg79xUV78WqRcC4AOjIa6Bp3va/uA1ZKhhZb28MmPF8oMmd2OnLt2kAy8+aEKc7RyCGg3qPWOY+lGFMZ2bapE8dTYaO/f/GSjXcoqFPmSwQa8qiQmN69wWADDGSWpCPCGk1JmSK9rZDA/wuW6q6voJbUdrCAMIFBWwQB4A0+juqHtMtK7ZRIBp2CJGpth3SttSERWmUb3l/4KCnzKkwVH9TmiyQZChwMmeuWqE0zPB6yeRd5xoKVF0b63EVNDsPgsDrJkuvSvcsvAX8+Tj+K8+ijpUtWwDDlayHpzQuNonzAabiqp8fMf3bqhSz4SoJOhdXAY/99ocn1VlhvHI81r9hMVmMxVwBOfHFhEIEHEkKTeBsPU//NRhNIcqmDp5UoLGEpQS09+E6A==;24:d9YMq7YN9gxO39WTrjgIY76UDp6nzSjDemTVrXGqNbQGce3/jOrTf+nhZViq0ExoLL4Zir7BRY+kMaCT8woqwMdzag6Onb0lmnAMjvbvNZY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB0902;7:By0EeRaPocGk5/twYfUGADIKemZnJqysW3cukWJONgYE4K4PW4YjDn0Vonvfw2L0PpoOq19reHnpBc+A3g4yMohpKyzwp1cVYcG6K/BbU5NO/6PJt72muxY6QrvtR5PH5/fadsv9xHUuBt1QupmkQy7vqXtSn3dGdjGk41RIlZfEq60lMUOCxeY9EH/tgK0wOeWzA1fK58qrnBsyogSLqLLSgNuT17Lu//pahTiUozPPL+F6rH4s+SjAmE7Yy0wohqrwYUWjRCNHJjNu09XIku/U4iboxJP7ULIftuGi4e9AtLQjOlnyqepsCWTK/0VOLQa+t/1dITG/ll2Zqf2J6Q== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2017 15:00:45.2497 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB0902 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1695 Lines: 46 Currently, the netdevice is allocated with a default number of Rx/Tx queues equal to CONFIG_NR_CPUS, meaning the maximum number of cores supported by the current kernel. The actual number of queues is reflected by the DPNI object attribute, so update the netdevice configuration based on that. Signed-off-by: Bogdan Purcareata Signed-off-by: Ioana Radulescu --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index 3f7f61b9c462..224f3937f313 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -2232,6 +2232,7 @@ static int netdev_init(struct net_device *net_dev) struct device *dev = net_dev->dev.parent; struct dpaa2_eth_priv *priv = netdev_priv(net_dev); u8 bcast_addr[ETH_ALEN]; + u8 num_queues; int err; net_dev->netdev_ops = &dpaa2_eth_ops; @@ -2257,6 +2258,19 @@ static int netdev_init(struct net_device *net_dev) net_dev->min_mtu = 68; net_dev->max_mtu = DPAA2_ETH_MAX_MTU; + /* Set actual number of queues in the net device */ + num_queues = dpaa2_eth_queue_count(priv); + err = netif_set_real_num_tx_queues(net_dev, num_queues); + if (err) { + dev_err(dev, "netif_set_real_num_tx_queues() failed\n"); + return err; + } + err = netif_set_real_num_rx_queues(net_dev, num_queues); + if (err) { + dev_err(dev, "netif_set_real_num_rx_queues() failed\n"); + return err; + } + /* Our .ndo_init will be called herein */ err = register_netdev(net_dev); if (err < 0) { -- 2.11.0