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 2C8F541DB5; Thu, 2 Mar 2023 14:58:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1AFDE40E09; Thu, 2 Mar 2023 14:58:58 +0100 (CET) Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) by mails.dpdk.org (Postfix) with ESMTP id 48D3D400D6 for ; Thu, 2 Mar 2023 14:58:56 +0100 (CET) Received: by mail-vs1-f47.google.com with SMTP id f23so22397596vsa.13 for ; Thu, 02 Mar 2023 05:58:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=9xkKb6Og710Jb+MPfUMX7qGnqPivn4eFY8qsrPSD4gY=; b=pL5BckUj3I1BBuD5y2Xuv9d5Fx08US0AMuOFJM/lVpaTvfVDuZOXkjqaZc6SDvcwhV cFeJ2YB726UF4Hw9Qcyo4YXTwMfKcnukA6YokVDkKoNbusAQZHvk45LUFiX/r73eRhg9 U9cETPHb2BulatxPeZcGgb6qjEpbR1BXZlqU/ezFmsiECpkQIiwZOzElmlAD5s+dH3kO PnvDoY3bM38ZGBjiportI14ntkRDWajTlO9SnWIzhioe4vS9NyXDRUcafdUDN5WvrNr+ CklRNVbozZpokN/Y8ZcaJkoExVJpWnmukvEjzpvK3H2UviL6mXbGejwrC9iK5ebpbiJJ +I/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=9xkKb6Og710Jb+MPfUMX7qGnqPivn4eFY8qsrPSD4gY=; b=m47NUEupwKrfiHYtncTnc9PRbFej5kwjbjoxMghxKiVPHxM4VOEj9bxiEIqqCtetZk UgeOuYN7mJBqcSl2aZ/RosVkwPvQNtCTTMEI9FX/teRhY28hj2sqBagkUVi9cuo0o1nI s905UXjyiFzcHnlUp2SCp51uQ8gQpLR5/hLEPFRji4Kt9ZUtrC/GXURCFdUW/BN1PgfC ekdJZ6s4iHz+wxgMtZJKuFPFT1rll6ixQ+nte72E8/YogHH1+5eTbG7CgMnkSjqm3EI9 esJqxqUdlOepCGOcMDI4mMCu4Wx8LgjIZnmCXMOVu+2/XkGovMfjRtD/6U3lYu6jl2yP A66g== X-Gm-Message-State: AO0yUKUBZDWPraF0jPughLu/GYVZZoJnL6B9YpDNoZBUurkUphfGY76S be/94m8LNhwpo7IQOTazaXB00cYkD8/n0n0UMfg= X-Google-Smtp-Source: AK7set9OQHR2bjFsObwJEd3nfI5X8ihGEaz3DVS5FtIQi00KpGYKyI0bbCxEPBqaS+uoib1Qz03FUMXCMJVkitF4dbs= X-Received: by 2002:a67:f6d5:0:b0:41f:641c:f775 with SMTP id v21-20020a67f6d5000000b0041f641cf775mr6305762vso.3.1677765535550; Thu, 02 Mar 2023 05:58:55 -0800 (PST) MIME-Version: 1.0 References: <20221117050926.136974-1-zhirun.yan@intel.com> <20221117050926.136974-5-zhirun.yan@intel.com> In-Reply-To: From: Jerin Jacob Date: Thu, 2 Mar 2023 19:28:29 +0530 Message-ID: Subject: Re: [PATCH v1 04/13] graph: add get/set graph worker model APIs To: "Yan, Zhirun" Cc: "dev@dpdk.org" , "jerinj@marvell.com" , "kirankumark@marvell.com" , "ndabilpuram@marvell.com" , "Liang, Cunming" , "Wang, Haiyue" 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 Thu, Mar 2, 2023 at 2:09=E2=80=AFPM Yan, Zhirun w= rote: > > > > > -----Original Message----- > > From: Jerin Jacob > > Sent: Monday, February 27, 2023 6:23 AM > > To: Yan, Zhirun > > Cc: dev@dpdk.org; jerinj@marvell.com; kirankumark@marvell.com; > > ndabilpuram@marvell.com; Liang, Cunming ; > > Wang, Haiyue > > Subject: Re: [PATCH v1 04/13] graph: add get/set graph worker model API= s > > > > On Fri, Feb 24, 2023 at 12:01 PM Yan, Zhirun wro= te: > > > > > > > > > > > > > -----Original Message----- > > > > From: Jerin Jacob > > > > Sent: Monday, February 20, 2023 9:51 PM > > > > To: Yan, Zhirun > > > > Cc: dev@dpdk.org; jerinj@marvell.com; kirankumark@marvell.com; > > > > ndabilpuram@marvell.com; Liang, Cunming ; > > > > Wang, Haiyue > > > > Subject: Re: [PATCH v1 04/13] graph: add get/set graph worker model > > > > APIs > > > > > > > > On Thu, Nov 17, 2022 at 10:40 AM Zhirun Yan > > wrote: > > > > > > > > > > Add new get/set APIs to configure graph worker model which is use= d > > > > > to determine which model will be chosen. > > > > > > > > > > Signed-off-by: Haiyue Wang > > > > > Signed-off-by: Cunming Liang > > > > > Signed-off-by: Zhirun Yan > > > > > --- > > > > > lib/graph/rte_graph_worker.h | 51 > > +++++++++++++++++++++++++++++ > > > > > lib/graph/rte_graph_worker_common.h | 13 ++++++++ > > > > > lib/graph/version.map | 3 ++ > > > > > 3 files changed, 67 insertions(+) > > > > > > > > > > diff --git a/lib/graph/rte_graph_worker.h > > > > > b/lib/graph/rte_graph_worker.h index 54d1390786..a0ea0df153 > > 100644 > > > > > --- a/lib/graph/rte_graph_worker.h > > > > > +++ b/lib/graph/rte_graph_worker.h > > > > > @@ -1,5 +1,56 @@ > > > > > #include "rte_graph_model_rtc.h" > > > > > > > > > > +static enum rte_graph_worker_model worker_model =3D > > > > > +RTE_GRAPH_MODEL_DEFAULT; > > > > > > > > This will break the multiprocess. > > > > > > Thanks. I will use TLS for per-thread local storage. > > > > If it needs to be used from secondary process, then it needs to be from > > memzone. > > > > > This filed will be set by primary process in initial stage, and then lcor= e will only read it. > I want to use RTE_DEFINE_PER_LCORE to define the worker model here. It se= ems > not necessary to allocate from memzone. > > > > > > > > > > > > > > > > > + > > > > > +/** Graph worker models */ > > > > > +enum rte_graph_worker_model { > > > > > +#define WORKER_MODEL_DEFAULT "default" > > > > > > > > Why need strings? > > > > Also, every symbol in a public header file should start with RTE_ t= o > > > > avoid namespace conflict. > > > > > > It was used to config the model in app. I can put the string into exa= mple. > > > > OK > > > > > > > > > > > > > > + RTE_GRAPH_MODEL_DEFAULT =3D 0, #define WORKER_MODEL_RTC > > > > > +"rtc" > > > > > + RTE_GRAPH_MODEL_RTC, > > > > > > > > Why not RTE_GRAPH_MODEL_RTC =3D RTE_GRAPH_MODEL_DEFAULT in > > enum > > > > itself. > > > Yes, will do in next version. > > > > > > > > > > > > +#define WORKER_MODEL_GENERIC "generic" > > > > > > > > Generic is a very overloaded term. Use pipeline here i.e > > > > RTE_GRAPH_MODEL_PIPELINE > > > > > > Actually, it's not a purely pipeline mode. I prefer to change to hybr= id. > > > > Hybrid is very overloaded term, and it will be confusing (considering t= here > > will be new models in future). > > Please pick a word that really express the model working. > > > > In this case, the path is Node0 -> Node1 -> Node2 -> Node3 > And Node1 and Node3 are binding with one core. > > Our model offers the ability to dispatch between cores. > > Do you think RTE_GRAPH_MODEL_DISPATCH is a good name? Some names, What I can think of // MCORE->MULTI CORE RTE_GRAPH_MODEL_MCORE_PIPELINE or RTE_GRAG_MODEL_MCORE_DISPATCH or RTE_GRAG_MODEL_MCORE_RING or RTE_GRAPH_MODEL_MULTI_CORE > > + - - - - - -+ +- - - - - - - - - - - - - + + - - - - - -+ > ' Core #0 ' ' Core #1 Core #1 ' ' Core #2 ' > ' ' ' ' ' ' > ' +--------+ ' ' +--------+ +--------+ ' ' +--------+ ' > ' | Node-0 | - - - ->| Node-1 | | Node-3 |<- - - - | Node-2 | ' > ' +--------+ ' ' +--------+ +--------+ ' ' +--------+ ' > ' ' ' | ' ' ^ ' > + - - - - - -+ +- - -|- - - - - - - - - - + + - - -|- - -+ > | | > + - - - - - - - - - - - - - - - - + > > > > > > > > > > > > > > > + RTE_GRAPH_MODEL_GENERIC, > > > > > + RTE_GRAPH_MODEL_MAX, > > > > > > > > No need for MAX, it will break the ABI for future. See other > > > > subsystem such as cryptodev. > > > > > > Thanks, I will change it. > > > > > > > > > +}; > > > > > > > > >