From patchwork Wed Feb 14 01:26:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 641 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 8471D43B21; Wed, 14 Feb 2024 02:26:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72DAB42DF9; Wed, 14 Feb 2024 02:26:31 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D947340278 for ; Wed, 14 Feb 2024 02:26:28 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 0931B20B2000; Tue, 13 Feb 2024 17:26:28 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0931B20B2000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707873988; bh=XjpCvofkNeFSYRBsFMAdKIj46aIMrNiNpZO/+H/UbvA=; h=From:To:Cc:Subject:Date:From; b=eGwoFL+GdWcE6FUZ/xuQs+qrQm98FUEFsjNAnSeAmH2swWBglM7dgvipinsCqJ2Fd csrDpxQlkCDiA5r21LoM6E4Aqh1n+3Mil1E0FCMt8CNoFGeo8ZSh3PHoRkmehWwG6G LW0fRRSKBUg8dcyWbJJvpRJnDnAxBOwl0m+DPO+Y= From: Tyler Retzlaff To: dev@dpdk.org Cc: 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 , Thomas Monjalon , Vladimir Medvedkin , Yipeng Wang , Tyler Retzlaff Subject: [PATCH 00/14] use C11 alignas and normalize type alignment Date: Tue, 13 Feb 2024 17:26:12 -0800 Message-Id: <1707873986-29352-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 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 This series normalizes type and object alignment by doing the following. Fill in expansion of existing __rte_aligned, __rte_cache_aligned and __rte_cache_min_aligned macros for MSVC. Where __rte_aligned, __rte_cache_aligned and __rte_cache_min_aligned are used to align *types* move them to a location on the type definition that both GCC and MSVC accept for both C and C++ compilation. Where __rte_aligned, __rte_cache_aligned or __rte_cache_min_aligned are used to align *objects* replace their usage with standard C11 alignas. I've elected to put the series forward without introducing a new macro similar to __rte_alignas. Assuming the convention of a lower case macro starting with __rte is intended to be internal only and providing it would only permit unintended use by applications. Tyler Retzlaff (14): eal: use C11 alignas stack: use C11 alignas sched: use C11 alignas ring: remove unnecessary explicit alignment pipeline: use C11 alignas net: use C11 alignas mbuf: remove unnecessary explicit alignment hash: use C11 alignas eventdev: use C11 alignas ethdev: use C11 alignas dmadev: use C11 alignas distributor: use C11 alignas acl: use C11 alignas eal: redefine macro to be integer literal for MSVC lib/acl/acl_run.h | 4 ++-- lib/distributor/rte_distributor.c | 2 +- lib/dmadev/rte_dmadev_core.h | 4 ++-- lib/eal/arm/include/rte_vect.h | 4 ++-- lib/eal/include/generic/rte_atomic.h | 4 ++-- lib/eal/include/rte_common.h | 2 +- lib/eal/loongarch/include/rte_vect.h | 8 ++++---- lib/eal/ppc/include/rte_vect.h | 4 ++-- lib/eal/riscv/include/rte_vect.h | 4 ++-- lib/eal/x86/include/rte_vect.h | 9 ++++++--- lib/ethdev/rte_ethdev.h | 4 ++-- lib/eventdev/rte_eventdev.h | 8 ++++---- lib/hash/rte_thash.h | 8 ++++---- lib/mbuf/rte_mbuf_core.h | 2 +- lib/net/net_crc_avx512.c | 12 ++++++------ lib/net/net_crc_neon.c | 10 +++++----- lib/net/net_crc_sse.c | 16 ++++++++-------- lib/net/rte_arp.h | 8 ++++---- lib/net/rte_ether.h | 8 ++++---- lib/pipeline/rte_table_action.c | 24 ++++++++++++------------ lib/ring/rte_ring_core.h | 4 ++-- lib/sched/rte_sched.c | 2 +- lib/sched/rte_sched_common.h | 2 -- lib/stack/rte_stack.h | 2 +- 24 files changed, 78 insertions(+), 77 deletions(-)