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 7350042C4C; Wed, 7 Jun 2023 10:00:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 661F7410D7; Wed, 7 Jun 2023 10:00:22 +0200 (CEST) Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com [209.85.217.52]) by mails.dpdk.org (Postfix) with ESMTP id 739E840695 for ; Wed, 7 Jun 2023 10:00:21 +0200 (CEST) Received: by mail-vs1-f52.google.com with SMTP id ada2fe7eead31-43b2fb0afa6so1613294137.1 for ; Wed, 07 Jun 2023 01:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686124821; x=1688716821; 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=8ywDXOL4NLoIZ/b3dfNXm5KxXeMNPOtqXNk5B0OeCuw=; b=lpcUDr8FE4iFdepTvCU7c6dB3T7/ruF2XrRhpBii1oCy1lyVNC6E70NhbDICjqFoiz 61wqzXvcC24DHgI+2j3npAxhjTwQ+Z5rx5mA/FYfZ2wRiOR6NO0pPYbNZnH0I8LTtmpn oj74e3RxfD/0H1YTvporRPlr1QdFBOrWZuBBWEOvHu0AQ4opE6Ia8ZfJVk7SuGVO1XCZ PRZ5gn6yQ4h44AFk81kZhyNu3vp2XtI+mXXlRY9yKRFxaQ+TR7pjoKMkRIV7KAkG/PY8 SXUc+ZDf6k9nSNuzvH4/SU0Im5e+ja9jfTZ1S4NF2dX0As3zW0k7ri6azzRpdASOIH2O R0IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686124821; x=1688716821; 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=8ywDXOL4NLoIZ/b3dfNXm5KxXeMNPOtqXNk5B0OeCuw=; b=ARBWnhDS2YmpELsw0qV6BKgwYFmTgu2ErUb9kW07/8EzOYlJzh2Uoj1ilQiQGfYCFq BBvxDOs3Y4AHYoc21NK1mg9LsmCnxQD9TouWiOGYMLj1819qvKssi3RuWjS0sroXj1PM fMUiiqBfKFLzohZtp5L3zTPmgQBcLyZLvcIuKrMergmkIoIfaZPlNVGi+K8riT+64Lsh wdLyfYvqDnbFfasn0baVAD7XYdjIHrCiKRrro2gymuCoCO10d0sXrE5xSWPH59gQasMl KAJ9D0iqnBzElvvQhIIwM7s8R4DmaXb05TS2J1McYZq9GDweg8Ldf4EDa90ie/ujT9Cp QRag== X-Gm-Message-State: AC+VfDyMZGFJf7fQqiWtvydxckXkWzVBd2yHjVcPKGPSbjO3cyvgjrpT 2tIXO19Kgz7vTID+VVetpDDhdLO6sBuuX9VKeDo= X-Google-Smtp-Source: ACHHUZ6B7qSOnbXk5GSBHVXxecre79dXoFCMyKyZ5cxQbLj/NYCy5CR626dzrRhygF40sHPZRfS+xwEMx7qVxym6Uoo= X-Received: by 2002:a67:f598:0:b0:439:5f9c:3457 with SMTP id i24-20020a67f598000000b004395f9c3457mr778867vso.6.1686124820718; Wed, 07 Jun 2023 01:00:20 -0700 (PDT) MIME-Version: 1.0 References: <20230606144746.708388-1-zhirun.yan@intel.com> <20230607035144.1214492-1-zhirun.yan@intel.com> <20230607035144.1214492-7-zhirun.yan@intel.com> In-Reply-To: <20230607035144.1214492-7-zhirun.yan@intel.com> From: Jerin Jacob Date: Wed, 7 Jun 2023 13:29:54 +0530 Message-ID: Subject: Re: [PATCH v9 06/17] graph: introduce graph bind unbind API 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: > > Add lcore_id for graph to hold affinity core id where graph would run on. > Add bind/unbind API to set/unset graph affinity attribute. lcore_id will > be set as MAX by default, it means not enable this attribute. > > Signed-off-by: Haiyue Wang > Signed-off-by: Cunming Liang > Signed-off-by: Zhirun Yan > +int > +rte_graph_model_mcore_dispatch_core_bind(rte_graph_t id, int lcore) > +{ > + struct graph *graph; > + > + GRAPH_ID_CHECK(id); > + if (!rte_lcore_is_enabled(lcore)) > + SET_ERR_JMP(ENOLINK, fail, "lcore %d not enabled", lcore)= ; > + > + STAILQ_FOREACH(graph, &graph_list, next) > + if (graph->id =3D=3D id) > + break; > + > + RTE_ASSERT(graph->graph->model =3D=3D RTE_GRAPH_MODEL_MCORE_DISPA= TCH); No assert in library or slowpath. Return error. With that change Acked-by: Jerin Jacob