From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7B5054293E; Fri, 14 Apr 2023 11:27:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 505E440144; Fri, 14 Apr 2023 11:27:18 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id F4201400D5 for ; Fri, 14 Apr 2023 11:27:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681464436; x=1713000436; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=t8UO2vqbJLyQMrswK3XPNcloILSweeVcFA0TEm5KcsY=; b=ixUEm0ZYMZ8ZZvxrc0+BFefp33TpJMws82vrRZpH++wci2sPEMrxhzvJ NDMws4MY0QiopBv8fhQasi0tB0F4FSggsSZVhTLufn5f6NvMCqhoQTWAO XC02xdKUHRcBpmNfbQP7fUE/ZpiZ7ETGuciLpNyNE8dHyS9y1CKbYlKJS xrxw5c+L5LM54jOBTEtR+Bid4IqLJPaPCOYJgGZdIvSLBSwtNHvzGVGdv eLbIyBajkZYE5Q8dPIryXn6H0nehciJliqDeR6NOC0LU9AXxnKPgU55FC TClkPzF3ZxazRn3kK3qsJYTKeGcXwSoqpLcr61lQlTt8B/h2Y3AP8KDAl w==; X-IronPort-AV: E=McAfee;i="6600,9927,10679"; a="343183888" X-IronPort-AV: E=Sophos;i="5.99,195,1677571200"; d="scan'208";a="343183888" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2023 02:27:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10679"; a="801131177" X-IronPort-AV: E=Sophos;i="5.99,195,1677571200"; d="scan'208";a="801131177" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga002.fm.intel.com with ESMTP; 14 Apr 2023 02:27:06 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 14 Apr 2023 02:27:06 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Fri, 14 Apr 2023 02:27:06 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Fri, 14 Apr 2023 02:26:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BVpFMEvtfMzLFQ7j4Ivfox86pnlrkefUb9j9rj5OLHhxoT3OgOCDJHPPsYRgPdiMYTCcvk8/zYFzetcg08+s9x5q5E4ynj7KfyCgsfbTz7JvBc0vUB1Hcl8DxcXekCzvH5M9ZGC/+g6g9yi7eAbwAmqw0AGYQ4HcSnaIkE9fuCmNwGdUmrjE5kq7BZUEOU2kE8RyEMU8yhELZ+O6a/jPmPOqWU7/V9IqDgK1Xtc8WXc6thNzArmJOQp7vu3g7kckQm5Tbaw/4UJWaddDU9JDYyTfJAuAIl4WPVYZ1Qmq45v/eaww1qVEKzjaFrkVAnnF73qIMnCnz6j4i0za/3hlnw== 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=wB/SYqQAAI/a+nFeCAz5w9Vhuxdm102mH1fSfy7q92g=; b=OCmsL2i1+csxPo+Ja5+RGqFoQwWJiFOlYlEq/kuHFobdMzjeSRUoo1dtqu6vc9BGkUgY0/4JLtLDxJMd/2ZPdlMz92TxWm3Sq984K/oYx/lR6K6EjUjLI7rvwl0qH4hJyUeQ+GcKCIYhp88OKfjwTgBHn3rOldbj09LXzzp2wp9U9Qusa+fDOqIYKMwQqqYNPc/xFdWJy7MtzXJTkF9fGUK6OXDjP2xKCplA2EpAXCsZ4kXBCyLdQwF2FmoMPL7sDA6qdVhEtN0VZRwLYW+m4yvmHq2BOCfL33ikoricPCZK2yJBBrF/OrK2C/SN6uBTJyHjP6vtY7j3eP6vEsm2zQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by BL1PR11MB5543.namprd11.prod.outlook.com (2603:10b6:208:317::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30; Fri, 14 Apr 2023 09:26:33 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::695b:260c:f397:2b69]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::695b:260c:f397:2b69%4]) with mapi id 15.20.6298.030; Fri, 14 Apr 2023 09:26:33 +0000 Date: Fri, 14 Apr 2023 10:26:26 +0100 From: Bruce Richardson To: Volodymyr Fialko CC: , Reshma Pattan , , Subject: Re: [PATCH] reorder: improve buffer structure layout Message-ID: References: <20230414084344.271602-1-vfialko@marvell.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230414084344.271602-1-vfialko@marvell.com> X-ClientProxiedBy: LO4P123CA0650.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:296::20) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|BL1PR11MB5543:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b411c10-65ab-480c-2afc-08db3cca55ea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9G4GIKA3D5IVXwYeKF6X7ooIkUgoyLBJbrPD6nng32LyxQRFnCLYI2Al1XEqo91Es8yBqU7f6wOqxhW4PByZd22WyyPadu1HNrabQf8XewQdhhQ3o05HkIzL+k74qVfiCZHLjRxCkdIbNJSnJru0z2PQDRC/GGxg3KaRkR5EXiPalP3BfGFKMb+vrIY0dkzjYNPx2fR8JnEg53pWsoTWKGwLx6d2nbzAb63CL5+vptFFHqOF+NTVHw+dfCAbZAUqqYX/rUQ2ujGnapnKZLkDH5uSu3qayYDnPGR0EBfuzbWZFbuiElzRYkO/x9mJuq/0cjXG0qBeP2RPu3Q3Q6D5NRfPcSvTHPTn8s4qR++44dA3me263G7By13O++YHkoLKIGRrH6dfgYQ9lGyYjPmGTqhiefLLfBPjEzSu7J2mtNOcmeMpIfzulNv0CSJW3kl5cjrO+23DRmZQBBmy74XDvyf2izU7ehqpGPIAkyfgHnjSe5yA4vQbFK2XVJPktjf+oYNfk1yQ16cZtgRsINia0QpfJW44gr1l4Du6ABQPZhPpgRqhidxt/gELoEbyvHBx X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(366004)(376002)(136003)(396003)(346002)(39860400002)(451199021)(66556008)(6916009)(316002)(4326008)(83380400001)(66946007)(6486002)(66476007)(478600001)(8676002)(8936002)(82960400001)(41300700001)(38100700002)(6666004)(44832011)(5660300002)(2906002)(6506007)(26005)(186003)(6512007)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?E3hnrd0TYNtgG0ZTBEbinxcYRM2ImOPNqb+9SHKrxQ0y0lg1rABqBxaEoQ8v?= =?us-ascii?Q?bRE2LzNu0ICsScvVnXtstl2h5jgNr8JIQVbUjSmJB6Q0EHl3gOtRW8yNIDeE?= =?us-ascii?Q?FqyT8EQB/ObHdBrjRcnx3K5OmMn5BcjbWOk+8g7ZBAN0/rDT0CNLT7YieNKT?= =?us-ascii?Q?QBDtVwRNkwlXqWq9Lr9i6Ufvnpy3LrFF4cKJq8W0uli8qFwByjuY6rvsXj8a?= =?us-ascii?Q?pfAaZqeBEz/Xn+/A/MOWIX7xOFH+tYl6FQb+b3pl3XJP6RyAWU5Y4pMNNXpL?= =?us-ascii?Q?vB6zA68gXjV0u72OItzC85XAuZl783cV2xr3VjqMccWNEmpMnB2QAMfOg9Aq?= =?us-ascii?Q?+8faBs9jODBGWtOmQBIOBq07WHaEELvMNE4N0jPZhjbGz9spfFy9dKcgBQqP?= =?us-ascii?Q?BBkPXGqcXYS7IgD703urGqMkY3wrzeSTB2SsolHTPyHNneUJkmTI29NYVKaj?= =?us-ascii?Q?AavhN+3QqXcUdFPeAM0jcSs9Z5rsUZLcfDJOTRypL9L9gqvb6Qh3/5fL85TS?= =?us-ascii?Q?0obW049+ggpoMoW3DqkwG0Hc3ptDfmIEezAtUNHF4qXU2/lo9nf6Vmh+m1oS?= =?us-ascii?Q?pnfaMcfhCDnpXLejTYBRdANBsHyUJVLSBjX/5OHFLYg6N+IwvzQFFcfo0sER?= =?us-ascii?Q?2r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SUH4?= =?us-ascii?Q?KedtD/XtRH1uXBjHnqy9XSWde05pLD9YD3p9u4+0JFshWDuecP6hyngpwHMJ?= =?us-ascii?Q?lw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 7b411c10-65ab-480c-2afc-08db3cca55ea X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2023 09:26:32.7900 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Zl6691suxob0fG8Bwlu1HndKpj3PF7Cs8v9OFforutHrTz4o/SN6YLIvY1lJrXuWjAjexY+jXoxIjuJ8hjQJg/L5Up+E+rZo0sARH1laa+Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5543 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, Apr 14, 2023 at 10:43:43AM +0200, Volodymyr Fialko wrote: > Rearrange the reorder buffer structure to prevent padding to extra one > cache line. > > Current layout: > struct rte_reorder_buffer { > char name[RTE_REORDER_NAMESIZE]; > uint32_t min_seqn; > unsigned int memsize; > // -> padding to cache align (cir_buffer is also cache aligned) > struct cir_buffer ready_buf; > struct cir_buffer order_buf; > int is_initialized; > // -> padding to cache align, eat whole line > }; > > New layout: > struct rte_reorder_buffer { > char name[RTE_REORDER_NAMESIZE]; > uint32_t min_seqn; > unsigned int memsize; > int is_initialized; > // -> padding to cache align (cir_buffer is also cache aligned) > struct cir_buffer ready_buf; > struct cir_buffer order_buf; > // -> no padding > }; > > Signed-off-by: Volodymyr Fialko > --- Acked-by: Bruce Richardson > lib/reorder/rte_reorder.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/reorder/rte_reorder.c b/lib/reorder/rte_reorder.c > index f55f383700..7418202b04 100644 > --- a/lib/reorder/rte_reorder.c > +++ b/lib/reorder/rte_reorder.c > @@ -46,9 +46,10 @@ struct rte_reorder_buffer { > char name[RTE_REORDER_NAMESIZE]; > uint32_t min_seqn; /**< Lowest seq. number that can be in the buffer */ > unsigned int memsize; /**< memory area size of reorder buffer */ > + int is_initialized; /**< flag indicates that buffer was initialized */ > + Since we are moving it, it might be an opportunity to change it from "int" to "bool". > struct cir_buffer ready_buf; /**< temp buffer for dequeued entries */ > struct cir_buffer order_buf; /**< buffer used to reorder entries */ > - int is_initialized; > } __rte_cache_aligned; > > static void > -- > 2.34.1 >