DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: dev@dpdk.org
Cc: Akhil Goyal <gakhil@marvell.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Anoob Joseph <anoobj@marvell.com>,
	Ferruh Yigit <ferruh.yigit@amd.com>,
	Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
	Jerin Jacob <jerinj@marvell.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Ori Kam <orika@nvidia.com>,
	Pavan Nikhilesh <pbhagavatula@marvell.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Volodymyr Fialko <vfialko@marvell.com>,
	Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH 7/9] pdcp: use C11 alignof
Date: Wed, 24 Jan 2024 15:17:54 -0800	[thread overview]
Message-ID: <1706138276-28224-8-git-send-email-roretzla@linux.microsoft.com> (raw)
In-Reply-To: <1706138276-28224-1-git-send-email-roretzla@linux.microsoft.com>

Replace use of __alignof__(T) with C11 alignof(T) to improve portability
between toolchains.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/pdcp/rte_pdcp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/pdcp/rte_pdcp.c b/lib/pdcp/rte_pdcp.c
index 1c6d246..1c076fb 100644
--- a/lib/pdcp/rte_pdcp.c
+++ b/lib/pdcp/rte_pdcp.c
@@ -2,6 +2,8 @@
  * Copyright(C) 2023 Marvell.
  */
 
+#include <stdalign.h>
+
 #include <rte_errno.h>
 #include <rte_pdcp.h>
 #include <rte_malloc.h>
@@ -32,7 +34,7 @@ struct entity_layout {
 	const struct rte_mbuf_dynfield dynfield_desc = {
 		.name = RTE_PDCP_DYNFIELD_NAME,
 		.size = sizeof(rte_pdcp_dynfield_t),
-		.align = __alignof__(rte_pdcp_dynfield_t),
+		.align = alignof(rte_pdcp_dynfield_t),
 	};
 
 	if (rte_pdcp_dynfield_offset != -1)
-- 
1.8.3.1


  parent reply	other threads:[~2024-01-24 23:18 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 23:17 [PATCH 0/9] " Tyler Retzlaff
2024-01-24 23:17 ` [PATCH 1/9] ring: " Tyler Retzlaff
2024-01-24 23:17 ` [PATCH 2/9] mbuf: " Tyler Retzlaff
2024-01-24 23:17 ` [PATCH 3/9] ethdev: " Tyler Retzlaff
2024-01-24 23:17 ` [PATCH 4/9] eventdev: " Tyler Retzlaff
2024-01-24 23:17 ` [PATCH 5/9] stack: " Tyler Retzlaff
2024-01-24 23:17 ` [PATCH 6/9] node: " Tyler Retzlaff
2024-01-24 23:17 ` Tyler Retzlaff [this message]
2024-01-25  4:36   ` [EXT] [PATCH 7/9] pdcp: " Anoob Joseph
2024-01-24 23:17 ` [PATCH 8/9] reorder: " Tyler Retzlaff
2024-01-25  0:36   ` [EXT] " Volodymyr Fialko
2024-01-24 23:17 ` [PATCH 9/9] security: " Tyler Retzlaff
2024-01-25  6:28   ` [EXT] " Akhil Goyal
2024-01-25  7:19 ` [PATCH 0/9] " Morten Brørup
2024-01-25 12:51 ` fengchengwen
2024-02-13 11:04 ` David Marchand
2024-02-13 18:34 ` [PATCH v2 00/21] " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 01/21] ring: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 02/21] mbuf: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 03/21] ethdev: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 04/21] eventdev: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 05/21] stack: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 06/21] node: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 07/21] pdcp: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 08/21] reorder: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 09/21] security: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 10/21] test: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 11/21] examples: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 12/21] app/eventdev: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 13/21] drivers/bus: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 14/21] event/sw: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 15/21] net/bnxt: " Tyler Retzlaff
2024-02-13 19:19     ` Ajit Khaparde
2024-02-13 18:34   ` [PATCH v2 16/21] net/iavf: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 17/21] net/nfp: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 18/21] net/sfc: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 19/21] net/virtio: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 20/21] net/vmxnet3: " Tyler Retzlaff
2024-02-13 18:34   ` [PATCH v2 21/21] devtools: forbid direct use of compiler alignof and typeof Tyler Retzlaff
2024-02-14 12:19   ` [PATCH v2 00/21] use C11 alignof David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1706138276-28224-8-git-send-email-roretzla@linux.microsoft.com \
    --to=roretzla@linux.microsoft.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=gakhil@marvell.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=jerinj@marvell.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=ndabilpuram@marvell.com \
    --cc=orika@nvidia.com \
    --cc=pbhagavatula@marvell.com \
    --cc=thomas@monjalon.net \
    --cc=vfialko@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).