From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: dev@dpdk.org
Cc: Ajit Khaparde <ajit.khaparde@broadcom.com>,
Akhil Goyal <gakhil@marvell.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Anoob Joseph <anoobj@marvell.com>,
Bruce Richardson <bruce.richardson@intel.com>,
Chaoyong He <chaoyong.he@corigine.com>,
Chenbo Xia <chenbox@nvidia.com>,
David Hunt <david.hunt@intel.com>,
Ferruh Yigit <ferruh.yigit@amd.com>,
Harry van Haaren <harry.van.haaren@intel.com>,
Hemant Agrawal <hemant.agrawal@nxp.com>,
Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
Jerin Jacob <jerinj@marvell.com>,
Jingjing Wu <jingjing.wu@intel.com>,
Jochen Behrens <jbehrens@vmware.com>,
John McNamara <john.mcnamara@intel.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
Maxime Coquelin <maxime.coquelin@redhat.com>,
Nicolas Chautru <nicolas.chautru@intel.com>,
Nithin Dabilpuram <ndabilpuram@marvell.com>,
Ori Kam <orika@nvidia.com>,
Pavan Nikhilesh <pbhagavatula@marvell.com>,
Sachin Saxena <sachin.saxena@nxp.com>,
Somnath Kotur <somnath.kotur@broadcom.com>,
Thomas Monjalon <thomas@monjalon.net>,
Volodymyr Fialko <vfialko@marvell.com>,
Zhirun Yan <zhirun.yan@intel.com>,
david.marchand@redhat.com,
Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH v2 13/21] drivers/bus: use C11 alignof
Date: Tue, 13 Feb 2024 10:34:44 -0800 [thread overview]
Message-ID: <1707849292-19519-14-git-send-email-roretzla@linux.microsoft.com> (raw)
In-Reply-To: <1707849292-19519-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>
---
drivers/bus/dpaa/dpaa_bus.c | 3 ++-
drivers/bus/fslmc/fslmc_bus.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index e57159f..4647360 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -4,6 +4,7 @@
*
*/
/* System headers */
+#include <stdalign.h>
#include <stdio.h>
#include <inttypes.h>
#include <unistd.h>
@@ -307,7 +308,7 @@ int rte_dpaa_portal_init(void *arg)
static const struct rte_mbuf_dynfield dpaa_seqn_dynfield_desc = {
.name = DPAA_SEQN_DYNFIELD_NAME,
.size = sizeof(dpaa_seqn_t),
- .align = __alignof__(dpaa_seqn_t),
+ .align = alignof(dpaa_seqn_t),
};
unsigned int cpu, lcore = rte_lcore_id();
int ret;
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 57bfb51..b1af47c 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -6,6 +6,7 @@
#include <string.h>
#include <dirent.h>
+#include <stdalign.h>
#include <stdbool.h>
#include <rte_log.h>
@@ -395,7 +396,7 @@
static const struct rte_mbuf_dynfield dpaa2_seqn_dynfield_desc = {
.name = DPAA2_SEQN_DYNFIELD_NAME,
.size = sizeof(dpaa2_seqn_t),
- .align = __alignof__(dpaa2_seqn_t),
+ .align = alignof(dpaa2_seqn_t),
};
if (TAILQ_EMPTY(&rte_fslmc_bus.device_list))
--
1.8.3.1
next prev parent reply other threads:[~2024-02-13 18:36 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 ` [PATCH 7/9] pdcp: " Tyler Retzlaff
2024-01-25 4:36 ` [EXT] " 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 ` Tyler Retzlaff [this message]
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=1707849292-19519-14-git-send-email-roretzla@linux.microsoft.com \
--to=roretzla@linux.microsoft.com \
--cc=ajit.khaparde@broadcom.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=anoobj@marvell.com \
--cc=bruce.richardson@intel.com \
--cc=chaoyong.he@corigine.com \
--cc=chenbox@nvidia.com \
--cc=david.hunt@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=gakhil@marvell.com \
--cc=harry.van.haaren@intel.com \
--cc=hemant.agrawal@nxp.com \
--cc=honnappa.nagarahalli@arm.com \
--cc=jbehrens@vmware.com \
--cc=jerinj@marvell.com \
--cc=jingjing.wu@intel.com \
--cc=john.mcnamara@intel.com \
--cc=kirankumark@marvell.com \
--cc=konstantin.v.ananyev@yandex.ru \
--cc=maxime.coquelin@redhat.com \
--cc=ndabilpuram@marvell.com \
--cc=nicolas.chautru@intel.com \
--cc=orika@nvidia.com \
--cc=pbhagavatula@marvell.com \
--cc=sachin.saxena@nxp.com \
--cc=somnath.kotur@broadcom.com \
--cc=thomas@monjalon.net \
--cc=vfialko@marvell.com \
--cc=zhirun.yan@intel.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).