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 DA57443C3D; Tue, 5 Mar 2024 21:00:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB7C2402B2; Tue, 5 Mar 2024 21:00:58 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 5D776402AC for ; Tue, 5 Mar 2024 21:00:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709668856; 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=YtjaFvGLiucsb6hE7VLOKYjEsU3faU0NXLKz7EfkUyg=; b=FvR34KioEkiM/noCmSBc96xZFhFO5MzvzNi4l98tLu7tJPBgkTiK3l3CcKTdQVOZ7DTW31 G+vA7KHtULgDEL6bNmOu3Moyvv9Z48R/Fd/rSg5RVUSwvGTs+dPpmwNbWvSZMfXpb27BDv 9Sm62IcLDWnIxqpNa2Sc9OLi3kJkkwY= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-511-mpTOUV-mMZOmCJ52vNeOqw-1; Tue, 05 Mar 2024 15:00:53 -0500 X-MC-Unique: mpTOUV-mMZOmCJ52vNeOqw-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-51313b50f1bso102852e87.0 for ; Tue, 05 Mar 2024 12:00:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709668851; x=1710273651; 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=YtjaFvGLiucsb6hE7VLOKYjEsU3faU0NXLKz7EfkUyg=; b=AbgzHbvRSqAPDQcMisE36gzX15HXVMqZWatyL/LUvdHwQxYWSt9kaUlIokWCGY+Owv CM/wks7OsypdNJXUrPLmC59u+PfWxAqopT97UnRF8JJtpzJ8Bj4l9hp9ZUL7r9SS04cl MpnE7GJ1+DJsI5s4UelMIS0IRdKYswIp/xYllpAHbBG1LdAWkPy3tdX8GnxciytlKcTC uS4fhBGWUdRN/zmR1do8N7ijkgzCYwd+ps2QBV5s00SsrQciy2K1Xthn87VF0AWxkgCp cYaLP0ODPDl7ZJquaqkrBupPHZEFVjc9UbJ/Tna0Z15Y48HTkHXinQdofF8pmND2kiky +ylA== X-Gm-Message-State: AOJu0YyRiUHx6jUDdxgk8A/HfIjia84VW7u4W+3/MvuipQffTVzcYJkJ QjPguPdey2mbrxq0xuGKYSZxzV7kuQPg92V5vZbgD75Fd6qBOpfEIWOXEYko2DAA/fbs4tqoPAJ ty6vch3SdT0Irm486rWnJF3tIiAwkycsaBRSTDaeP32+la1jRShuLHSd/Cjs3Dx29ZVPsm9NCMY nqcSt44N3PTSw2zlw= X-Received: by 2002:a05:6512:6d3:b0:512:d6b6:dc44 with SMTP id u19-20020a05651206d300b00512d6b6dc44mr2493815lff.66.1709668850981; Tue, 05 Mar 2024 12:00:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFCTt+FsCbD2bDedTxmGiJxwFdR8Kf1Q5nEQZYaBKkyA4c8hXwt6x26l3BkRI6yQS3CtVN0dxM736FEHyiGviA= X-Received: by 2002:a05:6512:6d3:b0:512:d6b6:dc44 with SMTP id u19-20020a05651206d300b00512d6b6dc44mr2493799lff.66.1709668850619; Tue, 05 Mar 2024 12:00:50 -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> <1709574764-9041-9-git-send-email-roretzla@linux.microsoft.com> <20240305173717.GA18937@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> In-Reply-To: <20240305173717.GA18937@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> From: David Marchand Date: Tue, 5 Mar 2024 21:00:38 +0100 Message-ID: Subject: Re: [PATCH v7 08/39] mbuf: 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 On Tue, Mar 5, 2024 at 6:37=E2=80=AFPM Tyler Retzlaff wrote: > > > diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h > > > index 5688683..917a811 100644 > > > --- a/lib/mbuf/rte_mbuf_core.h > > > +++ b/lib/mbuf/rte_mbuf_core.h > > > @@ -463,7 +463,7 @@ enum { > > > /** > > > * The generic rte_mbuf, containing a packet mbuf. > > > */ > > > -struct rte_mbuf { > > > +struct __rte_cache_aligned rte_mbuf { > > > RTE_MARKER cacheline0; > > > > > > void *buf_addr; /**< Virtual address of segment buf= fer. */ > > > @@ -476,7 +476,7 @@ struct rte_mbuf { > > > * same mbuf cacheline0 layout for 32-bit and 64-bit. This ma= kes > > > * working on vector drivers easier. > > > */ > > > - rte_iova_t buf_iova __rte_aligned(sizeof(rte_iova_t)); > > > + alignas(sizeof(rte_iova_t)) rte_iova_t buf_iova; > > > #else > > > /** > > > * Next segment of scattered packet. > > > @@ -662,7 +662,7 @@ struct rte_mbuf { > > > uint16_t timesync; > > > > > > uint32_t dynfield1[9]; /**< Reserved for dynamic fields. */ > > > -} __rte_cache_aligned; > > > +}; > > > > I probably missed the discussion, but why is cacheline1 not handled in > > this patch? > > I was expecting a: > > - RTE_MARKER cacheline1 __rte_cache_min_aligned; > > + alignas(RTE_CACHE_LINE_MIN_SIZE) RTE_MARKER cacheline1; > > I should have replaced it I just missed it. Could I get you to fix it up? > We have 2 options. > > 1. You can leave it as is, eventually the other series I have dealing > with the markers I will probably remove the cacheline1 marker anyway. > > 2. You could adjust it as you've identified above, just move alignas > before the field type and name. I like consistency, let's go with option 2. I'll adjust as I mentionned, no need for a v8. I already tested it in my builds. Thanks. --=20 David Marchand