Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753448AbdLHMsY (ORCPT ); Fri, 8 Dec 2017 07:48:24 -0500 Received: from mail-co1nam03on0057.outbound.protection.outlook.com ([104.47.40.57]:18588 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752588AbdLHMsF (ORCPT ); Fri, 8 Dec 2017 07:48:05 -0500 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 0/6] staging: fsl-dpaa2/eth: Frame buffer optimizations Date: Fri, 8 Dec 2017 06:47:52 -0600 Message-ID: <20171208124758.2732-1-ruxandra.radulescu@nxp.com> X-Mailer: git-send-email 2.11.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131572108896943182;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(336005)(39380400002)(346002)(376002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(47776003)(77096006)(86362001)(8656006)(33646002)(6666003)(5660300001)(498600001)(54906003)(305945005)(81156014)(8936002)(16586007)(36756003)(81166006)(8676002)(68736007)(1076002)(50226002)(105606002)(106466001)(2906002)(97736004)(85426001)(2351001)(48376002)(50466002)(51416003)(104016004)(356003)(6916009)(4326008)(53936002)(316002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR03MB2361;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11OLC010;1:ieae+v9TjlVzHfP2xFhKIq+gtF9xKXdM+3UjpUxeIasX+wMR9XvvOokrFA44GFx8+pbhRVSK6fH0M/P2tngvpw8DNaGymH3lg8yQEGuHXYKt/bBtiNgxzJ/UQ5+IdPsE MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1a82a702-bf64-4134-bc4e-08d53e39ef9d X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307);SRVR:CY1PR03MB2361; X-Microsoft-Exchange-Diagnostics: 1;CY1PR03MB2361;3:l+z+tbA0LDuqmE++wtwdCm0CQ1oCWD3NTXpVVa1MNnbAxBpLRODxvLr3ulQ5zo0wTnVzx816ut3+iJj3dL//d/JaTOMyd9J6A/KxZteg1dEf3xOYSun/osJPQyM8SXgnQr9nL6NyHq2HVsYTCU/oU66AJ1FMSM5oK0yYa4RSFtPhqYodHgS9qE0N7VDpv1E5AisUMjDY5Y/lXpM5KSlXk8/9xeAuPpgUSJDYR0VNfhmvLm9QaeDq/B7pGCDwaqnCJqy/eWslf1XNiD1buDcyURlJZDtNvOkVf5DeiVTsWlN2S4D32zirAW8WvzlgXl+enIIwuZfkf4yEAV1SmR7s4FcSyPygKRtwFjAXLxn+UqQ=;25:3E45tjs9AU9mYvDOHcA0+ITenqCuS7G6CgIVYg2e+WDyiznsH+Ce9OV7aSBdaPDtDzBw2M1nDggNLpHUR3RJ8QEDySiLBTU3bqLzMw62w1VxHBD88CksjtGFYycOSH9i5hj36ZboN1fzoRb8MNsCldf8MpE8rSNc67bBK/eJOWRveEANf2HYHutB9BiZ0td17CQzmOAqf8koTwxa1hDx6lGf+4k85outZ7TrMGNuis3EiUEiWoLTIQ89vYVleJYARX+TEbHRMx8itBS7T1EXWSW+7LzuRfX0QV2e2iDVjlztaJcBDC5dWh1OBjhloqxGJ3MC57snIROAGR5LHr+8Uw== X-MS-TrafficTypeDiagnostic: CY1PR03MB2361: X-Microsoft-Exchange-Diagnostics: 1;CY1PR03MB2361;31:QQ+TIiJ/VyOfrcVj+CicHG87+uVbELzKCiY9N54LpSvPNYAvrhYnz2Hi/k46VKUZMjFIaM2SqopvDND2Y+NqqxwALYryfhGgoWXgz30oG78WdlAF/hlG5R0gQc91QYZeNgo3gJDOUcnakozHYAzPZiJma/BqEhDycfuVwWElaGpsLgWazRlyNru2oogSd0KAdMWowKl9TSBQtd/X1bY5HKplFl2VHH2IS42ShVwlNU8=;4:nVAAuuIMbmOYna2yS7128VzWi7lCTTU0RZmArwOovw+MNjtYCqGcfdIPy8g1ugFGxlmMJi21+MuSFHPyvlntjDU+/tT5no/d4Bw5jk3U4T6XGn8Mq9l0sVzsm9Ls0ZpsohUsy4nUV2GvyvwSPsmDT840YFsAdKDdOhLYL8UWHOvm078eQhG7fJ27z6O0W7cx3wIzMwrgmyQdGky2flBbVP0pNcgT07tDY7kazs9G78s0w5Li815+iOnIlAnHvph192IYdozdDAO/Rui8FG2vdA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231022)(10201501046)(6055026)(6096035)(20161123561025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123559100)(20161123565025)(20161123563025)(20161123556025)(201708071742011);SRVR:CY1PR03MB2361;BCL:0;PCL:0;RULEID:(100000803101)(100110400095)(400006);SRVR:CY1PR03MB2361; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR03MB2361;23:azzOc+JKQ95M1g0MtBAOM5MJHOu0qq8Iiagqc/3Tc?= =?us-ascii?Q?hHe58FLbF7G4J24OdDcqPNdxda3dtjkHblAIn9av9Rnr+5TuQPEqC9YWatDG?= =?us-ascii?Q?eALw8UL5AtqFLTgDHOmSlWN2MoG8zNnZsT2AfAaQuBp5+pbm3dMaZtzENWkV?= =?us-ascii?Q?n2i4cnsmNEqI2Y9hgbCst+7aEZ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SWpvnU=3D?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR03MB2361;6:/qAqPSlnhMJc07e/vKgKJFVdNznyMgxrpzVGhUejROtTbCPej+ZE9B6Krk9+O+vIVxc3W5dM75xJoNYOFUWAQ3W84/rlSZp3imHjzy1V1T1sNvQFzImz3sbvL8pvrw0Lq2IRMIDueTy+PsDTVaqC2gDM2y33kq8t/RwjN4ijiSAllEO8ehPf3kJ2dxTZXnXdmQdT2WxKMW8bgdTXd+iw0I2BIS+Ltg7mCAZsZLJ/P2AuJzO/jjt9cURBxh+opR2MRTv42ebrRBB5iseQkzZL9KBfzET4ODSv0CoDFJ/3GrZkmFEkkpD0hnAq+Me8D6Jxl3f4IcQKjo78tmhiHae7oeCYa6V8bPHKZFpF7sorEUQ=;5:h/zxhGe4cJlkyvSLMx1OWhaPqcvCuzjCVnRwFeCW8RRLO0Ba+K43FT1qsXuUwkkRRrE0ROqhSgoxIJ7wMv6FfrRoHCUjtat+uUrPHOCAmv0SczTSbvaw+mpRYryQNbH+OjRl9RIrJ4xEqxFTMV/i1QjX6jleVyHZemFeGSbnczM=;24:gEggSVyTT30rTIUU5bfc6Mfey2jkhYbr8J25U0/i18SAUfE8THEKPatZItmGhHMqafElBMoHrqppLOr7E11C/sYEcGW1305p90/MJ300RUk=;7:hR+3SnDFpF2U9OrjtRxv4uoinS/daFBsOxuvNntxhnuQvK3CGJBauJLFSy9Gj7ZjnZvOx2VQzjgZNboMQOM3B/1pGhSrNU+7DBiycJTHUrLWZ1PQWimAKtwlSDbJkhyc6lLxF6NF1VAALUbyhOUs2jXMzWGMe+M7MYWKnBJ3wD5VodzD64ujDGAuYHX6uW8iXcvUeUWHwBBfeGStNBtpqQ8oimGI61FuTzxPA6uzg+sJTsW1/0j6WVn5bXR++cYz SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 12:48:07.7755 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1a82a702-bf64-4134-bc4e-08d53e39ef9d 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: CY1PR03MB2361 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1717 Lines: 38 This patchset continues the work related to frame buffer layout. The first two patches fix an issue and simplify some rather convoluted formulas introduced by a previous commit. The third adds a new counter for TX skb reallocations due to insufficient headroom. This helped us notice that most of the frames originated on the core had skbs with too little headroom, leading to additional alloc/free operations and a performance penalty for egress termination traffic. A closer look at hardware requirements vs recommandations showed that we don't in fact need to be so strict with our TX buffer layout. The last three patches in this set remove all restrictions that are not mandatory from a functional standpoint, lowering the required TX headroom from 192B to 64B. This helps avoid realloc's for most TCP frames. On a LS2088A board with one core @2GHz, running a netperf TCP_SENDFILE test (as client), we see an increase in throughput from 3.79Gbps to 5.11Gbps. For UDP traffic no improvement is observed, since the stack usually creates skbs with minimal headroom (2B) for UDP frames. Ioana Radulescu (6): staging: fsl-dpaa2/eth: Fix access to FAS field staging: fsl-dpaa2/eth: Don't set netdev->needed_headroom staging: fsl-dpaa2/eth: Add counter for skb reallocs staging: fsl-dpaa2/eth: Don't enable FAS on Tx staging: fsl-dpaa2/eth: Compute needed headroom per frame staging: fsl-dpaa2/eth: Make Tx buffer alignment optional drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 111 +++++---------------- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 31 +++--- drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c | 1 + 3 files changed, 46 insertions(+), 97 deletions(-) -- 2.7.4