From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B89D5A04B3; Mon, 10 Feb 2020 17:21:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 960E41BF83; Mon, 10 Feb 2020 17:20:55 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 9ADBB1BF7B for ; Mon, 10 Feb 2020 17:20:53 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4CE8B22663; Mon, 10 Feb 2020 11:20:53 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 10 Feb 2020 11:20:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=oqoUpS7DhI 0ZYOyC9pjL4em+XcE35Vkbs0RYqzh5xJA=; b=nz+ULWo8DD7RhoRvf6LvKMAJNK HzslLKSQbX8UQUtLLdZdAcbVaohdMH183mFkpA3TsWQkbVB53YrgfLwLsttLo9bt poVpr/vqKXPsNzuk7uJzG6uLqYYOFgtnFF2NdRXT0PT7eQfFKY/L3dNzD6q8krtW ihLXPCGUOBwvZXZ4Y= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=oqoUpS7DhI0ZYOyC9pjL4em+XcE35Vkbs0RYqzh5xJA=; b=PLk83uxI CEK/dD/hS3/Jt35icTJ7U5vArOqkA8Ags6DQModARIRYnj6YonBoKae+jwJfB6Lx JryYUlSaVaNpIxgUFOcuCa1dJBeoNqcujHXy39gCNYj08l5FP5M5pGJF9RnXiZbd 8Gt7jZ5gMXOizsNlcumJsx6kl3swtpnEexFwBAsUCE7HHhe1VB6EDK/wAaV1Bmsl Q7mTAND0KzpbdjOCs2+xyFZRUqjpNOe7+8mEyxE+fxiNGs+fkIOJNNzYqxQg0MEn yUApmXnGXCYgghRDxzmOTPlmgs8N0wh4hcDpBHWC0Gnsd9NVjwScslbGdhrYJX1D Qz7GFQglu53Jzw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedriedugdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgepudenucfrrghr rghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id A590C3280063; Mon, 10 Feb 2020 11:20:52 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko Date: Mon, 10 Feb 2020 17:20:21 +0100 Message-Id: <20200210162032.1177478-5-thomas@monjalon.net> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210162032.1177478-1-thomas@monjalon.net> References: <20200210162032.1177478-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 20.05 04/15] common/mlx5: replace alignas keyword X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The keyword alignas can be replaced with __rte_aligned macro for consistency and allow compilers compatibility control. The macro __rte_cache_aligned is a shortcut including __rte_aligned and RTE_CACHE_LINE_SIZE constant. Signed-off-by: Thomas Monjalon --- drivers/common/mlx5/mlx5_glue.c | 4 ++-- drivers/common/mlx5/mlx5_nl.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/common/mlx5/mlx5_glue.c b/drivers/common/mlx5/mlx5_glue.c index 0af0b86677..428de0ffd9 100644 --- a/drivers/common/mlx5/mlx5_glue.c +++ b/drivers/common/mlx5/mlx5_glue.c @@ -1182,8 +1182,8 @@ mlx5_glue_dv_free_var(struct mlx5dv_var *var) #endif } -alignas(RTE_CACHE_LINE_SIZE) -const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue){ +__rte_cache_aligned +const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue) { .version = MLX5_GLUE_VERSION, .fork_init = mlx5_glue_fork_init, .alloc_pd = mlx5_glue_alloc_pd, diff --git a/drivers/common/mlx5/mlx5_nl.c b/drivers/common/mlx5/mlx5_nl.c index 549e787b04..d9f0d4129e 100644 --- a/drivers/common/mlx5/mlx5_nl.c +++ b/drivers/common/mlx5/mlx5_nl.c @@ -1342,7 +1342,7 @@ mlx5_nl_vlan_vmwa_create(struct mlx5_nl_vlan_vmwa_context *vmwa, struct ifinfomsg *ifm; char name[sizeof(MLX5_VMWA_VLAN_DEVICE_PFX) + 32]; - alignas(RTE_CACHE_LINE_SIZE) + __rte_cache_aligned uint8_t buf[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + NLMSG_ALIGN(sizeof(struct ifinfomsg)) + NLMSG_ALIGN(sizeof(struct nlattr)) * 8 + -- 2.25.0