Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp360877imm; Wed, 29 Aug 2018 01:45:38 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZAmX2n+/O2PbdmldiaVQcovhcIwIYtbE4z6v/FuyjJ0VSgmR3bHuWcMx+sfuUv3aCQnMIR X-Received: by 2002:a63:5964:: with SMTP id j36-v6mr4839501pgm.222.1535532338485; Wed, 29 Aug 2018 01:45:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535532338; cv=none; d=google.com; s=arc-20160816; b=DOzQZPRduR1oTcdxTsox3VtH8pQ2lGxre6Wzs77PlZNBfhflnzls3AixE+WxubnRl4 wyHxgr2mWC9tAzKn5L2JNpdg4KBrYRAuQjObnHIOcTmgmhugnZQrplh+sgkpSniF0XgC tZTN7JpzFKjYlnD4jbfFdPIJ9pwDvZ1DIS5wBshILSaTGBJUbQVPHl3re8N0zevR2E+D 4ffhdNaMS7r80z0jV9wGILwtY/36B97JutqZxFK45wtDkz0cVBzT5z3SpNP8EFt9YorD PRRRTtBRlHoWXWlusx/SDtffgqudXI87Ydt61hBM1MD1M+JYgi4OS4SyJDqIan1S43oU QkrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=GQr19FdyKVYEcd0O0WA3QwCqj5WCi2NXrBaXv+kafmo=; b=G96X8NF1mFJGxT6ZlM/df5ZNUmYrJj2ntc73HiRC0e4CgKGopMtZxUhHE6Vblb3ayS MrbAeKkFMQg8OLsoKeFQLS467PN/SfYNrpNYkHm5Iw33fpy32R6ICFfbThqBSsnxGeBj O/hjci7PQMZLb2QEmQ2u6fXO2r0hizmSU+xh1bB9fku6hVKh49WWpFIBD9L8gh9QA76c hAWAVy1ww18yiu7x+1yib5YV+I6aMtYIS43/JmgZBwlULzyWjAfnnx8AhhpEuXESDley qRzIOPbu3ApMppWEa+Y4FHQjZTwfQQyh3wVZl3s8T5TeB8I4mi4jhvH1poqvbc2J3Ia2 Z7eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector1-synaptics-com header.b=N3p4L3gs; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1-v6si3179684pgh.65.2018.08.29.01.45.23; Wed, 29 Aug 2018 01:45:38 -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=@Synaptics.onmicrosoft.com header.s=selector1-synaptics-com header.b=N3p4L3gs; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727993AbeH2MjW (ORCPT + 99 others); Wed, 29 Aug 2018 08:39:22 -0400 Received: from mail-co1nam03on0047.outbound.protection.outlook.com ([104.47.40.47]:44005 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727204AbeH2MjV (ORCPT ); Wed, 29 Aug 2018 08:39:21 -0400 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=GQr19FdyKVYEcd0O0WA3QwCqj5WCi2NXrBaXv+kafmo=; b=N3p4L3gsY3vEQaA/SXUD3ZXcex8KI0IiT/Ak4Sd9WsgEiKBfrG3bsbQaEzGReRHo8JqX9n5IgyM7cseD6qiHWx0d8yIWlarbdMF1PvgC/Luy4wSeAm7kyuIB06WA+iN1kWrt0Q86Uu38j6yLVTJxONBTDbiBwelNEvtf0s1UjGs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by CY1PR0301MB1577.namprd03.prod.outlook.com (2a01:111:e400:529c::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:43:26 +0000 Date: Wed, 29 Aug 2018 16:40:24 +0800 From: Jisheng Zhang To: , "David S. Miller" Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Lunn , Gregory CLEMENT , linux-arm-kernel@lists.infradead.org, Yelena Krivosheev Subject: Re: [PATCH 0/5] net: mvneta: some bug fix and trivial improvement Message-ID: <20180829164024.41e8439d@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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: TYAPR01CA0007.jpnprd01.prod.outlook.com (2603:1096:404::19) To CY1PR0301MB1577.namprd03.prod.outlook.com (2a01:111:e400:529c::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0db88d57-9474-4fb6-0989-08d60d8b7dda X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:CY1PR0301MB1577; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1577;3:ovrcgkPHDubMHVfuvYd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Hm2lGMMNTXKR6H0zurvJvgFq46Bol6RvNQMlnUafb429B+b3sKQj0DDdcQ73iyXLGDdBWxmzKrS/ULYH2Nk4VK1My5e0mZB5aQAsRtfEoX+jgm9woniGyTHlu5415LC1NxRP5+sgl0V4LZoTMLFp5LPKRIkPlXWOfpyq/BolMWOnlFHcUVRZidrJ04+mUnRM2tRYIHvmmEh+56yzSyt/ZnSL0ODtF9ZqLNgw++eWRJFaFiTsTmLD38kPpr1N6dbwevZWMbJMo+9IPTwGHb0VYJDczY1X1yx6AjclQVM2JlQoDewQzIAA3Cb7lWh2e0kPx6ZL5;4:SIRAQrUM6PKVuPEBK33iFlvAVMNBeoBXhrbgmusS4w22Za7ZBZQIf7xiGiYUHrQ0En9GUo7A25dNgRLItQCEuPdW0xGxqVBwxl8cR8Ux4rtAEj9UWosJWguR1hS7i/K5NWM9NgUKQ6/jqHgPC+MgDsLSfQJwT4kmf/2hwUmJUsJZGY5Mtvn9EOX06C6eG+S4ut5YmBCXQ0bguXhT6H5rZD/opAvrtZ7StO+P2CIg7eQ7yBB5A+Q5+Gg3uUaM0YXvAR/lMNo9ydNxsUVkY/QezA== 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)(93006095)(93001095)(3002001)(3231311)(944501410)(52105095)(10201501046)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016);SRVR:CY1PR0301MB1577;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1577; X-Forefront-PRVS: 077929D941 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(346002)(396003)(136003)(376002)(39860400002)(366004)(199004)(189003)(52314003)(305945005)(230700001)(86362001)(16526019)(81156014)(476003)(8676002)(50226002)(50466002)(81166006)(11346002)(486006)(26005)(5660300001)(229853002)(186003)(25786009)(54906003)(956004)(316002)(105586002)(6246003)(106356001)(4326008)(7736002)(110136005)(97736004)(6506007)(53936002)(7696005)(52116002)(72206003)(8936002)(3846002)(33896004)(76176011)(47776003)(386003)(55016002)(68736007)(9686003)(66066001)(478600001)(6116002)(23726003)(2906002)(1076002)(446003)(39210200001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0301MB1577;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;CY1PR0301MB1577;23:d8IRGIRRXGlO2cC1Ngri65RNj9SyKyqYvl5Soa0?= =?us-ascii?Q?eFrpg96CR6dv1kD7+p4qD8mWEV18L0+rlPLDJdAXcwFKmW1A3juXZRdHLlSi?= =?us-ascii?Q?bfuTPpDIlRqKzzBVTZ96YExGhG5pVZCv0prlboZdGzOPXRxDFkNrjFJlqIVl?= =?us-ascii?Q?MfbiAmXyF8iicKy5alfPxSDa4UtvDr/DP3ARunT5w1gNSPW9Ay5P078wXz31?= =?us-ascii?Q?FCOOgA4PB3BBM+ErVJ9GfLaWLbmoSZC+woJXvsMvbhPe8aJsaotWudFsv7PL?= =?us-ascii?Q?2pHATAEqqm2HyA3zzOp4yGLZV8uxgNMum0h2u1hleUi+1MrPJY819YUJ0oA5?= =?us-ascii?Q?xY9J8MsnDQcPJcTCc2QtRQUuEUafkCodazPQjwfu5E74F/gVoNrRape8d4Mh?= =?us-ascii?Q?Gn67VKd2psTTu3LjNnOSldL0gvtqzmE/mUZ+8zvTOlRk9l5PwgFqTpj1rfYt?= =?us-ascii?Q?/dASAzkHh//bcDJ5Mk7ZrAhCOzWhhVZ8I69N+bOpLtUWT63kT0/OADPsr3t0?= =?us-ascii?Q?WdNFjnWEX+CQpoZYP2c3N1yxDR7bjsFdOspdrh8w1e3ikSBfG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qlVmPcTIxvtwzZ2HcjFI0VNcEu8sokCDqIU5xObdl1uKYRA/t2XW8p4yyMiKEd3/VvUQ+ayHG8k176BO58IoB/S1S0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2018 08:43:26.2023 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0db88d57-9474-4fb6-0989-08d60d8b7dda X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1577 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Aug 2018 16:25:57 +0800 Jisheng Zhang wrote: > patch1 fixes rx_offset_correction set and usage. Because 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. > > patch2 fixes the wrong function to unmap rx buf I have question about the following two commits: 7e47fd84b56b ("net: mvneta: Allocate page for the descriptor"), it cause a waste, for normal 1500 MTU, before this patch we allocate 1920Bytes for rx after this patch, we always allocate PAGE_SIZE bytes, if PAGE_SIZE=4096, we waste 53% memory for each rx buf. I'm not sure whether the performance improvement deserve the pay. 562e2f467e71 ("net: mvneta: Improve the buffer allocation method for SWBM") mentions that "With system having a small memory (around 256MB), the state "cannot allocate memory to refill with new buffer" is reach pretty quickly" is it due to the memory waste as said above? Anyway, by this commit, we want to improve the situation on a small memory system, so should we firstly revert commit 7e47fd84b56b ("net: mvneta: Allocate page for the descriptor")? Any comments are welcome! Thanks > > patch3 removes the NETIF_F_GRO check ourself, because the net subsystem > will handle it for us. > > patch4 enables NETIF_F_RXCSUM by default, since the driver and HW > supports the feature. > > patch5 is a trivial optimization, to reduce smp_processor_id() calling > in mvneta_tx_done_gbe. > > Jisheng Zhang (5): > net: mvneta: fix rx_offset_correction set and usage > net: mvneta: fix the wrong function to unmap rx buf > net: mvneta: Don't check NETIF_F_GRO ourself > net: mvneta: enable NETIF_F_RXCSUM by default > net: mvneta: reduce smp_processor_id() calling in mvneta_tx_done_gbe > > drivers/net/ethernet/marvell/mvneta.c | 49 ++++++++++++--------------- > 1 file changed, 22 insertions(+), 27 deletions(-) >