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 2E2D142865; Wed, 29 Mar 2023 17:35:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2022A40EDF; Wed, 29 Mar 2023 17:35:31 +0200 (CEST) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id B376C400D6 for ; Wed, 29 Mar 2023 17:35:29 +0200 (CEST) Received: by mail-pj1-f43.google.com with SMTP id qe8-20020a17090b4f8800b0023f07253a2cso16513206pjb.3 for ; Wed, 29 Mar 2023 08:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; t=1680104129; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=52DqqCWKC7IVmAeE/YBTQkHwgUU8W1NjeDuu9evgJdA=; b=PUmHnRWc0S0g/h4X5UVNQTNT331ukslmEvsgKuUVeonxo3C8Nm0hnq8p01eF/F5rDY Ozi2wso54ZD0oISYbC1GkRDmI3XrtM7TibEReUYU80HIJReBkzCF91Tcp9wrKbXZNTIn l4HBTm4EJsnL0slORR3zyWBEDdK9Yl5TEBMuMBOMlxpTi/N5CdInblw4HipcgoDaU617 NSb1PUpuKxX1ZjmIictUzbK0KvRqSUzD88IYwZcW6IU3efBsfruGpckkjWdEaeXi/ySP LSxIWZB7YK+D31IcsF1T9pLPnOY138DmdXa8VM5Lpr9xg/iGDz37DEAJO378ubOq98KG wTjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680104129; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=52DqqCWKC7IVmAeE/YBTQkHwgUU8W1NjeDuu9evgJdA=; b=CBujfAJw0vj9E9RW8QCfNPSGdh+4AZLvyFLkV+eATIcXdN+K0t7oCPUlfOWlvdh6B8 Qb2tICv4RGWGFgGM6jQlB4ZQ4Uoz/Sv1S40iXYqETMgQClOFpR87CdA4231zlUwk7FGy R18uojXFbQllFqFDpvASNtkgx92W+xZFPfh/TlCo+pgWmhaTYb3903v9r0jkV3wfIXci UCN0QNEsGm78V742RbcYPNYae95Fb44dZPKNam6keeIt5IZk/0B7zjDgq3uJE94lIzcN NO0l3ASuIUEGFxJ3VDEUomMHKRf5oFocDJa+eKzgL7WO9aUE4a47uyYUOU+4l0C6VvgE h2bQ== X-Gm-Message-State: AO0yUKXJrR1IM+7NyqARazdGAj0Ih8tnBEmblbSgC6gwnUe8QbMauASY Kgh7v69kLm7S93727tHpPYgKlxK7n0xSPZWKFcdArg== X-Google-Smtp-Source: AK7set8G4cm5Frq7nUR1PNeZPEzNJ7HIIxifZbS8IUOfOrBLdAw3VkZewL5GWTROPzXREm182F9D1A== X-Received: by 2002:a05:6a20:3a9f:b0:d9:1aed:a05b with SMTP id d31-20020a056a203a9f00b000d91aeda05bmr17451608pzh.50.1680104128626; Wed, 29 Mar 2023 08:35:28 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id c26-20020aa781da000000b0062d7fa4b618sm6622492pfn.175.2023.03.29.08.35.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 08:35:28 -0700 (PDT) Date: Wed, 29 Mar 2023 08:35:26 -0700 From: Stephen Hemminger To: Zhirun Yan Cc: dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com, ndabilpuram@marvell.com, cunming.liang@intel.com, haiyue.wang@intel.com Subject: Re: [PATCH v3 04/15] graph: add get/set graph worker model APIs Message-ID: <20230329083526.1f0c62e6@hermes.local> In-Reply-To: <20230329064340.2550530-5-zhirun.yan@intel.com> References: <20230324021622.1369006-1-zhirun.yan@intel.com> <20230329064340.2550530-1-zhirun.yan@intel.com> <20230329064340.2550530-5-zhirun.yan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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, 29 Mar 2023 15:43:29 +0900 Zhirun Yan wrote: > + > +/** > + * @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. > + */ > +inline int > +rte_graph_worker_model_set(enum rte_graph_worker_model model) > +{ > + if (model >= RTE_GRAPH_MODEL_LIST_END) > + goto fail; > + > + RTE_PER_LCORE(worker_model) = model; > + return 0; > + > +fail: > + RTE_PER_LCORE(worker_model) = RTE_GRAPH_MODEL_DEFAULT; > + return -1; > +} > + Once again, this doesn't have to be inline, could be a real API.