From patchwork Wed Aug 29 08:27:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 10579695 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EAA7017DB for ; Wed, 29 Aug 2018 08:43:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA7E12AB5A for ; Wed, 29 Aug 2018 08:43:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE8732AB64; Wed, 29 Aug 2018 08:43:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2DC022AB5A for ; Wed, 29 Aug 2018 08:43:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=skDX7B7AHtpOJY+bu9Jgb6jShcARdmGs09wc4BK7YEA=; b=qCdm9DEdwVESvi vtjOgBHuRNOD2Kxu3PtGDdYRQ/yMZ7C5PjwfuzMDrPNCI4N329nBpxYBOj24Zq6kPnwMGHo4Z3dCw W3eocpqL8W1VCnv4iUb+5TpFp4kwTVO2E9PMd9N0lfhF9hOO6DKnU1jQJgQEbb4C9fhm2/HQ5m0Kd /wfD1cMHIoOwUtGxuC837r83YVHRkr6CJoFrHAHL20t0eSZbYIlbphVXkisnmCO07IKkf+KMyWn+R z3EcvqGh9gjZs9vmMWU3fM8AuiediyFJ8De9TiSugqfKJnU4V9GWjqKd4esVOd4/a6WadL6/IeFTI rxPt5VY7Z4WoPrjeXlWA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuw4h-00027y-U1; Wed, 29 Aug 2018 08:43:39 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuw3z-0001Zo-VB for linux-arm-kernel@bombadil.infradead.org; Wed, 29 Aug 2018 08:42:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EpvJCTsq5QMMRNn+jWnajjQQLCmK9HG+EYZwyG3RlXk=; b=AEBJbmmC2UMWpuaKOtQ5ywy0o2 Qzr3qHFcnBHoCipUvIzxK5Q+SBUpcwdNtoV/VG/Z2VI+Q+Mf4iXKWXTVwKxosMCGyTt1EYUxy2Sxn 5sCI/P9iGRUFgiZgurAkKW0s+SXtjhOUvbRmd3WrcfjCMrz6S1SrSpVR8byimOuY7leQ7CVgEX7n+ YQj9zoSRPulwlnpfVI++rv5UQF9eqzUTnXWpJKUweEQXsAeN/976GOdTbKw4Nvzx/ehsmsJTyXFF8 K3DFfS9xlkLL33D2HbQsYDtYMVALlZy/DuhNmFAx4C71qEVX0beRfgRAbUjez+mK5q4SwIv+hGZ7q dsi+mD+w==; Received: from mail-eopbgr700064.outbound.protection.outlook.com ([40.107.70.64] helo=NAM04-SN1-obe.outbound.protection.outlook.com) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuvrs-0005mK-JJ for linux-arm-kernel@lists.infradead.org; Wed, 29 Aug 2018 08:30:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EpvJCTsq5QMMRNn+jWnajjQQLCmK9HG+EYZwyG3RlXk=; b=Dm1z1wBo014Sq/B3UIlc+EeurzYoM+53+JUPpsne8pCq/c0+e3xqsiA6nJO9pDT9x+lzzKivUs3Ou0a8rbh4t8EGemRu6L2GlHC50PMFBhC7oPWKK2fDb5er22wB0DwmEz6Ubd3/XBpG9KcNDEZm80gGfptg2d/So8XWr3v2ULc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by CY1PR0301MB1578.namprd03.prod.outlook.com (2a01:111:e400:529c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.14; Wed, 29 Aug 2018 08:30:08 +0000 Date: Wed, 29 Aug 2018 16:27:06 +0800 From: Jisheng Zhang To: , "David S. Miller" Subject: [PATCH 1/5] net: mvneta: fix rx_offset_correction set and usage Message-ID: <20180829162706.24111f9c@xhacker.debian> In-Reply-To: <20180829162456.2bd69796@xhacker.debian> References: <20180829162456.2bd69796@xhacker.debian> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: TYAPR01CA0149.jpnprd01.prod.outlook.com (2603:1096:404:7e::17) To CY1PR0301MB1578.namprd03.prod.outlook.com (2a01:111:e400:529c::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ff24efc4-36b5-45d9-2f69-08d60d89a24b X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:CY1PR0301MB1578; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1578; 3:Y5rr7JqScCJz+Z5Bk78sXqP1UYSOAWEORdbEJks8N8DVxcuQ9efe/yQ/CSf599aUXuX/HHk0XBsV6b19A9VgoEKt2Jf5hy6AmmD4oL7xqs7e9CnNATQkTHR8joJLYA9IuMElEUJDR4WVbfyyRtYiTi/OFpqLaFr8xUwZMVh+dE9qy40CERxDEXM1kw1M4r9lzcqAaPnAWoRdEQyYAR7vE067SklTbP4Fe48kC1wNVFT6S2Me/aRFXeg4+pHow+ms; 25:M0KDcIetDiAdHpSg05Ft10FNOW7rB6N7zz5xCaQEingJ6G9w4qIkfwpNWofGlzZgONn3FPvUUOXTy0CZAnaZpDdHKmkFR/RCpKYSiFMX55wAvlMQvczogfqyj6umTCpSr+JoADiuaxGqVZ+PopZ9PDdQkxSxkB7+MYUNXd1Kk+chSJv6xGpUl7awD0ZVUcAetc6qWDduCmc7saNxocgUG0Uld0EROo8f7X7MJoLypmNFYN6q17SQsLrVJmj49yDxpIb8HfSHxH8GGLyxTOBcBL5NLPjEdyBMOLIDFk/hfytDmZTMSYzUjlHbsyZAt2elldRDhdJ5dUVvlUKtudbZGQ==; 31:N7b9Id8vwOP/gdZKUKO7korETGVmj99dQ9QYx4/Ow/CQCQEZ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S: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699016); SRVR:CY1PR0301MB1578; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0301MB1578; X-Forefront-PRVS: 077929D941 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39860400002)(376002)(346002)(136003)(189003)(199004)(11346002)(446003)(50466002)(81166006)(26005)(305945005)(68736007)(478600001)(3846002)(81156014)(8936002)(86362001)(76176011)(386003)(6506007)(97736004)(52116002)(7696005)(72206003)(50226002)(1076002)(23726003)(956004)(14444005)(6116002)(316002)(33896004)(54906003)(110136005)(16526019)(186003)(2906002)(8676002)(7736002)(230700001)(55016002)(9686003)(106356001)(476003)(105586002)(5660300001)(486006)(25786009)(4326008)(53936002)(66066001)(47776003)(39210200001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB1578; H:xhacker.debian; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB1578; 23:vaGkosicxCeEepDUTVOCWEILHMkNmZUHXzrOFjP?= tdQHqXmrwq2LFOI/RmOY4rhof+ChYyW7x5FTlsyi8h8JYeaEfk+3W5o8sD/sKvHTRdGKSgAg4SINUm3Kt1WffymJINaM21JtGr9ArDDRd8ADUy54VwCdezteLwAoKVkW6S1u6/QUrN8u84yucjpJ2/GQI5XA31uozqft1YY0Qij2w9k18YX4VIhRaw56Mlyg94DurgfTd46EGFmrfUeCHETwqydQp7W1gHVNsRi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C24aKR2ZnRN6zcKonxXf+yhniD3a081bqJhbHahpzKreVk43/OUqFst70UMpnUq/t0b1KyDyukXBX8FfkCLulplg9rpc6TjRMekMY12H9h9k8obcB8n/3AEbTbxgU7ats1YoPyenkXiJQ9Hej0/1 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2018 08:30:08.5113 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff24efc4-36b5-45d9-2f69-08d60d89a24b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1578 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180829_093024_782873_64F87427 X-CRM114-Status: GOOD ( 14.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Gregory CLEMENT , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andrew Lunn Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The rx_offset_correction is RX packet offset correction for platforms, it's not related with SW BM, instead, it's only related with the platform's NET_SKB_PAD. Fix the issue by reverting to the original behavior. Fixes: 562e2f467e71 ("net: mvneta: Improve the buffer allocation method for SWBM") Signed-off-by: Jisheng Zhang --- drivers/net/ethernet/marvell/mvneta.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index bc80a678abc3..0ce94f6587a5 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -2899,21 +2899,18 @@ static void mvneta_rxq_hw_init(struct mvneta_port *pp, mvreg_write(pp, MVNETA_RXQ_BASE_ADDR_REG(rxq->id), rxq->descs_phys); mvreg_write(pp, MVNETA_RXQ_SIZE_REG(rxq->id), rxq->size); + /* Set Offset */ + mvneta_rxq_offset_set(pp, rxq, NET_SKB_PAD - pp->rx_offset_correction); + /* Set coalescing pkts and time */ mvneta_rx_pkts_coal_set(pp, rxq, rxq->pkts_coal); mvneta_rx_time_coal_set(pp, rxq, rxq->time_coal); if (!pp->bm_priv) { - /* Set Offset */ - mvneta_rxq_offset_set(pp, rxq, 0); mvneta_rxq_buf_size_set(pp, rxq, pp->frag_size); mvneta_rxq_bm_disable(pp, rxq); mvneta_rxq_fill(pp, rxq, rxq->size); } else { - /* Set Offset */ - mvneta_rxq_offset_set(pp, rxq, - NET_SKB_PAD - pp->rx_offset_correction); - mvneta_rxq_bm_enable(pp, rxq); /* Fill RXQ with buffers from RX pool */ mvneta_rxq_long_pool_set(pp, rxq); @@ -4547,7 +4544,13 @@ static int mvneta_probe(struct platform_device *pdev) SET_NETDEV_DEV(dev, &pdev->dev); pp->id = global_port_id++; - pp->rx_offset_correction = 0; /* not relevant for SW BM */ + + /* Set RX packet offset correction for platforms, whose + * NET_SKB_PAD, exceeds 64B. It should be 64B for 64-bit + * platforms and 0B for 32-bit ones. + */ + pp->rx_offset_correction = + max(0, NET_SKB_PAD - MVNETA_RX_PKT_OFFSET_CORRECTION); /* Obtain access to BM resources if enabled and already initialized */ bm_node = of_parse_phandle(dn, "buffer-manager", 0); @@ -4562,13 +4565,6 @@ static int mvneta_probe(struct platform_device *pdev) pp->bm_priv = NULL; } } - /* Set RX packet offset correction for platforms, whose - * NET_SKB_PAD, exceeds 64B. It should be 64B for 64-bit - * platforms and 0B for 32-bit ones. - */ - pp->rx_offset_correction = max(0, - NET_SKB_PAD - - MVNETA_RX_PKT_OFFSET_CORRECTION); } of_node_put(bm_node); From patchwork Wed Aug 29 08:27:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 10579663 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D896117DB for ; Wed, 29 Aug 2018 08:32:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C90652AAA9 for ; Wed, 29 Aug 2018 08:32:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C78DF2AB2A; Wed, 29 Aug 2018 08:32:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 15E882AAA9 for ; Wed, 29 Aug 2018 08:32:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=amBxaQqVrGKu/Y1adJga1oW16ezUJRoRQP+0y/N90Js=; b=VqHpnYuN0/8hAh /E9gxNd5b6AsiztJgSiaYezyA3+5oMN7cnHjbNpp56qfYTvnYslf0VpFnYhgKNegm0ZBiKH1fkahO PKFaN6VMZimZ/RGUL2weEyrlQJ/P/u3kbqAW3wZ6UYjMt1B86kkDSR2ZcsRnRk9d5ewm+Ui1V7YZ9 UavQHAT8UFaRfbsck7nnmGRWL5CkGOeMbxbFwn98QcRtEIQnYhWtvzbec7M+EIf/RmcBdatO1mYr8 yLbM1RLBsVOxce3j1Wsx9jNf3RUxaGi6x7tZEHTPDNNDBhMxOFk/p+/MEzxIsBeildPuTRUIGU4Y5 yH1ynUSj02k6fIizGxNg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuvtc-0004Zh-MD; Wed, 29 Aug 2018 08:32:12 +0000 Received: from mail-co1nam04on0606.outbound.protection.outlook.com ([2a01:111:f400:fe4d::606] helo=NAM04-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuvsc-0004I4-Oq for linux-arm-kernel@lists.infradead.org; Wed, 29 Aug 2018 08:31:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jm4BaL0NQFhNa+A1ISRcyLK+GL21wNHApx6exQXongI=; b=wG+Eta2axCAZbZut18vbA038uS2Djj1W8EeTO75PMauHnna6dWN7lvuFp1/uiDH1ap9CUF8+wDTC61AcUSf4wiUnLlqfTl4vxFSwvwUO3EFo+UhmgSpUeeJBGIwzOnbsXZGucZjQEYHMtz4YIB7y4EvioVwt6a4TRmLM7Iek6LA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by BY2PR0301MB1573.namprd03.prod.outlook.com (2a01:111:e400:526e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Wed, 29 Aug 2018 08:30:52 +0000 Date: Wed, 29 Aug 2018 16:27:51 +0800 From: Jisheng Zhang To: , "David S. Miller" Subject: [PATCH 2/5] net: mvneta: fix the wrong function to unmap rx buf Message-ID: <20180829162751.018acbb6@xhacker.debian> In-Reply-To: <20180829162456.2bd69796@xhacker.debian> References: <20180829162456.2bd69796@xhacker.debian> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: OSAPR01CA0160.jpnprd01.prod.outlook.com (2603:1096:604:d::28) To BY2PR0301MB1573.namprd03.prod.outlook.com (2a01:111:e400:526e::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 945bfebc-4224-4d04-5707-08d60d89bcad X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BY2PR0301MB1573; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB1573; 3:fQx6B7owvOshMs6bwmGj73eyFiZvPCJfTs9WS2Y2Q13SGHMg1JC+4oDQ5HZXQrS7RLfwAeHnbv/pM5DI81o8Y2QFKCeWD6NNTaUesJQW7T4OA7zrD+amS4oCsWBpSpfnawWy6LMAvPV4O/zjpHIrsjm1YyjYZCvj3kW1nLE5uCYDIEgQFWKugccth1Rh7egVp83rbjztAIPiHh70a80AXzL0UHw5vDGcKz8jtIz55zXuDEYKdpPlfwvLVAy0tUwo; 25:/XQ07x7CxfhkE/sgxD2ymR2aQNew2+hxBQ5H3NQERWLuXr9OPK2jxAczRoDyvhDyiBDAIwi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wkeJwN90m9AJKjk/OSb; 4:Oh+ZRBTLiD8lccKB6pCikHSRWcFInUXOBxj064njxVOBy96FU213r3S1MHcXxmtPy7VQt6QwJHEizqM/fGPQ8ZhtdT326TMbtw+ZI/NW8ryujQJxRTHpR/PpmtUE7HeKOb5bEdcCEmeoeBXk2ddHLYWG1Y952nXIqmJA7MgfMuYC3NMvyUnvZRDMs82K3p05ezA+pkPezrmdg3+SF95bM6Q8+wfM8Rf+F8UIOSWyTpfzU7Zvz/djm3yFyYMLddgTY6KcN/dTfEw9jgTGlY52ow== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(149027)(150027)(6041310)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016); SRVR:BY2PR0301MB1573; BCL:0; PCL:0; RULEID:; SRVR:BY2PR0301MB1573; X-Forefront-PRVS: 077929D941 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(366004)(396003)(136003)(376002)(199004)(189003)(53936002)(8936002)(26005)(72206003)(52116002)(7696005)(76176011)(478600001)(33896004)(316002)(486006)(446003)(16526019)(186003)(55016002)(956004)(11346002)(476003)(50466002)(6506007)(110136005)(386003)(9686003)(86362001)(54906003)(25786009)(97736004)(5660300001)(3846002)(106356001)(105586002)(66066001)(1076002)(23726003)(50226002)(230700001)(47776003)(6116002)(4326008)(7736002)(68736007)(2906002)(305945005)(81166006)(8676002)(81156014)(39210200001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB1573; H:xhacker.debian; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts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/p2gUA4g7dkUUZROS0Xw1CnA==; 5:hrku4tz40iIt4wMnvVkvlynzEFFwxVOIzEgivxRTwxLUSBuHpgeC5pkhpcHuhUJKtuZQooVRoCrMF47v+wpl354KTg3Or+7S9xSfEkcOSlRYjBG1HRofbZn8cWpHe0wwUKohRPp1ucjejlmH/WIlapIYt1Vm7RpsmJYU5m6g01U=; 7:3LF+w8ozXHU+gsWSROyvaLDVsGYsizdxgrfNVDb0CvmAOwm2ZOyQ92Rsr0YkTpq4COr5AzA3lAjfdZ54S30RNQP5TyfWpKMZ7kMEOMfghQtAaxpHLXmV3E66sbxTP0h7vl6YQZQtcuGuTxtj642fgAkKDCYsRR+jP/2RhyXx/r/XlRFZnKOrNWPmY8fNpIC1Bb+74XDB7c6w3SKHwBqg/GcehmtvyDBh1O6/a12gy5EFmEClnDpft/gj2nZUo0Tb SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2018 08:30:52.5133 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 945bfebc-4224-4d04-5707-08d60d89bcad X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB1573 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180829_013111_016560_E48E52CE X-CRM114-Status: UNSURE ( 7.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Gregory CLEMENT , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andrew Lunn Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 7e47fd84b56b ("net: mvneta: Allocate page for the descriptor") always allocate one page for each rx descriptor, so the rx is mapped with dmap_map_page() now, but the unmap routine isn't updated at the same time. Fix this by using dma_unmap_page() in corresponding places. Fixes: 7e47fd84b56b ("net: mvneta: Allocate page for the descriptor") Signed-off-by: Jisheng Zhang --- drivers/net/ethernet/marvell/mvneta.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 0ce94f6587a5..d9206094fce3 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -1890,8 +1890,9 @@ static void mvneta_rxq_drop_pkts(struct mvneta_port *pp, if (!data || !(rx_desc->buf_phys_addr)) continue; - dma_unmap_single(pp->dev->dev.parent, rx_desc->buf_phys_addr, - MVNETA_RX_BUF_SIZE(pp->pkt_size), DMA_FROM_DEVICE); + dma_unmap_page(pp->dev->dev.parent, rx_desc->buf_phys_addr, + MVNETA_RX_BUF_SIZE(pp->pkt_size), + DMA_FROM_DEVICE); __free_page(data); } } @@ -2008,8 +2009,8 @@ static int mvneta_rx_swbm(struct napi_struct *napi, skb_add_rx_frag(rxq->skb, frag_num, page, frag_offset, frag_size, PAGE_SIZE); - dma_unmap_single(dev->dev.parent, phys_addr, - PAGE_SIZE, DMA_FROM_DEVICE); + dma_unmap_page(dev->dev.parent, phys_addr, + PAGE_SIZE, DMA_FROM_DEVICE); rxq->left_size -= frag_size; } } else { @@ -2039,9 +2040,8 @@ static int mvneta_rx_swbm(struct napi_struct *napi, frag_offset, frag_size, PAGE_SIZE); - dma_unmap_single(dev->dev.parent, phys_addr, - PAGE_SIZE, - DMA_FROM_DEVICE); + dma_unmap_page(dev->dev.parent, phys_addr, + PAGE_SIZE, DMA_FROM_DEVICE); rxq->left_size -= frag_size; } From patchwork Wed Aug 29 08:28:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 10579665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 26FAC17DB for ; Wed, 29 Aug 2018 08:33:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 133AB2951A for ; Wed, 29 Aug 2018 08:33:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05A702A60A; Wed, 29 Aug 2018 08:33:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7C33D2951A for ; Wed, 29 Aug 2018 08:33:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sn2phm1VUF3jlU9xgtCKOEHJkIGiazNARtuSOpABgqs=; b=PYXHEm4XpTYZSH yOAWStu3RWzv9D3Ub62vW5bqiU9Dv5n7DzCUPBIsMd4J7OT93Sw+9KUQJhGILnf1MgU+lvT36YUPc k5qDAwIubhZUd/HPp2yHQEz6OuRqdSeyhlvz45DRzv8xRIFHDqC08au4BY/EnTrfLyx87bfyhngj6 ctC/CJi5Hc0jiyXLT1oSBz+hFCXZOAdor7XgO/89WIWrqYiXIH//vvfvEXSJxIr8GA5wIebKkBxsz NEKJtd7KIJmlhndkFfAfJ6uuS5tW9rGqG8tIolaZE52uZZ3hXv1BWpogwmwYpZSUcONaULRj75ggy 4WmbTS4SEaMjolPeczeg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuvuX-0004vI-4h; Wed, 29 Aug 2018 08:33:09 +0000 Received: from mail-by2nam03on0044.outbound.protection.outlook.com ([104.47.42.44] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuvtM-0004NK-Fz for linux-arm-kernel@lists.infradead.org; Wed, 29 Aug 2018 08:31:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1GpQ1vdMRz74HnBfPeLYxMzVUTwPtfd+1sLQlXdhO1o=; b=MtYHMV63QDVDDeAyfbTzrmM+H9IwndPYUeMZoFTxh75UZq8wdvjsZm4tlmkYXJXkRF2U5RFgUWSnzfY2ZdphwjC8tDc1SgV1Jx8l0sh++vvkUYg/NkpS48rcUShq46jXAwt6D4Ll2JAHHGMeRVrxA+G5Z0m/gnQo/SSSGMjKoyI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by BLUPR0301MB1569.namprd03.prod.outlook.com (2a01:111:e400:52a9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.15; Wed, 29 Aug 2018 08:31:41 +0000 Date: Wed, 29 Aug 2018 16:28:36 +0800 From: Jisheng Zhang To: , "David S. Miller" Subject: [PATCH 3/5] net: mvneta: Don't check NETIF_F_GRO ourself Message-ID: <20180829162836.2551ba46@xhacker.debian> In-Reply-To: <20180829162456.2bd69796@xhacker.debian> References: <20180829162456.2bd69796@xhacker.debian> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: TYAPR01CA0082.jpnprd01.prod.outlook.com (2603:1096:404:2c::22) To BLUPR0301MB1569.namprd03.prod.outlook.com (2a01:111:e400:52a9::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 805f038f-1079-48c8-296d-08d60d89d9d1 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BLUPR0301MB1569; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1569; 3:Ph22fHJZlCf4w+ZVO7s/oNBf61zTffZQX8F33XezsKa9cP+c5V+4NdJDCyO24nRQ1QoxCEK9peNnkQFYyQLk6CndEHN50w3Ep81D6B6onv7ePcAvv8UmshG9riWD/Z/EzL6b0iyFiMmgvZdVaxtuubYFTisK6aFQmAh27uJeUqDOTOn2/Q8yqOdCmrwWvVVEl8r65r64EJzu58WmhUfbyK7MFzA1GvNiqExKyxw4/HO5RFikGnQbT44ie5ndfYBc; 25:UBydm+m+v3FaOH2OeMMnrBUfMGlczIiCcXTiZvLt+DgtzeTqFUPrJPF92saKV6hjrOvQES0Y0ZKplhjBuMX817Hh+Sjeh0ojx+cnFvA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O02mtlj3rguxMEv; 4:TIe49X96dD5q4z007QFFh8pjRCRTyvzI/qlb2thJGW1tayv2moKqOhdWlkRB/ago/6/IpkJVOkdRQUtlE/gTiRfpFG422K1trv2uxVJs7+3TTFzXtmtjTyRu6fJeAQeN/tANimybCSAKxlb+KHqUozcjng0J9/9tLnT91ss3VE5XQHJiA74End6jNWMJoSYvSIMlFdcM5gtPnscGoAlMpfDbPE8p+WDjrUUF5rX6lu/u8laaOnReE92HPmHryB8sB2phoChzRMbhKTKk+Sa1iQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699016); SRVR:BLUPR0301MB1569; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0301MB1569; X-Forefront-PRVS: 077929D941 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(136003)(376002)(366004)(396003)(39860400002)(346002)(199004)(189003)(478600001)(23726003)(2906002)(72206003)(1076002)(106356001)(33896004)(105586002)(230700001)(7736002)(6666003)(3846002)(6116002)(54906003)(476003)(66066001)(110136005)(956004)(55016002)(316002)(486006)(305945005)(97736004)(47776003)(53936002)(76176011)(7696005)(52116002)(50466002)(81166006)(81156014)(446003)(11346002)(5660300001)(9686003)(8676002)(16526019)(4326008)(86362001)(6506007)(386003)(8936002)(186003)(25786009)(68736007)(50226002)(26005)(39210200001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0301MB1569; H:xhacker.debian; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) X-Microsoft-Exch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rxAnsUyuiIlnd04YPMd5pPQA==; 5:jnDPZ/sMv63UOz9k0Ct8s0iWnxIX3KSnctCbiYN4EF35PJlQQP24Unfx26kx1F/ScSUnFq3W65Q3g6ew7Bzf1aPagwioRpvMODL/ybjMn0+DSdS2w7U4/2Neb6YhDrBSd4Xus/niORit2+c+4nJ70jRz1sFnc47AR4DsP9Q6pf0=; 7:07Voa3viSUhvopnsBNcojW/L9neqSaXMpaiAbH1QKtpF258MI08rb+FJ+4HovJShYCgTCfsixxeJhS/cl+YxspR2vWDbi7Z2ULjR6xM3arZO0c7aesE/jh9P2LEFkClOVecI9vKUWfnIIMuLu09zcR7KudMXZSB9woLhoopMlJ5xV7rEWJArdotkNDWE0/SU7WrX/z1PEbkRj38ypVa3v76qlS60ijZLTjXSTWgj/y5/IOv8yDC6hyShP/iqo9OW SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2018 08:31:41.0565 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 805f038f-1079-48c8-296d-08d60d89d9d1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB1569 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180829_013156_608476_72BB242C X-CRM114-Status: UNSURE ( 7.21 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Gregory CLEMENT , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andrew Lunn Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP napi_gro_receive() checks NETIF_F_GRO bit as well, if the bit is not set, we will go through GRO_NORMAL in napi_skb_finish(), so fall back to netif_receive_skb_internal(), so we don't need to check NETIF_F_GRO ourself. Signed-off-by: Jisheng Zhang Reviewed-by: Gregory CLEMENT --- drivers/net/ethernet/marvell/mvneta.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index d9206094fce3..06634d4f9b94 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -2065,10 +2065,7 @@ static int mvneta_rx_swbm(struct napi_struct *napi, /* Linux processing */ rxq->skb->protocol = eth_type_trans(rxq->skb, dev); - if (dev->features & NETIF_F_GRO) - napi_gro_receive(napi, rxq->skb); - else - netif_receive_skb(rxq->skb); + napi_gro_receive(napi, rxq->skb); /* clean uncomplete skb pointer in queue */ rxq->skb = NULL; From patchwork Wed Aug 29 08:29:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 10579667 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37FF517DB for ; Wed, 29 Aug 2018 08:35:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26D492A60A for ; Wed, 29 Aug 2018 08:35:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AE5B2A648; Wed, 29 Aug 2018 08:35:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6F7B62A60A for ; Wed, 29 Aug 2018 08:34:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zVK+uKP9uDYBF4RQUL31+VtZshSlVxUVcBZQ179zOTI=; b=UmeVyr6rlmKHLx cpb32N2PJHThHe6jodlI37L3bJGo/BIvYFyjgfQrAT5eOxYnllsYrsxVWiA8Yd73+qfwq2TklNBMM iWEOx9lrNr1EXpf0DchqfBDx61kBMqDTr9gbtFv6tfL+qyv+CIWZRoOpA8nM0h2yF5Ki7R1h8XhJA PrXH00Rk1uISD7Z067MW6VHazL+PgJzOwvE5Xl4lqsBiZoIzNlglI/lyAcP72DrWikAKwBc1abeGI H/rOpLqu0LzOtb2mf4BkDtplIYZKgUO4xit3g4hp+g5F7kwIfDEBU/OSwu2wlAzdQEd+KAXQ8vh4Y LUszafXh7nzeu6u6WUDw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuvwB-0005be-If; Wed, 29 Aug 2018 08:34:51 +0000 Received: from mail-bl2nam02on062a.outbound.protection.outlook.com ([2a01:111:f400:fe46::62a] helo=NAM02-BL2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuvuD-0004kd-RY for linux-arm-kernel@lists.infradead.org; Wed, 29 Aug 2018 08:32:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ft7aLMdRhYL5fuIisx95uV5SmA1LSvSM7BuaglmHdcY=; b=r1JwVCdwKVBCleXcVql2CX395t29UNWGsH+b4UPg5WDflZuoznwIrW6Rc54T2jzTwWkOdRIyQ5wmZI0q6Sd8qrI1y2ZdYGLjuqXFVS6KDG2tvY/mLlBpgidxBJ4frkHCt2zlAAGjrP07uIAy25ex926YqJao26Dlorh0g+HhZLU= Received: from xhacker.debian (124.74.246.114) by SN1PR0301MB1582.namprd03.prod.outlook.com (2a01:111:e400:5232::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.13; Wed, 29 Aug 2018 08:32:34 +0000 Date: Wed, 29 Aug 2018 16:29:32 +0800 From: Jisheng Zhang To: , "David S. Miller" Subject: [PATCH 4/5] net: mvneta: enable NETIF_F_RXCSUM by default Message-ID: <20180829162932.6015e89d@xhacker.debian> In-Reply-To: <20180829162456.2bd69796@xhacker.debian> References: <20180829162456.2bd69796@xhacker.debian> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: TYAPR04CA0013.apcprd04.prod.outlook.com (2603:1096:404:15::25) To SN1PR0301MB1582.namprd03.prod.outlook.com (2a01:111:e400:5232::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f53564b5-e479-4862-1cbf-08d60d89f90b X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN1PR0301MB1582; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1582; 3:yBoxctC164cMeRfLKeSWVdo94sNc4BVyZgHxeRTlqalDhzbMJ0Gr3FHVszPuEwJywQ6gw/+N3ycARpqR2dkFeqqmdz8+raOKq5J7SjJAARkDPepc53TGo4iXQQll+wWD+THRu6lzI1kN+85HiTyVNk4Y9yOxVGfUiei/ARA2Ce8LP+k5wilwJt2po+JnpZsB1rv/KUCU+96el0yVkKmEsOvhYX2Lvx2V3K1vdZd8y9MovqVMGliS+n25eaAFOLrL; 25:d70ig/i2qx6NqvuDvmsjzVc16pU2KlbjtIEVJ3K/w+h8c8DB1uOKrJR+L+1WfNT9sZW98tVjth7JJ55jJGU0SP030ducujL2mmA0cjrLkqlYP1x1F3emYrXYXJG7axlV6ney6+04fsnpfQlsgVB7N3w2jesgbojFPreXFcKAascWIpbSWZ5gKBS8Kl+6tMI+pWVUinJd5fFD63DXO8MSNVpJ1QQ0NaMAFbk/s2rwXhWcpn4Q/CEcbxxJaEtviH2knDZIoSLsAxVAYZcFurlRUDCa867zOdB1ezVLL8/iw0HEe04e92klm9IjBMN0YqtXvTxdoZ4+ds9GJY97QoegAg==; 31:546s1rVXGxwElJkqi7vHKsf8ONYlRD3rG+kQRPeKd3ISh1V6M3YbZ8UPTdARTeaKEUJWzPy4DmIET3hQlf839i0VxnV7ByKrJl6MTsvq1uPW0Wk61CKPwkpfynoRRMEmczQKlvQO7UgQ1dbQgTTudfpBwPBXm5vLiPz2b0OP9LoSkKgXsicxfPMImzR0cAMyGTriD/kGlNMWB8AekeMKl7lH5A2BpcxV9dwQpz9DYKE= X-MS-TrafficTypeDiagnostic: SN1PR0301MB1582: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1582; 20:+sMBPJdgl5V2wMiQrFCsOapJmuGIcLnfoDOVdTmdecScQZH+tSY2j1u51ARhHEOH9Fu8M4ryxFAvmlMj6HiVKCPlhPLwGylR4HnSNOWYSHi/2h7pXYOlzEUN92gSV78vEtyiOAoF4lNLQWbwwcWo8c0Xa+/1NGTAGBzqilnEHjYwHmgFwMgBZ63Qgb5wEK3CDtG+9xtjDwCvhotXxyT5aXsYkhh/GXzdiPF4K7yMfM4ukwBtp6C2sizIAckeTMvWPg3OLa3PL+qE1EjmGbCmhvWP3BFJ/zgKkwbIQZLFC24JRvzCYO1lfMCVb2hUs4BkDipFEU1l1gyRkgvQbS5ksshoi3GElAaRK7y6/bYuCse+YerYcOv9W1i1/S1HjngQWOaDH7eUZzuZMI0JhpmSCNAuNjfA2hw2ZyduAwx6HRg6sDWL4lm6tGT1z858SCyJom46FzbpK1KdfslmrwXz6ww3reIb8M9haEkzsG5nAw/pCosKNcBpeInqTO5P4XDk; 4:PT+D8hThSpCu+yNSY5+1cQZ+ajS4CSbYGRQCQIrTV7oeKUK0vRixnZW4OAJgjNLOVsBa0BmWwrfrihU19R+hThQI/XIyVUKw4rSkES6VTPK6aRB9NUTMhX8Tuu7XW8/sctM5eNry4zkaEpdTi3L6Fqjkxbc3hrTCjv3uOMFjUuN6z6P966ohWTGIgZ/43N8C41WFo66oAr4vkqfp6NpgiYpbfZiacZQ3WslGGR1VjHgj8Y0TU7et34X4rOxNfdb2F6lpP7I+rYbrjdRqIJ/+FA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(149027)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(201708071742011)(7699016); SRVR:SN1PR0301MB1582; BCL:0; PCL:0; RULEID:; SRVR:SN1PR0301MB1582; X-Forefront-PRVS: 077929D941 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(136003)(346002)(376002)(189003)(199004)(7696005)(76176011)(230700001)(72206003)(68736007)(956004)(446003)(478600001)(2906002)(5660300001)(11346002)(110136005)(23726003)(54906003)(316002)(1076002)(50466002)(476003)(9686003)(3846002)(55016002)(6116002)(33896004)(25786009)(386003)(16526019)(50226002)(14444005)(106356001)(186003)(7736002)(486006)(52116002)(97736004)(26005)(4326008)(105586002)(8936002)(53936002)(66066001)(6506007)(81166006)(47776003)(86362001)(81156014)(305945005)(8676002)(39210200001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0301MB1582; H:xhacker.debian; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0301MB1582; 23:wVxlmBmK6fz73ftE5MJDonNSslaAGLSH3w21ntq?= wRe5rYfQ9hP/aZp4Y1U89vtNU9pQYH67wvujel61+En8OSUiE8cF/xKtnJeP3P5VCYoQb0Yi3VjtRLkBVAKzzHcfUxonViMk7eGZfvNC/33xekW0Dm7X8+KsN/GKbPsRWHPC6WOQmyRdKoKDsgfh5TlzU9lZ7cHRtHqP5uF1lMSOzPoFIXFA/a4hcZb1HWIt1+/teh+Q6a+WrXTib1Y2puI36QvLAKkXkT0y2GxtbH9JYhrxKAhkM9QfBz7fMledLv0nzxrX0VoTIdZMaJ8zEk9a/t2j3NVDk5/2c026OMTrXSWF6SvBul6LHj5/CZl9zqnGG7pq0Vthrf+tRwKK6sOGdUOMhdrKlPqIhGjokFNXqc2mUSpFUIUyxAKflm1Fd6IVxIt1BOO63Dt/XOmdVvB0iqEqI4Ixx7ncN/OOe1B9WC4hRdRglgEXYnM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OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2018 08:32:34.1164 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f53564b5-e479-4862-1cbf-08d60d89f90b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0301MB1582 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180829_013250_080028_5188FB8D X-CRM114-Status: UNSURE ( 7.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Gregory CLEMENT , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andrew Lunn Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The code and HW supports NETIF_F_RXCSUM, so let's enable it by default. Signed-off-by: Jisheng Zhang Reviewed-by: Gregory CLEMENT --- drivers/net/ethernet/marvell/mvneta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 06634d4f9b94..7d98f7828a30 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -4591,7 +4591,8 @@ static int mvneta_probe(struct platform_device *pdev) } } - dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_TSO; + dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | + NETIF_F_TSO | NETIF_F_RXCSUM; dev->hw_features |= dev->features; dev->vlan_features |= dev->features; dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; From patchwork Wed Aug 29 08:30:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 10579675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EAD3B17DB for ; Wed, 29 Aug 2018 08:35:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D45D52A648 for ; Wed, 29 Aug 2018 08:35:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C52042A74C; Wed, 29 Aug 2018 08:35:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2C3212A648 for ; Wed, 29 Aug 2018 08:35:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iyz0/X/1Eu5g906/4zvyItL5Ud+TSVHad6yK5OEDB1s=; b=IrIkrk8WYgfcu2 TMhJwYJfq/r0IIJ9yq4RI/FSAl7zk/ZSQW8xO8TU3No2wjBynOL9KMda5OsTGDNU0ad3Vghi6ssFi Xa/YZ/Ce6ERQ5rjZLQWv5jrgLjARJNSKXaLTk2UqA+/ij3fuCA0poH6psXQzzKGtX5CN0gWDOr0SC qBNYwKD2ZzWtKWNa25kFB/KjmdIoVmA3mNQs8IgE4X+lqq7FhfOwznkbcrq5hd7hitpLAU6/wbHxJ T+FFuyz0WrTEqBqwMtdQ8Vt/yoRJw06rrUimGken71RuzobStg8q49mldkoMNPvWEQZ5IPco9ikZw d7tifKdhaZTrAFyE/xUw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuvwz-0007A6-U1; Wed, 29 Aug 2018 08:35:42 +0000 Received: from mail-co1nam05on061b.outbound.protection.outlook.com ([2a01:111:f400:fe50::61b] helo=NAM05-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuvv5-00056J-TV for linux-arm-kernel@lists.infradead.org; Wed, 29 Aug 2018 08:34:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ssSYEkoUjeRD2907CRxsnGJWrPIgq8vvZI3n7lRvDkk=; b=nuSZWYmU7xerEJTMJbjWqIapm4Zc5NDd+Pg5AeY84pcMrV/izrnxOAyOOMcPai4tO39CCW7GKNiPOxMhRWTDg3LGVAIdW9vI9/2Jy3yE7wDd8Su5Ahf9mXCmnTsq0DXXXA+v951sv6/IZLQK+IIp1JST1fo5XPtXWwui71y2NhA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by BLUPR0301MB1571.namprd03.prod.outlook.com (2a01:111:e400:52a9::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.14; Wed, 29 Aug 2018 08:33:26 +0000 Date: Wed, 29 Aug 2018 16:30:21 +0800 From: Jisheng Zhang To: , "David S. Miller" Subject: [PATCH 5/5] net: mvneta: reduce smp_processor_id() calling in mvneta_tx_done_gbe Message-ID: <20180829163021.70ce99ab@xhacker.debian> In-Reply-To: <20180829162456.2bd69796@xhacker.debian> References: <20180829162456.2bd69796@xhacker.debian> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: TYAPR04CA0004.apcprd04.prod.outlook.com (2603:1096:404:15::16) To BLUPR0301MB1571.namprd03.prod.outlook.com (2a01:111:e400:52a9::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4c07545e-34ab-4c17-3c45-08d60d8a18db X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BLUPR0301MB1571; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1571; 3:JALAq0nJFJmsx+XnA+bRySjdqSm9wFBJowbf7koxHe+R5XQbhxPR+cHNGcOtpZe6RyYdkkrvgNHiaOIihOuW3yDWJBzivGc0CwTcgL0aISwc10PuW+ydcKm1sTJMzAgtJFQgWlwTpXpD0/4CFCobvYuY6E2axc22+eqDwzChtrULECF3hx7svD7JGgQze+XunS7hWANoKCnOJZGvpj+TrxDWdne1QwaqnV2cxMSTJvhZ2JdqnVV+GkHWbNMahlcR; 25:MKzkG86o01JVckeRJ7Oo94+5t08S3m2JAs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3Qn1L3u/dvI9wnsufHO/y/JMpYCT13tTDh/AYUO2m2URe+yF/vy7de7hp9p+oAEm3J7e; 4:TOZFexnI+z2Q2yhNlQtfnAcigjfK8GO0XkWSPKYJsWPi+n3acwN/t8j148s+d2ofmqLTG4+JXYQUwFiY0JptbqFym45OgJ9gVWdM+F2QnA3olGeCtTGWV7qIXtRg2mVn7HD/vviHoLCELijFflYKeTY9qiUWdfrnxqM+FZW+ywCDu6qpsgWfJTmvSydnGtZGsS2IbWJV9jyZ9CZmxJV9vc1zTjVApQIomU1jpiCow9snf5onGw0cK0MzxADLvUmW4iGJ8LzvdPNHDTTIkSBBNQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699016); SRVR:BLUPR0301MB1571; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0301MB1571; X-Forefront-PRVS: 077929D941 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(136003)(39860400002)(346002)(396003)(376002)(199004)(189003)(8676002)(55016002)(105586002)(68736007)(106356001)(14444005)(305945005)(7736002)(72206003)(4326008)(25786009)(478600001)(2906002)(9686003)(33896004)(97736004)(52116002)(7696005)(76176011)(1076002)(110136005)(54906003)(53936002)(316002)(23726003)(86362001)(6506007)(386003)(476003)(3846002)(6116002)(8936002)(47776003)(8746002)(66066001)(26005)(486006)(81166006)(81156014)(186003)(446003)(16526019)(956004)(6666003)(50226002)(5660300001)(50466002)(11346002)(39210200001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0301MB1571; H:xhacker.debian; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0301MB1571; 23:cQWMSq4no38gIjrAqwu54nRit40reQ2TkPAtbtd?= kt1gRxWm1lRD6Fn7PV7occudCB/tIvnwmmoc74rTHxr/qpPk5q1STWKD2B8Ht7jgvpLvDQBrfdZpan4HqLaHo5W3IzrbjLfdRexCX65UlBPUFj75FbpOUvTnMUF7h9TFWeZJ+fXK0Qj5pCi1UDD2iZ1iPHXvfD6VDCb0UfkJiT//Ge1biLhhgY5ikKZHUvI+OEqq8r+2P+yV8IRnQF0PbXfFa1mIc0tquA1VMQxcVDPiClZqYlGTVMBYLq9tpC4zLPKe+Sfo+J5RqSsh+yWYMwISE2ViMfpEb46nrbT50yycYxynE/GKZ/fBVCf592cNCDi+tFcON7JwMcqBcdJSO4cKv/IbfMbv6lfzjspV2OeEOQpUVp3iOZbtAibKRR1Q9o1RRwWPSONrw8kKIczoUW7qOml2mWr5nptZ/X9/9ajckjWjYT2BPzAbgfrErwtKu7iD8h2lkjPVTZcQfHKhGaLgcQBZQSFlTCU7e6o6pJq61SVNZSSEDwyGW9YtrdRoD791gliH3DsMJP1ec2rUGXALVkrs72U+7dwgPu2LvktrMl+QXUmX6HCwGa15AkMQexPFokQwiOiTftcSMUKL6axtfUnH5gk7HPNjpEgBiK+6RV9Cafn4UUORXAOhMx1YnTEPsEERk9ZaNPNeRSLKdvrgQPxTm4TvCNR2tJ++z6bKEes8mCkUd6ZYbZojLoXta0sSwDIRfLWbCb90a2LvfyUay6N7WJ8gtw8/W4JXWJxjQLLUqZHSn2iC/5OYcYD7ejLD3z6IQz+a6SXmHwG1JkBYB7jD680pyRHBWRmGJSaUqDZ6vne+f4KcmPabAIvbK+ldrGoeMHyHCuNXeQB/QZodkovRfuUMySICMDSTAI+iNvlseco46Ar5TV5a3HuYyyPjJOSUyctYL2pRfQ1zIjMFAR73kYz/X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Zme5i6S4sAX5wQpPnGqVUp0Pso1TewH0OGwXUs6bxd83FttQlcGBcAfAkdPc5oDFLixgO9m1k4rIVTgDuEG4DTcDIJnEBLXC6pdUA==; 5:980CC0cHHGJQverQ6kpbqKqT5v66YJI/XXTPcZX+koPDuvbG5PfVeFT/axmZk2HG47hqa3xO3tDIPRFnaZ0Og3myuxuKaXuR28JsCH3TswnaLIbelwwVbD/AhWCO+2EMwmXRTgoLJbEblV4fyYXAYWKzE76ihdJKvMVJxkRVioo=; 7:PaWb3tum8ocHyVuE6qTM+sPuL+XtG5KgvGXWNQBgSuX9z3756qa9stHXJdL+K/5UD6NGDMoGViTwexsMbB50f3q694q796o2Hv42WLwWdHPXBQqrDvvZyK9bcu9jApI3GgAyU6bECB1AWHNaV+2vFflx7FDIgy6IL+MOp4I1zTXjoGny9VyoStGi3XWXpDtrjig+rOAg/RAFon04AFoB4XVefEN4TPVYhWKGNeWjRzaQnrXi3PdEDEKWUYSBNs3m SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2018 08:33:26.4734 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4c07545e-34ab-4c17-3c45-08d60d8a18db X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB1571 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180829_013344_247166_A548D153 X-CRM114-Status: UNSURE ( 8.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Gregory CLEMENT , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andrew Lunn Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In the loop of mvneta_tx_done_gbe(), we call the smp_processor_id() each time, move the call out of the loop to optimize the code a bit. Before the patch, the loop looks like(under arm64): ldr x1, [x29,#120] ... ldr w24, [x1,#36] ... bl 0 <_raw_spin_lock> str w24, [x27,#132] ... After the patch, the loop looks like(under arm64): ... bl 0 <_raw_spin_lock> str w23, [x28,#132] ... where w23 is loaded so be ready before the loop. From another side, mvneta_tx_done_gbe() is called from mvneta_poll() which is in non-preemptible context, so it's safe to call the smp_processor_id() function once. Signed-off-by: Jisheng Zhang Reviewed-by: Gregory CLEMENT --- drivers/net/ethernet/marvell/mvneta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 7d98f7828a30..62e81e267e13 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -2507,12 +2507,13 @@ static void mvneta_tx_done_gbe(struct mvneta_port *pp, u32 cause_tx_done) { struct mvneta_tx_queue *txq; struct netdev_queue *nq; + int cpu = smp_processor_id(); while (cause_tx_done) { txq = mvneta_tx_done_policy(pp, cause_tx_done); nq = netdev_get_tx_queue(pp->dev, txq->id); - __netif_tx_lock(nq, smp_processor_id()); + __netif_tx_lock(nq, cpu); if (txq->count) mvneta_txq_done(pp, txq);