Received: by 10.213.65.68 with SMTP id h4csp384488imn; Fri, 23 Mar 2018 06:46:44 -0700 (PDT) X-Google-Smtp-Source: AG47ELs3T/2MrjWctD0ui+I0OOb9CGp4sgA5JWY15fhM/ndbMMj5ez+1B8RMrn3kc9V+P9QPMLsO X-Received: by 10.99.100.197 with SMTP id y188mr20783750pgb.277.1521812804384; Fri, 23 Mar 2018 06:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521812804; cv=none; d=google.com; s=arc-20160816; b=EoAIxJv11+E3psbKmbLyNFYfE1keCOFZIjaa+nFcuWkoLbRADL4ikL4oFRspUemyLa cqkV1yvYSgGWVWx6eVI3hfOA9JLW09I63zUuWC27xE5JQsG5DKaqwaYN9A4HubhUxHlS s1PDVZvqLtpUFji4rtYm42Sr80DzDlDzgcplpsakAnewIi3jkMkGtPMF0+aJQdWPl8xm p9jvBm5usDQloOChDnCS9Q2b2IsH5TH7iyqHDLPWVrLtupouxIqZBg6Eq74JG2ygd5Ct PNEqr3N9H81mwRfgr2G//IbGMN9rYj3oLbu4SKqIzykH+S4fw5zbC+tKaAt2sQTKoebv hUHQ== 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=0Tsuwp2udRaUXGvXUAxI0PoMbbX4Gh6u9/jDlqhjlh0=; b=YCDuYk4GNX1j3Wu9WmhLmbNRWOUPIDXEdP5x6FtBNRMaNxh1L2YGWHWzw7fhkzNi6B KZqE6w1TNsmwoHYFyXZmTvm1w2vGr/HobWx3DdFCVU4+CdrLqLWD5+Rz2cZy76pv1rxU 3bLphXxelWKo/UoBCFR5RXODc8wXJKYi3NVNkbDcqlE902A3Yy2QgqBphT/FDk99uHxH Dd1CU5R51f8L+xw6jZKuP8GV55Bb07prMGxjD62BSnF8umd2xRl2qBP09WVFiw+FX3By mtY7gCpyliDJuKh03l+padxXbXiiiO4ddEQ90+jjSuswvj6bSlro079zk89GgXE/5fiI 5Y8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=kAlyELCc; 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 92-v6si8551434plw.229.2018.03.23.06.46.29; Fri, 23 Mar 2018 06:46:44 -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=kAlyELCc; 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 S1752906AbeCWNpO (ORCPT + 99 others); Fri, 23 Mar 2018 09:45:14 -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 S1752587AbeCWNop (ORCPT ); Fri, 23 Mar 2018 09:44:45 -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=0Tsuwp2udRaUXGvXUAxI0PoMbbX4Gh6u9/jDlqhjlh0=; b=kAlyELCcmkpLUU3hnr9o8CMDJxm8MBQ3lnDdcv6psUflBRjIBnOVdlbUrcTtiUb1U5Zb7ieYUaM1nLMIHBYsGXdFWSOE/vBZtr+5NVb6sYd1p9t2ZRSA9La5TxJ9jrbUJfFmt60K2wOlwPBD1hdYKt5g9M1m6Be874g8Ql3L3aU= 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:36 +0000 From: Ioana Radulescu To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/9] staging: fsl-dpaa2/eth: Fix SGT allocation Date: Fri, 23 Mar 2018 08:44:12 -0500 Message-Id: <20180323134413.1532-9-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: 0db61649-4291-4eff-cc97-08d590c43856 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:yyavywCED6zdjDG5mR4jxBdKZRoXD7rzZl/XL5aYFjnCWxMF/TU2qdN+3Pgtiu9E5QmldeA8VgePDpXIIPPVGDdqUmv8Eb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0yjT0FLj4F36/kUHEvm9LU+d3zhfAoYR06MeJ/Y3dGPX/xrt9Y09jQ1gpxSaY9DvaV2gt9TXPSDn5I5CcPVikveD8ZmeV5auiHb48Z3g5wWlJwlzxt3udhxTKtLPuvisZiaipXW7g2mkG2xNRRzZmqhnGUl/UCviaGdzwe+ZfySMi52Fnp1BQAkeovMJtTfGXhOr0N1JXafJcjhiD2oG3NY+/f5dqBQBJzenMVOuudnppD/Yhj3OiEcuKhl;4:FfSB7BOERFWjpYYEwO/SvF6xdqfoeMZ5YUStGhgkQ7jdgVp8e6GrjTQk+7YMQEOFO7XYul2RrONeiZhLhIWHW8seHu7SF1ryPeTERd3IsmMNKxTxzwUz+yaM0YSS59ovWoPuWE6ByLt9PHPtuFFqmfbXUTDeSCsaSDCWjHW8y34uLBzj3C59tpu/gmJyXpxTWrUHehZJ+EtDQAmQvC3WD48lZgwgB/vc7tICA4z8z0YgrIyJsrr3IL5OZBO8cM/zMpCXSsNPP+UXLTufi009xjRnZ415nz7XXFQwk2eT+d7prVnYfGc8/dKW8liu6eD4 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:JUNoAZHLyPPN751sOiLZC825KhxW8rSyM2JZNoT?= =?us-ascii?Q?a0/zzCC9cpQI4QNf+7YPJDr/4yoa4CpWqP8JWT1rHBbLZm6iEmjrpLjYRWA5?= =?us-ascii?Q?uRQPmpcQBxioLj5cwnPrZi/1vMHLYpejD1/yX3RQNbx/53BV03ynA1c5c64P?= =?us-ascii?Q?6EWaJiy9jdMVXvaEuS15SWlnbgRDfDjZ//7z/i8D1fp6tAWAs2jh7AC3+1p9?= =?us-ascii?Q?E/YNw4DlhB15BGYcRmHWfOwhs5vq8b0EZYvd+aW3dW9T/Zvxwj0JwFBx9mIL?= =?us-ascii?Q?XFlnwq7/ptWkwT7mN3O3nJhRJuHfvmB+kUztO64xFlXqqB5krGopS9r9Tx7N?= =?us-ascii?Q?ChqYvWx96HF7DRhBSwZ+/YaIMys9dhs4QcyK761h3x+sZPKs0Mc/NByRKFuZ?= =?us-ascii?Q?2odQAyVjSERQwLF4V92uhWEWZvi0GZlSxSoD8C0POko2Elw8YrS/W0BFJWGb?= =?us-ascii?Q?NNrnBep9MlNh00BL9HnhVYGtPcSODYOIud72D/oOt1ahbd6eCBxBJdL4vuZm?= =?us-ascii?Q?jEUT60MawYQ2Jx/Et60oa0j9pF3VjMPJNi3G1S7IZb4aqjMARA4mQEQT4K/4?= =?us-ascii?Q?IYbtvJkD2G0F94vx5sdfuWXByKmRXd7SJNmF4NRMb2Y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ABp0yHuh99WRMcOcOAYldvFtHL08VtuPLeHe+L4DLFi26SDaeFBkR8O2Kmg9KwxCIIwMgLq7HgODYQ2aQuYCuziihFvqFNJDrflVswcc4YJ2dTDFIbBt0poKDpMnvd4kW2CflBVh1lULaRn0NUg4w+hVcoMACCCKYEyW9fdzNGsAk831LFTG8sGnfX9/dp6T1v2X+vWgun9ApoGCLhoGeuQLTw0wUMKQSL4XwOAf9Np5xqyhoQwCUUYLFcOTOAtd9KzUJWfUnMHRkpLT6Tag3v8nz41wkncoPCT+1n+HfG3BVASlYsDndbvizrJ0BZaC7wmmLIOZBpgke2bQ2LhbCW4k97JtjWc7Kj625ssub+pIn9Acelzyhw==;5:fV7oAr8DnsSN8diqz5nOUCdhJNoE5TYpG/n9z+pGnKnhDj653mUQgyyXv3kPmVJxRWmtsaS4bAmhfHBZ5Nm1CixSOgnXNSz0cw+aXuT+sJt92vZ108NEoy5KHuQ3FCPNcs6UrCCsULrqkf1lq3bBY/RqPktgUFS1DrpJOBuitoY=;24:yuFZu0gXe+sQIB/z0eL61DO4sCafkP/paYqXBPfZNyOBjBJEgolkI3T/yYsgc1OU/99AjS/VPz856N07aD/kLJGld8Ogvx4LlBXMDNg3I/4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM5PR0402MB2690;7:GEV2pi36y1vDptrP6UQcg54ECo2Hv20EcFZSgC/RQ/kQOoyzpp8PS14euRs+kTGYjD3CqNqe3rubD+HsxSK0T4Qt+PrYC8CXkj8GaIL8fbR1xFGTef9YqkKAJ22bIng9PYhcFt6/qDC2dJTUh9O1SQP2GVH5X/S+KY1o5r2akQdLImE8L/PLUmtdB3y17k7+bp4LWFbppXhLqRbYwVz1ucH/ezACDAGsjnDz9BsE/2T4sUUZfuU4Nvo1ihxtEokA X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2018 13:44:36.6697 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0db61649-4291-4eff-cc97-08d590c43856 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 mistakenly allocate space for too many entries in the scatter-gather table of multi buffer egress frames. While it doesn't have a negative impact from a functional point of view, it wastes resources so fix it. Signed-off-by: Ioana Radulescu --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index 9994922..14bd8fe 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -373,7 +373,7 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv, /* Prepare the HW SGT structure */ sgt_buf_size = priv->tx_data_offset + - sizeof(struct dpaa2_sg_entry) * (1 + num_dma_bufs); + sizeof(struct dpaa2_sg_entry) * num_dma_bufs; sgt_buf = netdev_alloc_frag(sgt_buf_size + DPAA2_ETH_TX_BUF_ALIGN); if (unlikely(!sgt_buf)) { err = -ENOMEM; -- 2.7.4