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 4A11B426CF; Fri, 6 Oct 2023 12:28:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7B634069F; Fri, 6 Oct 2023 12:28:04 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 28958402F2 for ; Fri, 6 Oct 2023 12:28:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696588082; x=1728124082; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=8A0Id1R5H70jUFNYLkQjWFREZ51/bkIJW6xxUjKWODs=; b=kx1QvvDcv+LK2R5LVgHk8/l1QSQWevT1yScEx/ab382687o9IDEXI8RB Hh+i5ZOjNdIORDdlXfa8c8y5Ykfv5kTMuKVmbQOavV0sUqNWSwA/KY/Dh Ii0o2eEGe7iLbnbksFieDMrU4KttHVuMiq/GwtV5IyimvQUk8c/iCdFwH NgFQJ8HrsOVLxV+nNBrUYfAU+sKaFiUbBtgp/1Dpj/bYH9HKCdxt22yRq T6QXpqhNl/OrAypyFKG5/h+QM/u77uH/nMYXTgVD7rYuk1A3ObHIXK87T DV6G6KyXzbvn6wIJYSvT2sJCc0I4vuZSfGTSrxtvQA5B6PcEVcBrSPvHJ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10854"; a="447911411" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="447911411" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 03:28:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10854"; a="745830279" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="745830279" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Oct 2023 03:28:01 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX601.amr.corp.intel.com (10.22.229.14) 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:28:00 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX612.amr.corp.intel.com (10.22.229.25) 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:28:00 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx611.amr.corp.intel.com (10.22.229.24) 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:28:00 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.48) by edgegateway.intel.com (134.134.137.102) 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:28:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BhIijozR7UxiC1JUY1CS3E6P3CjOU4HBFlL0Wy3gecW3sjdwEwFbe/tDTMu/rpcwHYAHtlHV3xGQdsYtf6DMjFkhw2HV9tqsnZWMz8xrnONy6S9cLGulRFbb0AMDqqL170oQwxX13s20VWn2gl7uFehrJFnE2YTIgyElQ5uYsRl3m9UPjh8SKOMh00t9chvFmYB5ER3X6kYwT06XXrez3xheY1gnFbb2paVcpIPHob5MzrIsqFqV7KavmJh97a3UnpfqcM6TJ2XLvtGSZK8ABLfK7VOYKN624Zjx0c3xEHWjvq005SoBBnrU5LQbQDvVY6Q5TaAQeVo42ehJ2R1IIg== 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=++1CXB9sIWtuRdbwYOecLJVZ8Ljdb+c0ZF1+xEt4sB4=; b=Zzrw+7B8T2siH3qghC8UvrwUasQhBoaMEMgbcHjzEbdmK2M1lz3Kf8eRjCN+fQBbNEmiEpUE9rKGE5QH0ixnf9spBKIW7lEkrJ5nT8yS+ymLZmIm84cJ/FoxnkclRq1NH5/9+RksxaPIEH9U/pG3qX4V05W2au1Qq5tedGEXZUcN0XIH9ZhIldn1AX73/ZWMgumM5AmnpWN/htqyLpY02IhKyuyelWiWPbrRR5ZA5qeB3Plqow2lB9llhGZtSCXA6UH42n10CT9/FQ4Gy4aVWGdqmpwsOebYrwz931biL9vqChfxZse9IiKGefsMkyOjP14vYngbo7fcNpwbZuzZbw== 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 LV8PR11MB8679.namprd11.prod.outlook.com (2603:10b6:408:1f9::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.28; Fri, 6 Oct 2023 10:27:58 +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:27:58 +0000 Date: Fri, 6 Oct 2023 11:27:53 +0100 From: Bruce Richardson To: Jerin Jacob CC: Morten =?iso-8859-1?Q?Br=F8rup?= , , 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="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: DU2PR04CA0049.eurprd04.prod.outlook.com (2603:10a6:10:234::24) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|LV8PR11MB8679:EE_ X-MS-Office365-Filtering-Correlation-Id: 728e1669-2523-4aaa-4d09-08dbc656e8f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rI+wtSuEnPFu+jQp0vdC97hDiV0Y06DHv4upvf8eamTD1DQcQyqCsNAi5F0KPLj9SaGlX+p+CJIVwH89/5jnjVbiaph9v90l3XcrAx6Mlnt4ySx2uQQxzu+Lq4MMLvrWBQoretrRcUMH6sdZXh2A75I5527LME+ZWiJvuTnPghNKEyaRXEqiOWMu+sAIVhE4Q7If+SApD/BmvWnrTr6IgmTGwr32p1EbUF+Y7KyGagY18NkSb72D7UGt2opi7ixzvYD1I0KFnxNkUSCnLXpk+Q9SOOnvHVToqKy0cwC0RQlwLUeUeDMesmsdjrIqtO7hHQHp6tvVCnnCmrQQG4AYw/RQvsDJvv5IVUBn5g/11K1VeEGwC5iDQ5nGreVIUB3QK6U+/b+hHABfren2xR8scW1/Zzy192mswg6G5TJX9fY2oDj+eUJBsFhcXF+c1Xag9t++li+IUkcuvm0+W1tE/qDK+WlOrKBefTVPAHvix7VpncABB+jycxkwUbwSWMkGEbeiwf3L+4SH3QGX20xa4ygipM0OcyJP6hUN6F4dW+lfeDkdX7YzkIT72xQ8dFQr 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)(366004)(346002)(396003)(376002)(230922051799003)(1800799009)(451199024)(186009)(64100799003)(6512007)(6666004)(53546011)(6506007)(6486002)(82960400001)(86362001)(38100700002)(26005)(83380400001)(66574015)(316002)(6916009)(8936002)(44832011)(66556008)(66476007)(54906003)(41300700001)(66946007)(8676002)(2906002)(478600001)(5660300002)(4326008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?N0V1KzlVYVE3RzlodVJyVS9objZwQmtPWWVxRjU3RCttNjRjVWV6UUFtTVJh?= =?utf-8?B?UTJuME94L0VKWFRMaEhrTTRRbUFjUFBnN2l1bXg0VU9vaDVkZDQvRGRWTVhn?= =?utf-8?B?SFF4eS9mSzhVd0UwRHFqeHJRVExaN1BCdnZNcVBuNEZ5Z2RFQ1J2ZUJTa3dW?= =?utf-8?B?YUh3Vm9SbVFDeDlmMkpEemRnTFNIMmp0T1hUeHJXVXZ0enV4MXZLb0cvT1FF?= =?utf-8?B?bUlkUm5vQTRUUFhPUTZyazVoekdlMmxUUzdQZURrbHRuUUY4WWJLQmN0S0hC?= =?utf-8?B?V1RvQnptY0dQQ1V5ZGdnTjRaeFVXb01QeTZxTXZ3K29uWG51Wi9UTVZrQlAz?= =?utf-8?B?WHMvRUxsdUlIVFFtQk03Ym4yVENvNWI5NDRSNWlKN3dWS0xPSkVNOXZWTDVD?= =?utf-8?B?NmVUW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network-Message-Id: 728e1669-2523-4aaa-4d09-08dbc656e8f4 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:27:58.3237 (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: CA3Gl5AVYY7apq7s6lUcfLEpzCkRUP+XDebZNS4tPiUBEnK4Sm8V9lnBaIFzet9sW0LHIGwUiw+/g9fV7nzTfZ1S9QKfusFK6bed3B/UnKw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR11MB8679 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 03:54:26PM +0530, Jerin Jacob wrote: > On Fri, Oct 6, 2023 at 3:49 PM Bruce Richardson > wrote: > > > > On Fri, Oct 06, 2023 at 03:46:21PM +0530, Jerin Jacob wrote: > > > On Fri, Oct 6, 2023 at 3:44 PM 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. > > > > > > Use existing RTE_BUILD_BUG_ON this on .c file instead of header file. > > > > > > > Ok to move to a C file, but I think using static_asserts are better than > > using the old macro tricks of negatively sized arrays. > > No strong opinion on the API. I just told because compatibility > discussions came in. > Key is to move to .c file. > Thanks. V4 coming up....