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 AE91141CEC; Mon, 20 Feb 2023 14:51:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F63B4304F; Mon, 20 Feb 2023 14:51:09 +0100 (CET) Received: from mail-vk1-f169.google.com (mail-vk1-f169.google.com [209.85.221.169]) by mails.dpdk.org (Postfix) with ESMTP id 1C44B4304C for ; Mon, 20 Feb 2023 14:51:09 +0100 (CET) Received: by mail-vk1-f169.google.com with SMTP id n140so1141892vkf.9 for ; Mon, 20 Feb 2023 05:51:09 -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=mmLcYOwr7pwxVDYZxh8RwUxmye74TcCjDX6ENl1a258=; b=HBXQM39yx2f0P0nuDLlaKCWDJzjkH1PikHJTGzXK15dhCeJSm3xIj+cEY4p1NRHp+Q 6iYvRT1fO9hqvX6Cvjem+6NEIEt2v1OjcRju3lvvKDoyE0YyXDk9+bUhLfx3ii2Sr2Pd /YHI9ic4L/6amkRKgmIiApjvZxMr56r6Jrs+LMVXqwjUVWvWtKYA1laZDejw7pEckbWb cc6uBuhEnWTulz1hJhgL6Nzl59FNguXeqrVvRUIgxeOgmPcrApd1LPhC/7fL7K8ZDPen Actdgkfzt0fsvmUucELmh/KwYycwzUEVLaxHTq0R2jMXHRJj3icwn2wDW6tnGcVsTXx9 bs9g== 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=mmLcYOwr7pwxVDYZxh8RwUxmye74TcCjDX6ENl1a258=; b=yOVX6GMkRX0lxbPYOqj7WFVKeQdeWrfIMt6eXub0e4SOAGdwrKbqN7/AvAz34Wy190 X2P7LHAys3tzxTu3K+MTO80Vp0jW3S0MYacAqpzCUEEIkfnWCOTlIwsttVTUXERkqtIT fBBGjLut5hkEMi+U5dB82ofVvdH2zzz0RHZzqain15iCGzR198gCVKGreSnBwkOZj8lg pxIonUSfdhAx5aimcKSnpPNiHd51/zVVi0BUoEg3E+6pGtKl82al3LsnR1iY1FlJdP22 ofChNPOf5EMdTX+uG4lJGzULJ9I0OGYwTMHMGccehKFuD80vaefsAaAsBqIGQUw9L6Hr hb2w== X-Gm-Message-State: AO0yUKVki/Z8kGpc0eXGEW7OR+AXwigP0W1asITmpVVhZmpGyg71qDtW 2s449n2aFF7m2EBmp0BYO4pAHXR5LV/Ge8sZHfk= X-Google-Smtp-Source: AK7set9lIusgjtGr+ohCtPgProvNaeRcJfNES9pMxhFCzsVn/75E0Ix0WA8Zq1MVFSXGRMBXQDfA6d65PQTOZOklL+4= X-Received: by 2002:a1f:a3c8:0:b0:40b:9:82fd with SMTP id m191-20020a1fa3c8000000b0040b000982fdmr470097vke.18.1676901068350; Mon, 20 Feb 2023 05:51:08 -0800 (PST) MIME-Version: 1.0 References: <20221117050926.136974-1-zhirun.yan@intel.com> <20221117050926.136974-5-zhirun.yan@intel.com> In-Reply-To: <20221117050926.136974-5-zhirun.yan@intel.com> From: Jerin Jacob Date: Mon, 20 Feb 2023 19:20:42 +0530 Message-ID: Subject: Re: [PATCH v1 04/13] graph: add get/set graph worker model APIs To: Zhirun Yan Cc: dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com, ndabilpuram@marvell.com, cunming.liang@intel.com, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Nov 17, 2022 at 10:40 AM Zhirun Yan 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 > 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 = RTE_GRAPH_MODEL_DEFAULT; This will break the multiprocess. > + > +/** 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. > + 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. > +#define WORKER_MODEL_GENERIC "generic" Generic is a very overloaded term. Use pipeline here i.e RTE_GRAPH_MODEL_PIPELINE > + 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. > +}; >