From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id B072B41D86;
	Sun, 26 Feb 2023 23:23:45 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 4F3A840691;
	Sun, 26 Feb 2023 23:23:45 +0100 (CET)
Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com
 [209.85.217.48]) by mails.dpdk.org (Postfix) with ESMTP id B01234021D
 for <dev@dpdk.org>; Sun, 26 Feb 2023 23:23:43 +0100 (CET)
Received: by mail-vs1-f48.google.com with SMTP id m10so8203636vso.4
 for <dev@dpdk.org>; Sun, 26 Feb 2023 14:23:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=ItyzrqHY/pidCpa53v4zJm8xYbV5V+kGL1FbCIPBipg=;
 b=nx5hvNZZtp0HQhXTSjhmz6aEN48pEg5iy29KCQyXp3iQ8s9wMa3UJtpFw5nvSSI2GJ
 n1+upREe8J1VjtxS7rFSewhRUURBsSnn0iVqpIDUWM4uqgBdMXHEiAVP8xEAdyQawV8F
 LxAeR105VXXKSn7tqj0wTUZSWllZ0ATIXvWVB+uGr9wSqm9vAQ1YJQhRsI/1u2FftPlR
 RNEb2iGqmC9l9z6E281RWrwSwUzGvHZfkude2AtvfsljgBuIazG0HjfMPpQe07ogcJqc
 DWE2AZDDSQPuv53iqbn+W9RfyASVYEnXqg4SElf15OtcrBrGFurKUHye6e0MTaSJORP7
 wfYg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=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=ItyzrqHY/pidCpa53v4zJm8xYbV5V+kGL1FbCIPBipg=;
 b=E0wXBhzuW75BrmlpyNAmC936ma+pLARLKHuG2LL0iETyFDfWFMiZWPER+XABXz2G/i
 aVIGtJ4lVmL0bAkj0AxsBxLR7zlYsKB6ucZBDY04dWPz6BbDm3bHb2d+akjslgXTC1GJ
 +OsTwf1TbqwB8rZYHzmNAMTKGcJQiMQBqfPMnkWJcywIdxRDBLXzo96+a7AJT5W4xabV
 9u/x6qYVh7SoNnMC8MkXNvY2sF6VtjeI7RYVecDWvGE2LKcAwGDuxFYPKgl6vk3BZbDK
 wpH4j47Xfv9ZdkDhyFHZOw/BJuuOZi/tEVzBpB0nxwCggSXSzJqBLzlTbXnqfmJZaMHX
 lc2A==
X-Gm-Message-State: AO0yUKVjHswOL2tNBrVLvh40RqrSvP2I0vns1l01ms+GS/boYybp9HEf
 VwmFURHhg1xbZXBZ2LndlamAiR2qYMUUjQ4VucA=
X-Google-Smtp-Source: AK7set98ybEZaydqafnMpSpfrfe977C9C+rt4qfzQD9K9V/RemWBFJeZNpaCe43bWR31x4p2YYjG+sKDOjKjE7i5wck=
X-Received: by 2002:a05:6102:31a9:b0:415:48dd:e0b9 with SMTP id
 d9-20020a05610231a900b0041548dde0b9mr6061965vsh.3.1677450222909; Sun, 26 Feb
 2023 14:23:42 -0800 (PST)
MIME-Version: 1.0
References: <20221117050926.136974-1-zhirun.yan@intel.com>
 <20221117050926.136974-5-zhirun.yan@intel.com>
 <CALBAE1M00YMpPz_Q-rYG5YiqhTQ-WS4JyZgW2YX4H4vD3cqS8g@mail.gmail.com>
 <PH8PR11MB6780491838F0BD6499F9F46685A89@PH8PR11MB6780.namprd11.prod.outlook.com>
In-Reply-To: <PH8PR11MB6780491838F0BD6499F9F46685A89@PH8PR11MB6780.namprd11.prod.outlook.com>
From: Jerin Jacob <jerinjacobk@gmail.com>
Date: Mon, 27 Feb 2023 03:53:16 +0530
Message-ID: <CALBAE1NQAFLhC8_4W8HomRP1atUA8YJXWB2E8M2HoOYsCdR8BQ@mail.gmail.com>
Subject: Re: [PATCH v1 04/13] graph: add get/set graph worker model APIs
To: "Yan, Zhirun" <zhirun.yan@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "jerinj@marvell.com" <jerinj@marvell.com>, 
 "kirankumark@marvell.com" <kirankumark@marvell.com>, 
 "ndabilpuram@marvell.com" <ndabilpuram@marvell.com>, "Liang,
 Cunming" <cunming.liang@intel.com>, "Wang, Haiyue" <haiyue.wang@intel.com>
Content-Type: text/plain; charset="UTF-8"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Fri, Feb 24, 2023 at 12:01 PM Yan, Zhirun <zhirun.yan@intel.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Jerin Jacob <jerinjacobk@gmail.com>
> > Sent: Monday, February 20, 2023 9:51 PM
> > To: Yan, Zhirun <zhirun.yan@intel.com>
> > Cc: dev@dpdk.org; jerinj@marvell.com; kirankumark@marvell.com;
> > ndabilpuram@marvell.com; Liang, Cunming <cunming.liang@intel.com>; Wang,
> > Haiyue <haiyue.wang@intel.com>
> > 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 <zhirun.yan@intel.com> wrote:
> > >
> > > Add new get/set APIs to configure graph worker model which is used to
> > > determine which model will be chosen.
> > >
> > > Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> > > Signed-off-by: Cunming Liang <cunming.liang@intel.com>
> > > Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
> > > ---
> > >  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 =
> > > +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.



>
> >
> > > +
> > > +/** 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_ to avoid
> > namespace conflict.
>
> It was used to config the model in app. I can put the string into example.

OK

>
> >
> > > +       RTE_GRAPH_MODEL_DEFAULT = 0,
> > > +#define WORKER_MODEL_RTC "rtc"
> > > +       RTE_GRAPH_MODEL_RTC,
> >
> > Why not RTE_GRAPH_MODEL_RTC = 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 hybrid.

Hybrid is very overloaded term, and it will be confusing (considering
there will be new models in future).
Please pick a word that really express the model working.

> >
> >
> > > +       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.
> >
> > > +};
> >
> > >