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 D24CDA00C2; Thu, 8 Dec 2022 08:26:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7157D40E28; Thu, 8 Dec 2022 08:26:56 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 0679740DDC for ; Thu, 8 Dec 2022 08:26:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670484414; x=1702020414; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ii22SzxhPvLMOf/b+XgOJT9vW0N+uMnhMVTcDgGSI8I=; b=PzPrFLRlU3IhmicfNt07sttauhyyevb8qqKdlIaIqgOHxZFrfprV/8BA BODBZcoJMbUbpAW5T6F39HajZhRPCSKv8+rcNKuLfxDMrF04gh34ugYz0 Z9O/7Sbnz7jbvA+aEH/WnFW8lcSVIXkxfHnVjiL1S1yPphjD+Ql0w/9de XoP0Uq42ZqOV4O/A+gk3umOopXtncswgaW57RWY2cJP61kvsJ4lp4wcVv 2eSjgqN5W7dMoiQ0n3S9tXXnt1XSaqPqo3Xl5GAyNSBIJK0bbq4sjcO8x IANLAANGD166gsQ3z8XsdWzbMd8wSu+8SgXB7GVk8PfpBTWONx6AvwVdZ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10554"; a="317108987" X-IronPort-AV: E=Sophos;i="5.96,227,1665471600"; d="scan'208";a="317108987" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2022 23:26:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10554"; a="710358433" X-IronPort-AV: E=Sophos;i="5.96,227,1665471600"; d="scan'208";a="710358433" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga008.fm.intel.com with ESMTP; 07 Dec 2022 23:26:52 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 7 Dec 2022 23:26:52 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 7 Dec 2022 23:26:52 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Wed, 7 Dec 2022 23:26:52 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.172) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Wed, 7 Dec 2022 23:26:52 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PevJ9RRZDh++mO1lCziSK5JcORpTQ3YikWhhnLRTqjmHwe6UHWmdrM8o2uwPSyMyP6mASRIvMHuG6bLkmP//radMB8cybKY72W+2W6dEDNAERzYbQWmZNun2RDPBkqqAf/h7qDXox6tNBg939VDBP57QjoL+lLShNGv9aWAh803VjJgdxmzAU+eMOwSyShCjtdaOH2Q0iYWncLFvvjc60pjbiA8F01lRXKBIFfilQB1gtXBaTtX7/aTU9jyxWDJU1sD5PTM5NFbbaMWwQG+v5mbiYbdiu2fNvyriX0Jk3ZirzCw7bZhoRjlomwH6mkNik7j/ZDpxbeFpZNNtqS468A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=D1KdPxBkY5M8cZuDDsgW5psNz0fb8g58akZfcJaNvH4=; b=bWUOfuYKpF26oZ7QP9OUHSgbYewpPEhDlkIEytA/Ki42NECYV3OosuO2Etgb8FR1iyU9I7j3gEQQ0DAexxQMqtZaWxdviMlB2V4RYADEfQSpFfXj+vCVBxQCcjFbqaXG2+Dp+5xODE74xfwD6I5Fe1qW6nIWGjhheeOH6QMryBtFkpTmO2OPGSZiWJothuFAqTnoWNqpnMoylo59kSBZeEzl2bMJfRWw81W3lEfj1Z94OeIMLCklvtFrHXj/nYp0S5vDYgFWME2Pm5ZoG4OMk0G5VDCnXhXvj7Ae7EcobjucekT8IIot7SUwt9ynjqNLGDzU+TWUECurQ1uYCz6zVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SN7PR11MB6775.namprd11.prod.outlook.com (2603:10b6:806:264::21) by SA2PR11MB4793.namprd11.prod.outlook.com (2603:10b6:806:fa::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Thu, 8 Dec 2022 07:26:45 +0000 Received: from SN7PR11MB6775.namprd11.prod.outlook.com ([fe80::9ef4:ede8:f4a8:65c5]) by SN7PR11MB6775.namprd11.prod.outlook.com ([fe80::9ef4:ede8:f4a8:65c5%9]) with mapi id 15.20.5880.014; Thu, 8 Dec 2022 07:26:45 +0000 From: "Yan, Zhirun" To: Kiran Kumar Kokkilagadda , "dev@dpdk.org" , Jerin Jacob Kollanukkaran , "Nithin Kumar Dabilpuram" CC: "Liang, Cunming" , "Wang, Haiyue" Subject: RE: [EXT] [PATCH v1 04/13] graph: add get/set graph worker model APIs Thread-Topic: [EXT] [PATCH v1 04/13] graph: add get/set graph worker model APIs Thread-Index: AQHY+kLWgkMgqLr6UEeRHXQ4cGWTsa5gUvmAgANbcGA= Date: Thu, 8 Dec 2022 07:26:45 +0000 Message-ID: References: <20221117050926.136974-1-zhirun.yan@intel.com> <20221117050926.136974-5-zhirun.yan@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN7PR11MB6775:EE_|SA2PR11MB4793:EE_ x-ms-office365-filtering-correlation-id: cf5d2546-0df1-4bd9-d1b3-08dad8ed8f67 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zBH/GFEgF5fM+tg8MzIg5E/h+Bh0tJyH5TGlzhUoaT2lGwwBGinUh77b9r+fs8pLmGXpyNLmgCl7RYwkhXRV5e6rd3oJGu/HcxceFIyTDhASAWoKrEbaV9NsoSxclgzYDjZEiaHCf/uzHIQvUntkuBgNWs0xImtLC8XoCOmsJTMtzywNJ8nimDFjfKTf4AzfDxHdgLUJzyWj82oXRSBtsfju/YWVXPVlNxnZu9acq/LEHkK88Tnj3HcVShy3+RSGqDjnhzKjdTiANiLcHfKg0Ms2vsh+fQBs0FEFtEPhx1BYgjXiyUTCbk2Zait9wgUcpMR60S4sJY6hzGvuDlNbb+OMnQcSkl+vFkrDuZI4rALMdxq5cQK2zrJd78aPuXIBAV3iuYpSFrZp8ecl+gOs+ZuqmLzBDnEGiGKsIY/4Ax6TxhuIZvoRAIeFbacHVjATcG8zPB17kpHIT3d5shrrASX15TXgT2dbzdPmm6+ctq3Qc5hjabiWuiqICWpkL6M2aZ35zuBD5KPQPYb5FNuuQB59hLWVdvZycLvLEO4xC2/Q9EDCQhGhVj/s0/UEaJB++LYRZ5Jsb10xgrwoyeo8/igFfTtwLHZK9o5rRO6fSDQ5cTHI6S8BIIiBUZ0KNwfWSqq8kLSYOy2pNPLjXE9cJIwnoZDdjRgAfUL798BTrgZ53I96uEgkwY1NqGkpulSQoeFid7jAqK4VXFAK9Kk03A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN7PR11MB6775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(376002)(346002)(39860400002)(136003)(366004)(451199015)(2906002)(8936002)(122000001)(52536014)(38100700002)(64756008)(76116006)(71200400001)(4326008)(66556008)(66476007)(66446008)(41300700001)(83380400001)(86362001)(186003)(5660300002)(8676002)(82960400001)(53546011)(6506007)(316002)(26005)(110136005)(107886003)(7696005)(66946007)(9686003)(55016003)(478600001)(54906003)(33656002)(38070700005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wsFHvuGDjagoCmZlgMiImN+OwOgEjDfzbl86Ky9mN45MolEcr7qLDrfbskqe?= =?us-ascii?Q?BDCvKQA/iWpzwcsTpmBYZMJ/qCW4iqtmPkizxiEIdAM356bKteie9hh+td8S?= =?us-ascii?Q?ov79bwJ96hvpqcNtQANoBW4ynKWJP+zOPSwRcuu0+5Oqx1Fp7kIfjX79KKpa?= =?us-ascii?Q?GES3OccuUIw4RwDZjmgk6/CvimBpsyqjyuCMG8hyaalUX1ay6gJP1NMx8h72?= =?us-ascii?Q?yUowTWbITX5Hgu34xmft7cQ1clhIR3amL+x9OkpciwHkFuwXN+2Jm8l/nUSq?= =?us-ascii?Q?MBZ2lAmGVKjNkzsqI4DGdVenFAH1PK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TfnMubfBbaJdN6gIHMO9UdYqpq8uo4eWTz3Hy1iWoAjrgAoRDO?= =?us-ascii?Q?u6n5i2jjIfvc9C0snEcodysaNdvOWNqlAEztSg2lX8flVrW1Dq2ZrKsvkUA4?= =?us-ascii?Q?kMGOHKR+foVd/yd8dogkzCR/QnMYKjvtFpLqzNykAp6TBRe823mzwM6BQA+Y?= =?us-ascii?Q?Pmf1LISZ7grg3fr0WsvC/tfCxvzi8aDIBbdNexjK2n3LxjCwQlV8T7PRUm4t?= =?us-ascii?Q?fM/ki3ETKu9EeQ6Sqgj30IRdZ82kyCdqrULDKxEgfk3HLYpY4CS4kxO3Rrqb?= =?us-ascii?Q?Gv2wg65Fcc073ZUKaJFYeVYAqkiexq7/daGGPJi1BEsBE6OiRx09U15x/RId?= =?us-ascii?Q?LQOfshXnUos0i942otU6Av8MlHvaD0gG49ga4yJs?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB6775.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf5d2546-0df1-4bd9-d1b3-08dad8ed8f67 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Dec 2022 07:26:45.0828 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: KKfAiiskxDUDA2ruyqTCPI0OhDo00EFeBN9AGChGCICMnYRxguZ3WNGTgWk4XAAMza3gDcaNKs+HIRbdPyllKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4793 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: Kiran Kumar Kokkilagadda > Sent: Tuesday, December 6, 2022 11:35 AM > To: Yan, Zhirun ; dev@dpdk.org; Jerin Jacob > Kollanukkaran ; Nithin Kumar Dabilpuram > > Cc: Liang, Cunming ; Wang, Haiyue > > Subject: RE: [EXT] [PATCH v1 04/13] graph: add get/set graph worker model > APIs >=20 >=20 >=20 > > -----Original Message----- > > From: Zhirun Yan > > Sent: 17 November 2022 10:39 AM > > To: dev@dpdk.org; Jerin Jacob Kollanukkaran ; > > Kiran Kumar Kokkilagadda ; Nithin Kumar > > Dabilpuram > > Cc: cunming.liang@intel.com; haiyue.wang@intel.com; Zhirun Yan > > > > Subject: [EXT] [PATCH v1 04/13] graph: add get/set graph worker model > > APIs > > > > External Email > > > > ---------------------------------------------------------------------- > > 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 =3D > > +RTE_GRAPH_MODEL_DEFAULT; > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this API may change, or be removed, without prior > > +notice > > + * Set the graph worker model > > + * > > + * @note This function does not perform any locking, and is only safe = to > call > > + * before graph running. > > + * > > + * @param name > > + * Name of the graph worker model. > > + * > > + * @return > > + * 0 on success, -1 otherwise. > > + */ > > +__rte_experimental > > +static inline int > > +rte_graph_worker_model_set(enum rte_graph_worker_model model) { > > + if (model >=3D RTE_GRAPH_MODEL_MAX) > > + goto fail; > > + > > + worker_model =3D model; > > + return 0; > > + > > +fail: > > + worker_model =3D RTE_GRAPH_MODEL_DEFAULT; > > + return -1; > > +} > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this API may change, or be removed, without prior > > +notice > > + * > > + * Get the graph worker model > > + * > > + * @param name > > + * Name of the graph worker model. > > + * > > + * @return > > + * Graph worker model on success. > > + */ > > +__rte_experimental > > +static inline > > +enum rte_graph_worker_model > > +rte_graph_worker_model_get(void) > > +{ > > + return worker_model; > > +} > > + > > /** > > * Perform graph walk on the circular buffer and invoke the process > function > > * of the nodes and collect the stats. > > diff --git a/lib/graph/rte_graph_worker_common.h > > b/lib/graph/rte_graph_worker_common.h > > index df33204336..507a344afd 100644 > > --- a/lib/graph/rte_graph_worker_common.h > > +++ b/lib/graph/rte_graph_worker_common.h > > @@ -86,6 +86,19 @@ struct rte_node { > > struct rte_node *nodes[] __rte_cache_min_aligned; /**< Next nodes. > > */ } __rte_cache_aligned; > > > > + > > + > > +/** Graph worker models */ > > +enum rte_graph_worker_model { > > +#define WORKER_MODEL_DEFAULT "default" > > + RTE_GRAPH_MODEL_DEFAULT =3D 0, > > +#define WORKER_MODEL_RTC "rtc" > > + RTE_GRAPH_MODEL_RTC, >=20 > Since default is RTC, do we need one more enum for RTC? Can we just have > default and generic and remove rtc? >=20 Thanks for your comments. Actually, there are two kinds of user, professional user and normal. For professional users, If app chose RTC or GENERIC, it means that there is= a specific requirement for worker model. And the default is for normal users who don't care the model. Also, in the future, if more worker model added, RTC will be more clear to = describe this model rather than default.=20 > > +#define WORKER_MODEL_GENERIC "generic" > > + RTE_GRAPH_MODEL_GENERIC, > > + RTE_GRAPH_MODEL_MAX, > > +}; > > + > > /** > > * @internal > > * > > diff --git a/lib/graph/version.map b/lib/graph/version.map index > > 13b838752d..eea73ec9ca 100644 > > --- a/lib/graph/version.map > > +++ b/lib/graph/version.map > > @@ -43,5 +43,8 @@ EXPERIMENTAL { > > rte_node_next_stream_put; > > rte_node_next_stream_move; > > > > + rte_graph_worker_model_set; > > + rte_graph_worker_model_get; > > + > > local: *; > > }; > > -- > > 2.25.1