From patchwork Tue Feb 13 18:34:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136670 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E06F243B0D; Tue, 13 Feb 2024 19:37:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DE2F42EF2; Tue, 13 Feb 2024 19:35:16 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 9990E42E0D for ; Tue, 13 Feb 2024 19:34:56 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id C12D420B2011; Tue, 13 Feb 2024 10:34:54 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C12D420B2011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707849294; bh=C1OPwGvuiWFRQx9B8Z3057yJTXlevVl3OMfTo8AP3Jo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kU9VcmQeCJyS7se1Oc4cd2UXyt0gqBfdDMugYV3YUtZCmuutExxY/TcloJT1s4y4d WZtKUXKhn2bl12IfdGuVUVtmj1fxK9A2zqvR8HzdB6g/4E1XB6KboJI36UOj5ERTJX 1a3o4/njcrWPeasdG1VxU3EGK09FOcIO7WPHt9+o= From: Tyler Retzlaff To: dev@dpdk.org Cc: Ajit Khaparde , Akhil Goyal , Andrew Rybchenko , Anoob Joseph , Bruce Richardson , Chaoyong He , Chenbo Xia , David Hunt , Ferruh Yigit , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Jerin Jacob , Jingjing Wu , Jochen Behrens , John McNamara , Kiran Kumar K , Konstantin Ananyev , Maxime Coquelin , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pavan Nikhilesh , Sachin Saxena , Somnath Kotur , Thomas Monjalon , Volodymyr Fialko , Zhirun Yan , david.marchand@redhat.com, Tyler Retzlaff Subject: [PATCH v2 18/21] net/sfc: use C11 alignof Date: Tue, 13 Feb 2024 10:34:49 -0800 Message-Id: <1707849292-19519-19-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1707849292-19519-1-git-send-email-roretzla@linux.microsoft.com> References: <1706138276-28224-1-git-send-email-roretzla@linux.microsoft.com> <1707849292-19519-1-git-send-email-roretzla@linux.microsoft.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 Replace use of __alignof__(T) with C11 alignof(T) to improve portability between toolchains. Signed-off-by: Tyler Retzlaff --- drivers/net/sfc/sfc_dp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/sfc/sfc_dp.c b/drivers/net/sfc/sfc_dp.c index 2b0a1d7..7e2a20e 100644 --- a/drivers/net/sfc/sfc_dp.c +++ b/drivers/net/sfc/sfc_dp.c @@ -8,6 +8,7 @@ */ #include +#include #include #include @@ -91,7 +92,7 @@ struct sfc_dp * static const struct rte_mbuf_dynfield mport = { .name = "rte_net_sfc_dynfield_mport", .size = sizeof(efx_mport_id_t), - .align = __alignof__(efx_mport_id_t), + .align = alignof(efx_mport_id_t), }; static const struct rte_mbuf_dynflag mport_override = { .name = "rte_net_sfc_dynflag_mport_override", @@ -134,7 +135,7 @@ struct sfc_dp * static const struct rte_mbuf_dynfield ft_ctx_id = { .name = "rte_net_sfc_dynfield_ft_ctx_id", .size = sizeof(uint8_t), - .align = __alignof__(uint8_t), + .align = alignof(uint8_t), }; int field_offset;