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 33BD543C58; Wed, 6 Mar 2024 10:55:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CFFF940276; Wed, 6 Mar 2024 10:55:53 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 1250340275 for ; Wed, 6 Mar 2024 10:55:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709718952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ylZJ5w2qVIQyLtrnWGrIUK6gdNIUU9EdcrxaJblLysk=; b=Thiqunrrwe90keE/U+iyrTnAS+mVyPJHqM/OYnUztWqcvTb+vynk8A49/EiRozmZZafUYU 70s1PHR/XzFUY1uzo5e2tU0EkEGw53MH4PRQw4NWpk3aitW9//4G1K9Nn17uMEAN6kZVbo PXSplwLTddtaB+W3AlompaEIutOgZkM= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-374-53DZJikkMw2qLDay2GLCJw-1; Wed, 06 Mar 2024 04:55:50 -0500 X-MC-Unique: 53DZJikkMw2qLDay2GLCJw-1 Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-5131d042b1aso5231078e87.0 for ; Wed, 06 Mar 2024 01:55:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709718949; x=1710323749; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ylZJ5w2qVIQyLtrnWGrIUK6gdNIUU9EdcrxaJblLysk=; b=xBzB2DwES4/tyh7UgN6/daYdpl/j69ICllpmdpOcrKGxTrL5FzM4zSJnLiIEuAW9e+ O052UeAzYZR0LGv2AKREpJy6u1nZjJyPzWAX00rp/WmcQi7tKQJe2cy++FKi52AqCCq1 OTSDrzh2suCDyyN75/wwb+iYZJS7ZWSiSldlrAeqaxuSSREFxzfcWbF+0euUzzd5mIXW 8WWi7KVYR2Jz5/caY9Am9kLy8ZMnXH0L8RmoGt2zINbWoagDctCphg1VSoQP5YnBYV3C PwEXy1JhFRsFXfQyyz2zBvE0sKi0WWD5wJpm+xn4PMlM44tGYlETboECh+M9B3cvvgTk QM1A== X-Gm-Message-State: AOJu0YxR8PIkr48zsIoN/RCx8zM4519YQh3JW+HkZOV+rNDMnwijW3K8 F+WldKix0Y5E+VHjXLBTkOUAJ2G69Vuo9deqpdoCZkZHGghCz1zBAvcgJbAVUeD3BIquOU+f7SE gMadSsjCFhOtpp3mqVHnCvm5iF6xaCP2XAlojDoQQ/mT0ZBNI7REVw5By5zscMgFif7N9WCPorz lEEZwOHLzGPeiBfZk= X-Received: by 2002:ac2:5de1:0:b0:513:523b:6e20 with SMTP id z1-20020ac25de1000000b00513523b6e20mr2822664lfq.23.1709718949288; Wed, 06 Mar 2024 01:55:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IEIyjnXwrCIXMRVkgrArk3IlLTo3guaKSz27l8ppcv1nghkoP1Tzcktvehs8evOamV4a1nx771nlTKwoI/+y84= X-Received: by 2002:ac2:5de1:0:b0:513:523b:6e20 with SMTP id z1-20020ac25de1000000b00513523b6e20mr2822642lfq.23.1709718948974; Wed, 06 Mar 2024 01:55:48 -0800 (PST) MIME-Version: 1.0 References: <1707873986-29352-1-git-send-email-roretzla@linux.microsoft.com> <1709574764-9041-1-git-send-email-roretzla@linux.microsoft.com> In-Reply-To: <1709574764-9041-1-git-send-email-roretzla@linux.microsoft.com> From: David Marchand Date: Wed, 6 Mar 2024 10:55:36 +0100 Message-ID: Subject: Re: [PATCH v7 00/39] use C11 alignas To: Tyler Retzlaff 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 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hello Tyler, On Mon, Mar 4, 2024 at 6:53=E2=80=AFPM 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 introduc= e > 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. --=20 David Marchand