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 DB79243B6B; Thu, 22 Feb 2024 07:43:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C9F23402DA; Thu, 22 Feb 2024 07:43:46 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id 3519740281 for ; Thu, 22 Feb 2024 07:43:27 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id BAA5C3200B7D; Thu, 22 Feb 2024 01:43:21 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 22 Feb 2024 01:43:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1708584201; x=1708670601; bh=kyuyrFmHC+v/WVc/dLrFVB2OICbve/NmcU7y0P4CHgw=; b= xDxDlsDSpPCna228UTwlh+ij50wiHuiWrifeI707fNgJne9QzXxZUwMYN3iVRKTy xQTYA7WUwP4PL1KnamILWt4G4sHDluymy+eh0tgX2J8merwGh9fo8yajAB60KB/u Fi0steYlJYYAZY0Vdr7wlTlsVY0Mi2/i3kGUax832s+KB+kJ4ykyvfX3Qdgqr+Gi r+/mibhncrIbiei+pgnTY4o24P6e/oO5KLKigMc2OCPmByijdsX4j8sR9lbTnena KUVSH8lAeFfk5m5lUaiyRNwtqD+eCvI7xYUqGvG1IV+//5sleQcNGFqyEw/sC8a8 cMC2jKA9az+V9PTn67vlnw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708584201; x= 1708670601; bh=kyuyrFmHC+v/WVc/dLrFVB2OICbve/NmcU7y0P4CHgw=; b=m sVo5i63n/HX2q+QkS+VJJxkNLUd2sKPDUcFMDHNUrSRStnJjT3Vkk+jGcgShA/OK 03V6fYFqC/xyggKJyJR7iKN1elOGJZ4GOo1kwocnNrZGoDAqCNRUMdT8xwU4P9tl yDlNm09Uf8sMIR+J3stFiFJqL7bpkC4t7uAtS+VW5FNBlHwvy1A0hC0ylwzCzDFX 2263JGTTvXvzRAJGTyl42wKNpLZ9UeKsYm2TljjP9dcMS2rjK+wRwFLYNLVYuwi7 0XWpg9iUa9csyqjJeI3ZtTZe/HELcyit7T1yO0hMaLg3OIYKJAEjDVhpYv1nylwK HLvckjZ5lMhIYphqVkEDA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeefgdeljecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 22 Feb 2024 01:43:17 -0500 (EST) From: Thomas Monjalon To: Tyler Retzlaff Cc: dev@dpdk.org, Andrew Rybchenko , Bruce Richardson , Chengwen Feng , Cristian Dumitrescu , David Christensen , David Hunt , Ferruh Yigit , Honnappa Nagarahalli , Jasvinder Singh , Jerin Jacob , Kevin Laatz , Konstantin Ananyev , Min Zhou , Ruifeng Wang , Sameh Gobriel , Stanislaw Kardach , Vladimir Medvedkin , Yipeng Wang Subject: Re: [PATCH v4 01/39] eal: use C11 alignas Date: Thu, 22 Feb 2024 07:43:13 +0100 Message-ID: <4898982.31r3eYUQgx@thomas> In-Reply-To: <1707928564-28796-2-git-send-email-roretzla@linux.microsoft.com> References: <1707873986-29352-1-git-send-email-roretzla@linux.microsoft.com> <1707928564-28796-1-git-send-email-roretzla@linux.microsoft.com> <1707928564-28796-2-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 14/02/2024 17:35, Tyler Retzlaff: > * Expand __rte_aligned(a) to __declspec(align(a)) when building > with MSVC. > > * Move __rte_aligned from the end of {struct,union} definitions to > be between {struct,union} and tag. > > The placement between {struct,union} and the tag allows the desired > alignment to be imparted on the type regardless of the toolchain being > used for all of GCC, LLVM, MSVC compilers building both C and C++. > > * Replace use of __rte_aligned(a) on variables/fields with alignas(a). We miss an explanation about why __rte_aligned() and alignas() are different. If __rte_aligned() is only for struct definitions, maybe we should have a different name? At least we need a Doxygen comment to guide about its usage. [...] > #ifdef RTE_TOOLCHAIN_MSVC > -#define __rte_aligned(a) > +#define __rte_aligned(a) __declspec(align(a)) > #else > #define __rte_aligned(a) __attribute__((__aligned__(a))) > #endif [...] > /** Force alignment to cache line. */ > -#ifdef RTE_TOOLCHAIN_MSVC > -#define __rte_cache_aligned > -#else > #define __rte_cache_aligned __rte_aligned(RTE_CACHE_LINE_SIZE) > -#endif > > /** Force minimum cache line alignment. */ > #define __rte_cache_min_aligned __rte_aligned(RTE_CACHE_LINE_MIN_SIZE)