From patchwork Mon Feb 6 10:08:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 53125 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2150857wrn; Mon, 6 Feb 2023 02:10:43 -0800 (PST) X-Google-Smtp-Source: AK7set+61SIM9RqvHEy3I1qYlKoPDcj3BPahQRAGfVkyd2RTHY3EuZwpPXmC3+dNnR/av4CrSnWm X-Received: by 2002:a17:907:2d0d:b0:88e:d435:3fd6 with SMTP id gs13-20020a1709072d0d00b0088ed4353fd6mr19415160ejc.63.1675678242812; Mon, 06 Feb 2023 02:10:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1675678242; cv=pass; d=google.com; s=arc-20160816; b=ZZoR51GcYc8Ry+YFb8VeBxTCGyXED4chPI8EXPTLM8GNs7xK88HrwmhIaV3X2/PnjH y/LFooNjDjKwxZjMyEomqTvlFbKt0gDUnBfNVPpsFcndcx6BtRwXO6M8VJrc81FbKBe4 ieygfvB0Oax+z8bvTjepBmIOZofYeJI/io6wOYBclxKtzlxGo7hPwBBVMWwamXM4BPBy XXT1hxJOeXScfIqLw9E8iNoRyfgvpJRxnn4dgUFip2TY/hNnYbygI7H27GqVWfVdpq9q 58wyclT9JsVIO1uAV55oes/60gw2SzFF20UA0ygsXS6ReItRsBO/x6IBwzFne1PleiVs vXDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lPq59rGGC+c3Ifsws733MDs1xtBkSxK0aDJ8bvKbcG0=; b=EYPk7Ud2UAhs8XQd2iu2oL7HORl5p4+cMfaCkGRu2lt4QVzm69jaLtaYhqJLELf4ac nw2/oaqL5ajgM6AoFRYrvbMmutZz2LT8p2HXJqKgNILGwKymxfEin4T85VAGCH2mn1Zt OYacBdnkZsQQV+EVy8CWQ8P3CkO8O0xWUhzdFqwOfyoyAm5LsEUp1otynQChkgQWCnAK NwjJZPIQ05x+WK2Bc5kn23bsX59LotSHQZ28fW4wDVNfgFOTtP/Y7SeEokpHFPB8pYLP 0x0D0ccCQOV8XmzAUwmfFjjrMrfSi7SavJRwywZi8qHhucWxZOT+k36rNnMb66j3ks0F j2jQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=TO2WAdJd; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e6-20020a17090658c600b0080f0493b9c8si17753013ejs.536.2023.02.06.02.10.19; Mon, 06 Feb 2023 02:10:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=TO2WAdJd; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229755AbjBFKJI (ORCPT + 99 others); Mon, 6 Feb 2023 05:09:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbjBFKJD (ORCPT ); Mon, 6 Feb 2023 05:09:03 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2073.outbound.protection.outlook.com [40.107.21.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CC101043F; Mon, 6 Feb 2023 02:09:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n153ZOIKmtn4mnxsonP9uvBhq65N1P63PfPPUW9cn17Nud+SOxQLuotz9OBVb+0j6awtXlZ6X199WDVcNYi4M9PpYKoRicGCJlE1VYUzmWoX6YUFCHig2eeqHfN5WnTBISvmwjpWebEaSrNRx22U8bmjdk+L0jzRBKlvbtvvTFhvsflleCz0WUXnBx+H8D5BeRYIohLhMICMLzm6QlU0O1FzDC+nfoJ8OddHSAsfp3RNdPDnGlvH1ZhiWB7rz5xqg6FXWxsuJAW5engvop4BWRDC8NvU0Wr97yiuFZdDIdGO3PYsUfTo9zaJTzNt86bR3pITTwCxnWEZZ0nlGuzl8A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lPq59rGGC+c3Ifsws733MDs1xtBkSxK0aDJ8bvKbcG0=; b=ObFcwBaxciJNPCDaPlhSd9JK399XqWuO17/Xe0/cLqji8OiE5tNTcRLzac3e2AhQy7FT8Hc4bCujHvIsOhiyvF6NS+DhKNznk/6UhDdat51pD4l3f/QQn30vHACrtyBK9Ittm3YDh0dBIgiXS7rL6d1405GA8lWhBjpZnN1KGftiLc7X6tIPXdEVGpPbZz28Q+Fnn3TK3d/t58z93qbGoi1c2SnOxfS1FqxZOgMRW7v9wSn0TJXQ63KyX4VZj4CHjQQvaICcOlAS+IIbbXTqxz8CL1ly3xNkOeEqr06Jc2wmq6A5/DJtAD/oL7pN0oI2pX7npkZ9MWFCD5UuQgc9Bg== 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=lPq59rGGC+c3Ifsws733MDs1xtBkSxK0aDJ8bvKbcG0=; b=TO2WAdJd75gDT0UHjskI/cpW8hz1Uw3UWXJVAlYMqp4V2d7gFwJQWmTrpZ3AjxS3UmQlKpWQxp9TOsFgXkXFzlC8ULzDVASTUPq8aRvFFTAuhdkpUuunSXKGoVxYbP+0YmXxSbt8DqchnHzfmBMcNmXaxumjca1tVKI52Ta7lG4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by AM9PR04MB8421.eurprd04.prod.outlook.com (2603:10a6:20b:3ee::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Mon, 6 Feb 2023 10:08:59 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b%5]) with mapi id 15.20.6064.034; Mon, 6 Feb 2023 10:08:59 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Magnus Karlsson , Maciej Fijalkowski , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH net-next 01/11] net: enetc: optimize struct enetc_rx_swbd layout Date: Mon, 6 Feb 2023 12:08:27 +0200 Message-Id: <20230206100837.451300-2-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230206100837.451300-1-vladimir.oltean@nxp.com> References: <20230206100837.451300-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: AS4PR10CA0019.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:5d8::19) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|AM9PR04MB8421:EE_ X-MS-Office365-Filtering-Correlation-Id: 7262d67a-d98c-4aee-c057-08db082a29d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: crxutald9Bwaaw8J4DP0wPY1yxMBZF+k2UySCeFu83uW83hCWxGgC5/5/IqHAj10pmv8iLcWQwvXSrDEBuvYzB5Gt10aEQtk/pFU8NJIGAnGHL4fgVrZWqsr8dFrEhOAnes9Q7UlkcqlFoy4iaPB7mpS0GLTIGWRwOZVLcHC21+CJJwH9z93Hx5TatZQDlK7Enn51Rva9L8ku5I+qg906PEh6VqM80/8cT8V7yYj5PLsylZWrmUe4rpGDojtuR7y1zm5R5gevC5qbyYWJxrhp1gvIZunAiq1FK2VeZFLGeM4G57lyAUB2LyW8YsYKReEcojTuhey81aAinDJ/EuLq4QWPiSnY630i/Npc9ZUbseCEtgD0ySHTTqMM3nOpwcTfEKow+2SFi5vJSOxJtnYHGK/NoCe+Gr4LQg7tKr5+020eUp1EGLW2PdEHlfS1bgxOthGyMeiA/LTtqAdPWjdKyLzjFi9tttlB8IBYqYWqQ7md9/6znbfg/DeM7QJtZp2smTFCxBMXl1gfxc/QIb0Ffnig7aOWujB39tIMzPpCefSbYN2c6UdaPdAlAS/mTYPoT+gFy5GN5lURHt1/jtRy07y4WWLU3o8QXX05HTxIRdXaV2zQN6ztyyxD2CKRhWAUvi4eK2J8Oq2YPE3egtuhrbUFHIYL8cVTcRTJoRYlrTN4g0qZFbsPjdtoRghPFMNa33L3WhuF2DHRF0Pn9b/x+KmI0X/c9TKM+3Zp1XjQYg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(376002)(136003)(39860400002)(366004)(346002)(396003)(451199018)(86362001)(2906002)(36756003)(8676002)(66556008)(83380400001)(52116002)(1076003)(6512007)(6506007)(186003)(26005)(6666004)(2616005)(5660300002)(6486002)(8936002)(38100700002)(7416002)(38350700002)(41300700001)(478600001)(44832011)(54906003)(6916009)(66476007)(66946007)(4326008)(316002)(21314003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: sZ/N7eaAcxFxcDocd85xFPpMLiDqGBrCL3RAf/6KRG4l76o0Rz+YfyqOFHIwoqHyEOzrCC+VRCx73A7BeI65QiBBJ36phU8ZfRVQso9+LaKQnxstz3jbfESVua8gpZMIx0nlU0RQzuehzgkNQxcxgnzfWk9XAdE413mN3HCc1xv9CaLlgnEx1SYTnjdgjah0RjGlRtCctQTeo0nS2VbJf6VcG50pKdsZGNLK8AHvLhmlZsLKvr659kWocAfcOYGFar4PpfLw5fCSkQHD8zshRWakBjEkth+QiZllIPR+XGybiHpatkBTuIPF57b7alFzshf9IPBAh0qye0NoPZkE/ZdxlKEYhi5U/jTS6a5xMF4kNLHtKNUPve1ChAhoGoFQ05M2AaR8jtSlk3EZQZV4RJSk2wcdnPk9BF3+qL1OpvwJZd6iS55KZz5k8H/CjGSQnXQZ6m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TxZMj3wJ7DY2cgktAcDnMefJLlqRKQQCVVIz388qzU0fGeVxkh//VID/f1S8DiRGI7PJRMUqlA9QMPwMRoTvjuf4oCYn6R3xlNarF3m/zFZDYZSQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7262d67a-d98c-4aee-c057-08db082a29d8 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2023 10:08:58.9276 (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: gPg8DqD8JMLb0Nyrci37s6UUX/A62B2uiOBpfrVf3XKPaOzDa9qFY0WLf4ZyIMXdIsFKriO80KyxkQAe0LN8/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8421 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757075988905074405?= X-GMAIL-MSGID: =?utf-8?q?1757075988905074405?= Eliminate a 4 byte hole on arm64, to be able to introduce a new member to this structure in a future patch without increasing the overall structure size. Before: struct enetc_rx_swbd { struct page * page; /* 0 8 */ enum dma_data_direction dir; /* 8 4 */ /* XXX 4 bytes hole, try to pack */ dma_addr_t dma; /* 16 8 */ u16 page_offset; /* 24 2 */ u16 len; /* 26 2 */ /* size: 32, cachelines: 1, members: 5 */ /* sum members: 24, holes: 1, sum holes: 4 */ /* padding: 4 */ /* last cacheline: 32 bytes */ }; After: struct enetc_rx_swbd { struct page * page; /* 0 8 */ dma_addr_t dma; /* 8 8 */ enum dma_data_direction dir; /* 16 4 */ u16 page_offset; /* 20 2 */ u16 len; /* 22 2 */ /* size: 24, cachelines: 1, members: 5 */ /* last cacheline: 24 bytes */ }; Signed-off-by: Vladimir Oltean --- drivers/net/ethernet/freescale/enetc/enetc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/enetc/enetc.h b/drivers/net/ethernet/freescale/enetc/enetc.h index e21d096c5a90..704aa1f9dfa3 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc.h +++ b/drivers/net/ethernet/freescale/enetc/enetc.h @@ -48,10 +48,10 @@ struct enetc_tx_swbd { (SKB_WITH_OVERHEAD(ENETC_RXB_TRUESIZE) - XDP_PACKET_HEADROOM) struct enetc_rx_swbd { - dma_addr_t dma; struct page *page; - u16 page_offset; + dma_addr_t dma; enum dma_data_direction dir; + u16 page_offset; u16 len; };