From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6D30B43C5A; Wed, 6 Mar 2024 19:05:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3540440647; Wed, 6 Mar 2024 19:05:55 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 98F1E402EA for ; Wed, 6 Mar 2024 19:05:53 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id B5EFB20B74C0; Wed, 6 Mar 2024 10:05:52 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B5EFB20B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709748352; bh=kg9SVcrD1d3s4sypIeph6xUlvrV7fjB9K+vmabMt8mc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MZW76oyAli+B2G12xSr4uxpwpylCWqpWSLwSEzrPw1RN74rZnLQ8av+qUQeRBYrlp plArdfHp3JAiakgIftJ/k4qgurcT7537IxSQC+R1FnL29z5UyNvbZoXV2MyRTYg0U9 qyRevZEMYf65TtFJgSdT5zML5iGIWiUVVWk+vSn4= Date: Wed, 6 Mar 2024 10:05:52 -0800 From: Tyler Retzlaff To: David Marchand Cc: dev@dpdk.org, 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 Subject: Re: [PATCH v7 00/39] use C11 alignas Message-ID: <20240306180552.GA3036@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1707873986-29352-1-git-send-email-roretzla@linux.microsoft.com> <1709574764-9041-1-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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 On Wed, Mar 06, 2024 at 10:55:36AM +0100, David Marchand wrote: > Hello Tyler, > > On Mon, Mar 4, 2024 at 6:53 PM Tyler Retzlaff > wrote: > > > > The current location used for __rte_aligned(a) for alignment of types > > and variables is not compatible with MSVC. There is only a single > > location accepted by both toolchains. > > > > For variables standard C11 offers alignas(a) supported by conformant > > compilers i.e. both MSVC and GCC. > > > > For types the standard offers no alignment facility that compatibly > > interoperates with C and C++ but may be achieved by relocating the > > placement of __rte_aligned(a) to the aforementioned location accepted > > by all currently supported toolchains. > > > > ** NOTE ** > > > > Finally, In the interest of not creating more API (internal or not) the > > series does not introduce a wrapper for C11 alignas. If we don't introduce > > a macro an application can't take a dependency. > > I reorganised the commits since those were global/mechanical changes in lib/. > > As part of the alignas() conversion, I updated the references to > __rte_*aligned in the documentation so that there is no "bad example" > in doc/. > > I converted the cacheline1 field to alignas in the mbuf library, but > also in eventdev and security libraries. > With this, there is no remaining construct like struct|union { ... } > __rte_*aligned in lib/. > > I added a check in checkpatches.sh so that we don't reintroduce > wrongly placed __rte_*aligned tags. > I made this check global (iow not restricted to lib/) so that > developers touching drivers/ and other parts of DPDK are made aware of > this change of use of __rte_*aligned tags. > > Series applied. Great to have this done, thank you David! > > -- > David Marchand