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 8691A426CF; Fri, 6 Oct 2023 12:17:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 745CD4069F; Fri, 6 Oct 2023 12:17:01 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 278714069D for ; Fri, 6 Oct 2023 12:16:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696587419; x=1728123419; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=jASpj2Pb0Xt2/WtIwkMbObJDaSIxXdhHfHagQpeNsQI=; b=h71rwGTLJgtRwgMEPdUzjpj+SGjYYGDYks5+ZG4XvlYh7rhpRKUO7X0D WiVLETw55tLYym0wNNTX1OkQEAt3geFVaq15PKCPp5bPyGu+CyQ2fxm4E RmKckw/p042GW+EMeLPYCFJ6SL0bY2ZBxtbb1aADL+djeow0vNi913Xtx eo2R2d2xCs/pAqIvsm3MaMFxlm798ge1sgC+AKpuCCvsJdkhfsHrLhogb ndTt1JSWFZy/ee86i8b5jy9KgdaZG6RYOvs6cZvDQ4lvN8g7BrNQvs//g Th66VG/5tAhithhWJLalxehefDe1pgH88Vk4ZNAaNNS9Y+US/raODqxoJ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10854"; a="364001153" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="364001153" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 03:16:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10854"; a="817959966" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="817959966" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga008.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Oct 2023 03:16:57 -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.32; Fri, 6 Oct 2023 03:16:57 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.32 via Frontend Transport; Fri, 6 Oct 2023 03:16:57 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.40) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Fri, 6 Oct 2023 03:16:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H/J4nUPdyMLjfWaxSdm7P0EwaTe7JIF940FDhh98XN2gbSN0kAGoQP0F5OYiEZEURwnXAuDUwg4X41rPSqpwRXi4AWxWPMi4Q9bgqdYY+MZyL+AM3aBawOpv/46aAjSxekOfTgOqaKuvRSbpoolkXqJx8Xi3phQCGGSCNDd2y7RPWwz0+kqdcKkwd/DOXhui2rJquLl4gXaGMQ1OiaQKF8+uaxI0scZDVr6KdM+qJUAqP76rwB6zXBh127jc750ZgkyVSr77egeDkEgGLFozwSAb9S/B/Aa33n8eotGt/GP/CnAWnQipiU0PC/q62XcJ6ECbiistgbS1kj3tMTZAiw== 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=Scidpj2k6UP+PNIkclDFFNGFLHbZujCC2L/5xF9vYSE=; b=lS0ZO5vla+jqEM2tU4r2mp3xNLT9PQT0CJx3gJAQMNcS9XX5WGRyb61hSf1A1afripRsdVxglyfZCK6h1+c5byVWCupc0AinmSUOEgsX2FYy3dMlEFuVXvMzz7WPeJjE49yg/IM54OXYUOZDHBPoX3uYRfRQaM4x8dzIiR5vy00FKJhe+ujuxnIjUSQ3SGIZj993UBCGtynXgl8Tg3nd319RvPPaIVshEfE2VF5+Sesg61Yl0Nn9MPoVkI+jFbc7ik4E9NIr592FiyH3QXpbvQkQqHpoxou+OjJf3vJUkj4SsIKHQRnzVEjoV7L5VsSa3W8Ucp4c7p8rfjnBNhsxaQ== 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 PH0PR11MB4999.namprd11.prod.outlook.com (2603:10b6:510:37::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.29; Fri, 6 Oct 2023 10:16:47 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aa85:ead1:baa8:c652]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aa85:ead1:baa8:c652%2]) with mapi id 15.20.6838.024; Fri, 6 Oct 2023 10:16:47 +0000 Date: Fri, 6 Oct 2023 11:16:40 +0100 From: Bruce Richardson To: Morten =?iso-8859-1?Q?Br=F8rup?= CC: , Jerin Jacob Subject: Re: [PATCH v3] eventdev: ensure 16-byte alignment for events Message-ID: References: <20231005115101.12276-1-bruce.richardson@intel.com> <20231006094527.73867-1-bruce.richardson@intel.com> <98CBD80474FA8B44BF855DF32C47DC35E9EF03@smartserver.smartshare.dk> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9EF03@smartserver.smartshare.dk> X-ClientProxiedBy: DB8PR09CA0009.eurprd09.prod.outlook.com (2603:10a6:10:a0::22) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH0PR11MB4999:EE_ X-MS-Office365-Filtering-Correlation-Id: 8f2b79c8-0373-4c81-bd95-08dbc65558ce X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a856XiQjm+KeGGpY+46YOpHZrA8vF2in1UI3hNuhUB67f49OvYQ8SnqnkB9v7Hb2uPFa+fQiHNchfIwA2wW/28B7dC71EfEdzl0JUaiiCSQhYcWi3slff3z4O9tNJV15g0Ntg+3WTd2TycrQMxOkQG0/Gm9UvrsfTc3HZ6tRnao6PFxqGcYuP5qWlBMialIP8e2r6v6Yq2fsbgfXyExP8Tizapxfe7aU7CEb5ZoO1C/HtdMoNxvQODfGW2nn8cRWSA5FWboWatLzFBdY1hq1X55fPMMIHXKHZWogAhdExDHtWXXkPJzzSODl6WZA+08tiwR6pEM9mH6ngBs0G6OSOKjsbCMdkLL8+NkZdn3s7/uWoL2nC2mNE0cio8NBoFiMBEWfytp6eqMSODTDczpePOSRoF1PN5jSjQH73s1qnsaEKE7hF9GC5ThiivQA+f34YSttkuIhuaWaT0CB+Ki6VCull+NLMy+cAQB9tesLjJDgpo7VBQI/M3v0rGHvwk8Nup44/N+XHmPTcKthHnP9uABWKNV3F7seUIGjAo4Ytqe28XH0oimstPDOhgpCniPF 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:(13230031)(39860400002)(136003)(346002)(366004)(376002)(396003)(230922051799003)(64100799003)(1800799009)(186009)(451199024)(66574015)(83380400001)(26005)(6512007)(6486002)(82960400001)(6506007)(38100700002)(478600001)(6666004)(8676002)(8936002)(66476007)(66946007)(4326008)(41300700001)(86362001)(66556008)(6916009)(5660300002)(44832011)(316002)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?O87GVllXv8HFLGd5IpsKvSiGyz9RzSPMFLQiyuzcqfKPyTz7BPjmD3esWG?= =?iso-8859-1?Q?3alLH7cHf7OzlyXHelKchfKGl88KkKCqVQo/FR9QvD5MMqc5sos+G5Nepc?= =?iso-8859-1?Q?p4MIHaWBh8Tak3rYe7vqE0EWBOL2SmNfxzvjtR42S+MyNF9MbdE1orF42S?= =?iso-8859-1?Q?v9NZPuLI5ZBSKdMCBACpFgrP38BSDv0/VNUDHwmn6L8Qb+JO/UDaH4jx2D?= =?iso-8859-1?Q?iSM5si7CzCOELIyU/YPkuwkYjImUJgIFKEipQdxr8KhBZ07V02AIcsdfcn?= =?iso-8859-1?Q?fhe70T2kageor0MAOY0X2nn3XUrB9mhjHx0zavpSqoqIILvp+3TdGEUSxi?= =?iso-8859-1?Q?iEjhIegayI3MMIIbATUiDjPRGKLi1F/XAga6ZpGRzkTXMixfqoK3++IZD6?= =?iso-8859-1?Q?MSsmIRrpV6/9Vnt4Z7JxFN6E+nPKxdzn8Be8EOcpesJnCCdJJVCBdGD3Dh?= =?iso-8859-1?Q?VmCrBxd4iY4hHFimxuLCG8ipo8Hx62t3sI3wiLAo7z/IKsFryzeIWCYfCx?= =?iso-8859-1?Q?F9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KZDKjXvl?= =?iso-8859-1?Q?m1AiWr9jRljXdP3exE6ImvKAGeNfxnefTMyjD44Z9e5hYiFZOCmQuknnUb?= =?iso-8859-1?Q?G+gRGQgIAh5uwhZr/t8as+9ju+0EVsTlSptYFa2iwK9IWlyl9YYhQjjRLp?= =?iso-8859-1?Q?82TpxJ+dpS2kqIwJQTYZR8weM2Er0uQGxqr2glWx4EKza6WATPYfqqdu2M?= =?iso-8859-1?Q?iO8oVBLohPrZFF1/TbcCdRuR49guCY9HSOApVe3EhQG45ePGgwN4bHWA?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 8f2b79c8-0373-4c81-bd95-08dbc65558ce X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2023 10:16:47.4853 (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: pBNl25IGFTBfp4j0iNyhQi0GfqcpwUu6msYNfUmgl87FH4lrKhx4Ttl+RHz9k7KOyiOM0KwLe4BgxtEnOhTn4T1V/nKnTdUjYAoHR2UwXRU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4999 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, Oct 06, 2023 at 12:13:54PM +0200, Morten Brørup wrote: > > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > > Sent: Friday, 6 October 2023 11.45 > > > > The event structure in DPDK is 16-bytes in size, and events are > > regularly passed as parameters directly rather than being passed as > > pointers. To help compiler optimize correctly, we can explicitly request > > 16-byte alignment for events, which means that we should be able > > to do aligned vector loads/stores (e.g. with SSE or Neon) when working > > with those events. > > > > Signed-off-by: Bruce Richardson > > Acked-by: Morten Brørup > > Acked-by: Jerin Jacob > > > > --- > > [...] > > > +_Static_assert(sizeof(struct rte_event) == 16, "Event structure size is not 16-bytes in size"); > > Thank you for adding this extra check. We should have more of these. > > NB: _Static_assert is deprecated in C23 [1], so for forward compatibility, you could use static_assert (which is available in ) instead. Nice to have; feel free to ignore this comment. > Is the availability in assert.h backward compatible with C11, since the link you posted seems to imply that "static_assert" is only from C23 onwards?