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 5098142C4C; Wed, 7 Jun 2023 10:15:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F56340A84; Wed, 7 Jun 2023 10:15:57 +0200 (CEST) Received: from mail-ua1-f52.google.com (mail-ua1-f52.google.com [209.85.222.52]) by mails.dpdk.org (Postfix) with ESMTP id 4E4B540698 for ; Wed, 7 Jun 2023 10:15:56 +0200 (CEST) Received: by mail-ua1-f52.google.com with SMTP id a1e0cc1a2514c-78400319b0eso1687716241.2 for ; Wed, 07 Jun 2023 01:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686125755; x=1688717755; 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=AZP9eHeKZoMg4BqZsZ3bIA1grKqPfkCYIoEfOnTrakc=; b=S3zjw7Pi7g7PMHrOS0mxmu8IJs96oliypsodlXDeIsQyas/6lnV1YlQNxUaGW3rB2F zg8+IHV1Mp9XjJAZCTQFflsFiNelAevEvX7V5yxhaZY6Tw7YmtJB8OzzvPcyu26VKslI AzIpY/zje6LudCDncl5b6maaiWUSk1aGqRi7mg1MHCWOOyEQUIiwGe8uRO8udTeE5skW ZfDJsi+HKnjohmcCEsaAysbTOtVwrFr6553nSpbIaqmoz16JyOpQAcZx2f6Hm6piSko9 cFHVbmx6whLzs9iFZUlYrMrK6As/Og5TAze0eQiRLvYjpJVUEOK9/VIz48qR/tdu+e6k 3plQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686125755; x=1688717755; 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=AZP9eHeKZoMg4BqZsZ3bIA1grKqPfkCYIoEfOnTrakc=; b=aaIFoyJtXG7bBx/2pfY97ri6zAPhF7a1a9HyGZCIV1G3/LN7T0tMZp4KNlC7mGDfr2 NBvotGZByFE1lBoDDBfRkohR8fCGNSjGbRp2HoF86uCaJwHHQyrIA3IRSzDomIPhA/4o BKhx3EkMC40OJT7zdDDhEm1apvGc7UXox04p08oCqvId37h0YbB/lbbSX2v65OzHoqDv A/kxr694dwCrMr9hOT1n/34kiTRe+qi+wzI27Dk7ot+Lo7kzEDjZW6vPVlir5lzbv2UF rC6WGFiWkUXQvPWhanQ5JZJ4F6+PRA77DsbJsgC6HytKnwdE8ftRP+YnNOeOf1vK1eEu onqA== X-Gm-Message-State: AC+VfDzbYywGDyWpNE08fYfPWIgAZZfcFm+WnF36rrE9R+CokSlEvx87 Q+rrxP6JB2+nktD9ARa+xgSWaF2WRxsv2ojfjp0= X-Google-Smtp-Source: ACHHUZ4VilKRVbish0m0pDX2d/vLPntriQQeAGF0bHG7Kf5DAiWfTiFcEDNDkZkDt+dBW/Slh6CyazKbHdMwHleyXbQ= X-Received: by 2002:a67:ff92:0:b0:43c:d5c5:2736 with SMTP id v18-20020a67ff92000000b0043cd5c52736mr583679vsq.31.1686125755554; Wed, 07 Jun 2023 01:15:55 -0700 (PDT) MIME-Version: 1.0 References: <20230606144746.708388-1-zhirun.yan@intel.com> <20230607035144.1214492-1-zhirun.yan@intel.com> <20230607035144.1214492-14-zhirun.yan@intel.com> In-Reply-To: <20230607035144.1214492-14-zhirun.yan@intel.com> From: Jerin Jacob Date: Wed, 7 Jun 2023 13:45:28 +0530 Message-ID: Subject: Re: [PATCH v9 13/17] graph: enable graph multicore dispatch scheduler model To: Zhirun Yan Cc: dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com, ndabilpuram@marvell.com, stephen@networkplumber.org, pbhagavatula@marvell.com, cunming.liang@intel.com, haiyue.wang@intel.com, mattias.ronnblom@ericsson.com 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 Wed, Jun 7, 2023 at 9:30=E2=80=AFAM Zhirun Yan wr= ote: > > This patch enables to chose new scheduler model. Must define > RTE_GRAPH_MODEL_SELECT before including rte_graph_worker.h > to enable specific model choosing. > > Signed-off-by: Haiyue Wang > Signed-off-by: Cunming Liang > Signed-off-by: Zhirun Yan > --- > lib/graph/rte_graph_worker.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > rte_graph_walk(struct rte_graph *graph) > { > +#if !defined(RTE_GRAPH_MODEL_SELECT) || RTE_GRAPH_MODEL_SELECT =3D=3D RT= E_GRAPH_MODEL_RTC Is nt defined instead of !defined? Use bracket around RTE_GRAPH_MODEL_SELECT =3D=3D RTE_GRAPH_MODEL_RTC. > rte_graph_walk_rtc(graph); > +#elif defined(RTE_GRAPH_MODEL_SELECT) && RTE_GRAPH_MODEL_SELECT =3D=3D R= TE_GRAPH_MODEL_MCORE_DISPATCH Use bracket around RTE_GRAPH_MODEL_SELECT =3D=3D > + rte_graph_walk_mcore_dispatch(graph); > +#else > + int model =3D rte_graph_worker_model_get(graph); Introduce rte_graph_worker_model_no_check_get() as commented earlier. > + > + if (model =3D=3D RTE_GRAPH_MODEL_RTC) > + rte_graph_walk_rtc(graph); > + else if (model =3D=3D RTE_GRAPH_MODEL_MCORE_DISPATCH) > + rte_graph_walk_mcore_dispatch(graph); I think, switch case better to support new model in future. Please check the performance before changing. i.e switch ( rte_graph_worker_model_no_check_get()) { case RTE_GRAPH_MODEL_MCORE_DISPATCH: rte_graph_walk_mcore_dispatch(graph) break; default: rte_graph_walk_rtc(graph); }