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 B6EC042B82; Tue, 23 May 2023 17:16:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D70940A80; Tue, 23 May 2023 17:16:13 +0200 (CEST) Received: from mail-vk1-f182.google.com (mail-vk1-f182.google.com [209.85.221.182]) by mails.dpdk.org (Postfix) with ESMTP id 382F440689 for ; Tue, 23 May 2023 17:16:11 +0200 (CEST) Received: by mail-vk1-f182.google.com with SMTP id 71dfb90a1353d-45700c4b74dso3442707e0c.0 for ; Tue, 23 May 2023 08:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684854970; x=1687446970; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PSv96iLkqWOyInds8WUWwVia//qk+G3AjVoS51SIplM=; b=Ma01xY7gNKOxlwZ3lzkTn/IL/y9OSrRi+PvRdo8fM97pl5Qb7+LZqqcOh0zHyS/4Iq O/gtCPBYGelT37CS6Nyaa+mRiubDLD0YdiOwFn+ZVKBVmmX89kMb+2hhMZlyXO5u8Ipz +Z4Hvb/udK8JY4Vsday7ZrJUYs5adUIe/kzsHK9lnUes/W1kq1VuHkOazqdRmjL4YGQ3 NCXzqI092ocswfYx3hrELw7+lGR6IofZPskdmyDdW9O2U1KT3YN4nrgI32xz7+60h4HX gvudjfU1SS+71m/fp+KYQmcebPgYCrF36E6fo6QKfgp6SHvW9vKsoZ86vecXQw3W5Dqs wMnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684854970; x=1687446970; 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=PSv96iLkqWOyInds8WUWwVia//qk+G3AjVoS51SIplM=; b=l62t9KfIBhQNEhSS08cvUrZQZeWnhEJ8cs/BEQn5l5JyDncw2/2f+DHJGiipm9HMKG kLxnsC3ffRu7YYiGebSEaqJeETA6T2FfV7LjDWTKIrqvygev+zV0Jup5SzcPWe8pcAM+ wjpDm8PeRmjPvNdBUwIxlMIwHGC3Ogbb1Wj5FucnPAKUdjO2bYkeHP5kiwcaPEvq16TC JWnN3CCqdRfyJi4R6TagfAzxSoi1/IKSO2nVMLxOQAmFMs1ImGbtMNPt9yzQxCH70+9d TGDV0bL9GjSzCxDaB0fSG04ILWCfOP13d43BTQsHOG8NCupjDebzJ9qfGck5Nx/nDS5O oRJQ== X-Gm-Message-State: AC+VfDxyp+kxAPhRJnJu8us83LTSy2SL1/MGLtuWqfxaKsI75E1tQ82B WjaeF4teNR4atbqyvZOxW3RK9RO3zd4BvwSJBGM= X-Google-Smtp-Source: ACHHUZ7Qk0jgKePAWRgHWxUMRx28pXX6BIr4XcStrjthMuHvSYAxNKch4QbWCTYNu/eVy/8ndpLjo0GfuVtWT2MrDVY= X-Received: by 2002:a67:fb0c:0:b0:434:9021:30c1 with SMTP id d12-20020a67fb0c000000b00434902130c1mr4370585vsr.14.1684854970441; Tue, 23 May 2023 08:16:10 -0700 (PDT) MIME-Version: 1.0 References: <20230418104547.547084-1-sivaprasad.tummala@amd.com> <8f006152-7cb7-6fc8-22e6-5187d7611430@ericsson.com> <98CBD80474FA8B44BF855DF32C47DC35D87890@smartserver.smartshare.dk> <5e726b4e-66eb-0b0c-59cb-04b9bf97fdb2@ericsson.com> <98CBD80474FA8B44BF855DF32C47DC35D8792A@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D8792A@smartserver.smartshare.dk> From: Jerin Jacob Date: Tue, 23 May 2023 20:45:44 +0530 Message-ID: Subject: Re: [PATCH] eventdev: fix alignment padding To: =?UTF-8?Q?Morten_Br=C3=B8rup?= Cc: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , Sivaprasad Tummala , jerinj@marvell.com, dev@dpdk.org 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 Wed, May 17, 2023 at 7:05=E2=80=AFPM Morten Br=C3=B8rup wrote: > > > From: Jerin Jacob [mailto:jerinjacobk@gmail.com] > > Sent: Wednesday, 17 May 2023 15.20 > > > > On Tue, Apr 18, 2023 at 8:46=E2=80=AFPM Mattias R=C3=B6nnblom > > wrote: > > > > > > On 2023-04-18 16:07, Morten Br=C3=B8rup wrote: > > > >> From: Mattias R=C3=B6nnblom [mailto:mattias.ronnblom@ericsson.com] > > > >> Sent: Tuesday, 18 April 2023 14.31 > > > >> > > > >> On 2023-04-18 12:45, Sivaprasad Tummala wrote: > > > >>> fixed the padding required to align to cacheline size. > > > >>> > > > >> > > > >> What's the point in having this structure cache-line aligned? Fals= e > > > >> sharing is a non-issue, since this is more or less a read only str= uct. > > > >> > > > >> This is not so much a comment on your patch, but the __rte_cache_a= ligned > > > >> attribute. > > > > > > > > When the structure is cache aligned, an individual entry in the arr= ay does > > not unnecessarily cross a cache line border. With 16 pointers and align= ed, it > > uses exactly two cache lines. If unaligned, it may span three cache lin= es. > > > > > > > An *element* in the reserved uint64_t array won't span across two cac= he > > > lines, regardless if __rte_cache_aligned is specified or not. You wou= ld > > > need a packed struct for that to occur, plus the reserved array field > > > being preceded by some appropriately-sized fields. > > > > > > The only effect __rte_cache_aligned has on this particular struct is > > > that if you instantiate the struct on the stack, or as a static > > > variable, it will be cache-line aligned. That effect you can get by > > > specifying the attribute when you define the variable, and you will s= ave > > > some space (by having smaller elements). In this case it doesn't matt= er > > > if the array is compact or not, since an application is likely to onl= y > > > use one of the members in the array. > > > > > > It also doesn't matter of the struct is two or three cache lines, as > > > long as only the first two are used. > > > > > > Discussions stalled at this point. > > Not stalled at this point. You seem to have missed my follow-up email cla= rifying why cache aligning is relevant: > http://inbox.dpdk.org/dev/98CBD80474FA8B44BF855DF32C47DC35D87897@smartser= ver.smartshare.dk/ > > But the patch still breaks the ABI, and thus should be postponed to 23.11= . Yes. > > > > > Hi Shiva, > > > > Marking this patch as rejected. If you think the other way, Please > > change patchwork status and let's discuss more here. > > I am not taking any action regarding the status of this patch. I will lea= ve that decision to Jerin and Shiva. It is good to merge. Shiva, Please send ABI change notice for this for 23.11 NOW. Once it is Acked and merged. I will merge the patch for 23.11 release. I am marking the patch as DEFERRED in patchwork and next release window it will come as NEW in patchwork. > > > > > > > > > > > > > >> > > > >>> Fixes: 54f17843a887 ("eventdev: add port maintenance API") > > > >>> Cc: mattias.ronnblom@ericsson.com > > > >>> > > > >>> Signed-off-by: Sivaprasad Tummala > > > >>> --- > > > >>> lib/eventdev/rte_eventdev_core.h | 2 +- > > > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > > > >>> > > > >>> diff --git a/lib/eventdev/rte_eventdev_core.h > > > >> b/lib/eventdev/rte_eventdev_core.h > > > >>> index c328bdbc82..c27a52ccc0 100644 > > > >>> --- a/lib/eventdev/rte_eventdev_core.h > > > >>> +++ b/lib/eventdev/rte_eventdev_core.h > > > >>> @@ -65,7 +65,7 @@ struct rte_event_fp_ops { > > > >>> /**< PMD Tx adapter enqueue same destination function. */ > > > >>> event_crypto_adapter_enqueue_t ca_enqueue; > > > >>> /**< PMD Crypto adapter enqueue function. */ > > > >>> - uintptr_t reserved[6]; > > > >>> + uintptr_t reserved[5]; > > > >>> } __rte_cache_aligned; > > > >>> > > > >>> extern struct rte_event_fp_ops rte_event_fp_ops[RTE_EVENT_MAX_= DEVS]; > > > > > > >