From patchwork Tue Feb 2 17:34:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Camelia Alexandra Groza X-Patchwork-Id: 12062419 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 065B5C433DB for ; Tue, 2 Feb 2021 17:38:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B707664F6D for ; Tue, 2 Feb 2021 17:38:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237565AbhBBRhw (ORCPT ); Tue, 2 Feb 2021 12:37:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237511AbhBBRf5 (ORCPT ); Tue, 2 Feb 2021 12:35:57 -0500 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on0600.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::600]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71B33C061573 for ; Tue, 2 Feb 2021 09:35:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nnXaRCHOJ+4XvqhyZGXZP80w/lHi715hXZ0tsV5bAsf4AJdta2T4bVAe53CcS0tIBVStT/aMy1PP/pPJ3rpPqYHW2C+uk5RV8GJ+P02fO/cChQ1mf9GFJHi1IAmdalIbRm/OQJsk/bZX5fDjra91Hud6DYIkbGs7yglNYYTMUbljWqTWpwgNZgbtEJtoZZKmUB1E4cfPweu/yRL2o8uigP2Ih8RZkE8gblNm7s139l4lIK0AcjTJwAXkzVU320bWJ7mEUzoUXBayvXe/mtLyq9p4gqz3L3SqWsfIHKpG7SG4hV6Z5WS4ZnMDQvnWPfl21tC+yKvqb2Va1XmbGo/3pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CY0NqXbBwJ5V32XwipRzTin+6NJw4wtGJPdU7yHYk8w=; b=DiB2hkHlklu/4P6VZdzYZ9ylCA2QUadHD1KOwJGAzJDrOiq1sOZNMdNrwudM1xnu4+eyGtUCpE7dsSrTtIuT23ZSaxLKxp4T4PcAtRQNLZOhpNJzl2/OAeZdthtRTa8TGkcyjiFxhqETyK2JzGxBixLfgsHeVw08NHl+caOoRyoDHp/h9XhulwQcWFR1Soq0+OZXDJvmW326aIOS9UUK8FZrmwnHpYwIBoMMZGTRmrdA/YpCBIkbNXq7N9PwM7o7NawXPvBnMqGogy+uimPlqjhq1FBoBPDV8vQYMC/ZfwM9YKKzJEFxDVmaqCpMzQ2vh4T31jJwriaahR3PutE4cg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CY0NqXbBwJ5V32XwipRzTin+6NJw4wtGJPdU7yHYk8w=; b=bQ3lozj7ACHH4+SW0u+VaoKqd+RtZ4lPdoUfBsM9W7S5jwsCkt4tETRJ4oIEtCQTr+BpsOxUx4dHaLCRmgJzMKkfIutCFiuFdf3QU+QeMfDs1AyDl0wYRLfkCrey6pr2pYPGp5DpTlZGGQdIl+gnMQy89sS8mgt2QndeFspFCuY= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5807.eurprd04.prod.outlook.com (2603:10a6:803:ec::21) by VE1PR04MB6462.eurprd04.prod.outlook.com (2603:10a6:803:11c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16; Tue, 2 Feb 2021 17:35:21 +0000 Received: from VI1PR04MB5807.eurprd04.prod.outlook.com ([fe80::6ccd:7fa9:bada:4]) by VI1PR04MB5807.eurprd04.prod.outlook.com ([fe80::6ccd:7fa9:bada:4%7]) with mapi id 15.20.3805.027; Tue, 2 Feb 2021 17:35:20 +0000 From: Camelia Groza To: kuba@kernel.org, davem@davemloft.net, maciej.fijalkowski@intel.com Cc: madalin.bucur@oss.nxp.com, netdev@vger.kernel.org, Camelia Groza Subject: [PATCH net 0/3] dpaa_eth: A050385 erratum workaround fixes under XDP Date: Tue, 2 Feb 2021 19:34:41 +0200 Message-Id: X-Mailer: git-send-email 2.17.1 X-Originating-IP: [83.217.231.2] X-ClientProxiedBy: AM3PR07CA0093.eurprd07.prod.outlook.com (2603:10a6:207:6::27) To VI1PR04MB5807.eurprd04.prod.outlook.com (2603:10a6:803:ec::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv15136.swis.ro-buh01.nxp.com (83.217.231.2) by AM3PR07CA0093.eurprd07.prod.outlook.com (2603:10a6:207:6::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.8 via Frontend Transport; Tue, 2 Feb 2021 17:35:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9111b510-d5e8-4169-eaa1-08d8c7a0e9d4 X-MS-TrafficTypeDiagnostic: VE1PR04MB6462: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SRj+oZfV9y8WBkrgDzd//Y0RVoTDgf59roAr3rk4gUq1WuVap5mclko67d9Y6SpyV9mKL5Fzjqiut2NDx4bjgo5wWOy4x1ZBaIi3iTTOq1taNgjwfi9iNLgO7b3fpi36TXZI/OmclrzF9nydn5thRYPxKTZPTNQdxGiJjz0DMmp+vGGKBhEmRhtNLrMqhn8gDjL0GD/U0x2jB61PNU4wj7qHQGx4njtWgnjJ0T0euK7e8V19ZRD5M4Naj1GxTdorTyjTT/gRHYzSv/UeUjddJZXf9SzY+Y1V7UqY6I0oS5N5cOj+1nkeYiluIHm5dnpPkNtObU16ZJVVTxGdVAP4vN/bI6B2ZhiKoMI1cyIdHIpoW8RWvsg/DxXPn7ilF5OPB3X71vNS/VgGSS5MFXk9sEUaoMaXlNFhQbel/RMu6NMyoCmcSaBhiGKnsLsYfqIyuv2DxvGESc4X2tnXtnoRfspmLTFVtD6Fg250hRh9qyVrwQYh+q430lgqlYa4FUFOKALmAA9Atkn0Hy4iHWaIbQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5807.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(136003)(396003)(376002)(346002)(39860400002)(5660300002)(4744005)(26005)(6486002)(52116002)(86362001)(186003)(44832011)(316002)(36756003)(478600001)(8936002)(16526019)(8676002)(66946007)(2906002)(956004)(6666004)(2616005)(83380400001)(7696005)(4326008)(66476007)(66556008);DIR:OUT;SFP:1101; X-MS-Exch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LiuENnb/YGyViQZ5zpO8ey0pOTLOb3x+MJDOV4K74rXqznSsdltQ6TsefU7JyVea8OhhY7jA+Ck9W9h34HHDGMd3+NdgfhCBrTcGCNP8LO4luQpZXDKsqihyzjAN9axaGFNzkggbEqiVv4xov22AY5082axgugKjlYB1tOmdiQBL159xkjvum3ri2OhAKDB/6u2/Ywuf4LhLP/K6eeZG/2imYlwEXn4Sp2UyNIRoCcAkEUCRYp9PycgsciJXXz59Pncz1cRF6GgpBFhsqSOmMtYsNrUr/lVcT X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9111b510-d5e8-4169-eaa1-08d8c7a0e9d4 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5807.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2021 17:35:20.7623 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jUtuAtqyZ4woiWYc504oKz9Wp+d8gVaYqCX7iNf7mhPuJCkgiKZBtA36uFYMVk+IosQY+uqXHemllR3M9KVHew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6462 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This series addresses issue with the current workaround for the A050385 erratum in XDP scenarios. The first patch makes sure the xdp_frame structure stored at the start of new buffers isn't overwritten. The second patch decreases the required data alignment value, thus preventing unnecessary realignments. The third patch moves the data in place to align it, instead of allocating a new buffer for each frame that breaks the alignment rules, thus bringing an up to 40% performance increase. With this change, the impact of the erratum workaround is reduced in many cases to a single digit decrease, and to lower double digits in single flow scenarios. Camelia Groza (3): dpaa_eth: reserve space for the xdp_frame under the A050385 erratum dpaa_eth: reduce data alignment requirements for the A050385 erratum dpaa_eth: try to move the data in place for the A050385 erratum .../net/ethernet/freescale/dpaa/dpaa_eth.c | 39 +++++++++++++++++-- 1 file changed, 35 insertions(+), 4 deletions(-) --- 2.17.1