From: Zhirun Yan <zhirun.yan@intel.com>
To: dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com,
ndabilpuram@marvell.com
Cc: qi.fu@intel.com, Zhirun Yan <zhirun.yan@intel.com>
Subject: [PATCH v4 1/2] graph: fix graph functional tests with valid params
Date: Mon, 10 Jul 2023 15:15:14 +0800 [thread overview]
Message-ID: <20230710071515.3143533-2-zhirun.yan@intel.com> (raw)
In-Reply-To: <20230710071515.3143533-1-zhirun.yan@intel.com>
rte_graph_clone() should use valid param rather than NULL pointer, cause it
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 <zhirun.yan@intel.com>
---
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 = RTE_GRAPH_ID_INVALID;
rte_graph_t main_graph_id = RTE_GRAPH_ID_INVALID;
- struct rte_graph_param graph_conf;
+ struct rte_graph_param graph_conf = {0};
int ret = 0;
main_graph_id = rte_graph_from_name("worker0");
@@ -700,6 +700,7 @@ test_graph_model_mcore_dispatch_node_lcore_affinity_set(void)
{
rte_graph_t cloned_graph_id = RTE_GRAPH_ID_INVALID;
unsigned int worker_lcore = RTE_MAX_LCORE;
+ struct rte_graph_param graph_conf = {0};
rte_node_t nid = RTE_NODE_ID_INVALID;
char node_name[64] = "test_node00";
struct rte_node *node;
@@ -711,7 +712,7 @@ test_graph_model_mcore_dispatch_node_lcore_affinity_set(void)
printf("Set node %s affinity to lcore %u\n", node_name, worker_lcore);
nid = rte_node_from_name(node_name);
- cloned_graph_id = rte_graph_clone(graph_id, "cloned-test1", NULL);
+ cloned_graph_id = rte_graph_clone(graph_id, "cloned-test1", &graph_conf);
node = rte_graph_node_get(cloned_graph_id, nid);
if (node->dispatch.lcore_id != worker_lcore) {
@@ -729,11 +730,12 @@ test_graph_model_mcore_dispatch_core_bind_unbind(void)
{
rte_graph_t cloned_graph_id = RTE_GRAPH_ID_INVALID;
unsigned int worker_lcore = RTE_MAX_LCORE;
+ struct rte_graph_param graph_conf = {0};
struct rte_graph *graph;
int ret = 0;
worker_lcore = rte_get_next_lcore(worker_lcore, true, 1);
- cloned_graph_id = rte_graph_clone(graph_id, "cloned-test2", NULL);
+ cloned_graph_id = rte_graph_clone(graph_id, "cloned-test2", &graph_conf);
ret = rte_graph_model_mcore_dispatch_core_bind(cloned_graph_id, worker_lcore);
if (ret != 0) {
@@ -765,10 +767,11 @@ static int
test_graph_worker_model_set_get(void)
{
rte_graph_t cloned_graph_id = RTE_GRAPH_ID_INVALID;
+ struct rte_graph_param graph_conf = {0};
struct rte_graph *graph;
int ret = 0;
- cloned_graph_id = rte_graph_clone(graph_id, "cloned-test3", NULL);
+ cloned_graph_id = rte_graph_clone(graph_id, "cloned-test3", &graph_conf);
ret = rte_graph_worker_model_set(RTE_GRAPH_MODEL_MCORE_DISPATCH);
if (ret != 0) {
printf("Set graph mcore dispatch model failed\n");
--
2.37.2
next prev parent reply other threads:[~2023-07-10 7:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 7:29 [PATCH v1] graph: fix graph model check in core binding Zhirun Yan
2023-07-03 9:55 ` [PATCH v2] " Zhirun Yan
2023-07-04 9:10 ` Jerin Jacob
2023-07-05 0:50 ` Yan, Zhirun
2023-07-05 1:56 ` [PATCH v3] " Zhirun Yan
2023-07-07 10:16 ` Jerin Jacob
2023-07-10 5:08 ` Yan, Zhirun
2023-07-10 7:15 ` [PATCH v4 0/2] fix graph issues Zhirun Yan
2023-07-10 7:15 ` Zhirun Yan [this message]
2023-07-10 9:21 ` [PATCH v4 1/2] graph: fix graph functional tests with valid params Jerin Jacob
2023-07-10 7:15 ` [PATCH v4 2/2] graph: fix graph model check in core binding Zhirun Yan
2023-07-10 9:29 ` Jerin Jacob
2023-07-12 14:01 ` [PATCH v4 0/2] fix graph issues Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230710071515.3143533-2-zhirun.yan@intel.com \
--to=zhirun.yan@intel.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=qi.fu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).