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 A140642E3A; Mon, 10 Jul 2023 11:22:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F77740EE4; Mon, 10 Jul 2023 11:22:01 +0200 (CEST) Received: from mail-ua1-f41.google.com (mail-ua1-f41.google.com [209.85.222.41]) by mails.dpdk.org (Postfix) with ESMTP id 9054A40698 for ; Mon, 10 Jul 2023 11:21:59 +0200 (CEST) Received: by mail-ua1-f41.google.com with SMTP id a1e0cc1a2514c-78f554d4949so1208849241.3 for ; Mon, 10 Jul 2023 02:21:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688980919; x=1691572919; 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=FqW0CC/ECQYHowliVbl8Vol6JKAmjIrQALVjGTyq+Qc=; b=PGnrjrPprybWK1YLY8EvKFWaG0dasBOnhTga69BkHId442FJKRU/heFzjI0QyjOxqq RjjQD/idUOm+i5Jn88IQHtpQCwNkYI8BtmChrNvu0akmDFUMZsMfyUxOSOG4mdaQfXVH kbQC5+5ysdsSCiBAEf0pRrBQWMT/fDFWsGmz/z4WHJFSBBP0rSfL8waRvvEfqyHZudDV V+Y5pBpmxox42tkBSsgf2h33OYmo5D80kMuxR8U88ghXHcew3MJhQpMvytC8W1xppq3O xakZ56XmOvtyv3CXqRw3kAelcC91hL2TeJ0H9GytIGxX8k+ZIpKFM+uwBRUKyq3Us64i bCWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688980919; x=1691572919; 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=FqW0CC/ECQYHowliVbl8Vol6JKAmjIrQALVjGTyq+Qc=; b=W3cZIVloB/Qs7Y8nVV8Zx6ZkNNYBq0JcKJpvJj9NQgD48fCHT9eQW0dKEvQ4ian5G2 lbwgCgPVbqADDAch8OYVnhBk3kXdEwQIGGNpfYVq5dblo2hhfLemhDpDTmVUGIlfZidu qtassP1OPfPznPfyxZm0r5i63M6ucBBZNQ2LR5SRMYwrx/vJJn71mPZfE2o/Jc3gpWfl VwppvSkkJ8nH18A9u9KhIYpNk2PNftEzrjZiEjj9PhLDed2Stfx/Z8qr+mjkpbAPMl94 k8U7SRwQpQCLr9ccOV0gHTiGdRoPAdSU+Sh0NHc31riNQR6AL8XB+V1DNr1jKD8nzOg3 oP8g== X-Gm-Message-State: ABy/qLbDp5n4WwCdtSZHeoVKhr1zx1o+H0NVJA899A8lQX51gaQdTVDQ 7QzG242OoJ2gxEowhsKa+deEOSrEkMiq/hBQD64= X-Google-Smtp-Source: APBJJlHptiRpONg8m47Kz68SMToiOuv/uBgj7/EiBN/+D0N4vLVSHt8ZgUDTufSfCP14CRRdUQfcF84bNgyM6rXeHgg= X-Received: by 2002:a67:f049:0:b0:443:5927:d41b with SMTP id q9-20020a67f049000000b004435927d41bmr5032807vsm.31.1688980918594; Mon, 10 Jul 2023 02:21:58 -0700 (PDT) MIME-Version: 1.0 References: <20230705015633.1465235-1-zhirun.yan@intel.com> <20230710071515.3143533-1-zhirun.yan@intel.com> <20230710071515.3143533-2-zhirun.yan@intel.com> In-Reply-To: <20230710071515.3143533-2-zhirun.yan@intel.com> From: Jerin Jacob Date: Mon, 10 Jul 2023 14:51:32 +0530 Message-ID: Subject: Re: [PATCH v4 1/2] graph: fix graph functional tests with valid params To: Zhirun Yan Cc: dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com, ndabilpuram@marvell.com, qi.fu@intel.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 Mon, Jul 10, 2023 at 1:09=E2=80=AFPM Zhirun Yan w= rote: > > rte_graph_clone() should use valid param rather than NULL pointer, cause = it rte_graph_clone() should use a valid param rather than NULL pointer as > needs the param for alloc work queue memory for mcore dispatch model in > graph_sched_wq_create(). > > Fixes: 67e2303cd823 ("test/graph: add functional tests for mcore dispatch= model") > > Signed-off-by: Zhirun Yan With above change: Acked-by: Jerin Jacob > --- > app/test/test_graph.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/app/test/test_graph.c b/app/test/test_graph.c > index 8609c0b3a4..47f5ab8395 100644 > --- a/app/test/test_graph.c > +++ b/app/test/test_graph.c > @@ -665,7 +665,7 @@ test_graph_clone(void) > { > rte_graph_t cloned_graph_id =3D RTE_GRAPH_ID_INVALID; > rte_graph_t main_graph_id =3D RTE_GRAPH_ID_INVALID; > - struct rte_graph_param graph_conf; > + struct rte_graph_param graph_conf =3D {0}; > int ret =3D 0; > > main_graph_id =3D rte_graph_from_name("worker0"); > @@ -700,6 +700,7 @@ test_graph_model_mcore_dispatch_node_lcore_affinity_s= et(void) > { > rte_graph_t cloned_graph_id =3D RTE_GRAPH_ID_INVALID; > unsigned int worker_lcore =3D RTE_MAX_LCORE; > + struct rte_graph_param graph_conf =3D {0}; > rte_node_t nid =3D RTE_NODE_ID_INVALID; > char node_name[64] =3D "test_node00"; > struct rte_node *node; > @@ -711,7 +712,7 @@ test_graph_model_mcore_dispatch_node_lcore_affinity_s= et(void) > printf("Set node %s affinity to lcore %u\n", node_name, w= orker_lcore); > > nid =3D rte_node_from_name(node_name); > - cloned_graph_id =3D rte_graph_clone(graph_id, "cloned-test1", NUL= L); > + cloned_graph_id =3D rte_graph_clone(graph_id, "cloned-test1", &gr= aph_conf); > node =3D rte_graph_node_get(cloned_graph_id, nid); > > if (node->dispatch.lcore_id !=3D worker_lcore) { > @@ -729,11 +730,12 @@ test_graph_model_mcore_dispatch_core_bind_unbind(vo= id) > { > rte_graph_t cloned_graph_id =3D RTE_GRAPH_ID_INVALID; > unsigned int worker_lcore =3D RTE_MAX_LCORE; > + struct rte_graph_param graph_conf =3D {0}; > struct rte_graph *graph; > int ret =3D 0; > > worker_lcore =3D rte_get_next_lcore(worker_lcore, true, 1); > - cloned_graph_id =3D rte_graph_clone(graph_id, "cloned-test2", NUL= L); > + cloned_graph_id =3D rte_graph_clone(graph_id, "cloned-test2", &gr= aph_conf); > > ret =3D rte_graph_model_mcore_dispatch_core_bind(cloned_graph_id,= worker_lcore); > if (ret !=3D 0) { > @@ -765,10 +767,11 @@ static int > test_graph_worker_model_set_get(void) > { > rte_graph_t cloned_graph_id =3D RTE_GRAPH_ID_INVALID; > + struct rte_graph_param graph_conf =3D {0}; > struct rte_graph *graph; > int ret =3D 0; > > - cloned_graph_id =3D rte_graph_clone(graph_id, "cloned-test3", NUL= L); > + cloned_graph_id =3D rte_graph_clone(graph_id, "cloned-test3", &gr= aph_conf); > ret =3D rte_graph_worker_model_set(RTE_GRAPH_MODEL_MCORE_DISPATCH= ); > if (ret !=3D 0) { > printf("Set graph mcore dispatch model failed\n"); > -- > 2.37.2 >