From: "Robin Jarry" <rjarry@redhat.com>
To: "Kiran Kumar Kokkilagadda" <kirankumark@marvell.com>,
"dev@dpdk.org" <dev@dpdk.org>, "Jerin Jacob" <jerinj@marvell.com>,
"Nithin Kumar Dabilpuram" <ndabilpuram@marvell.com>,
"Zhirun Yan" <yanzhirun_163@163.com>
Subject: Re: [EXTERNAL] [PATCH] graph: avoid accessing graph list when getting stats
Date: Fri, 29 Mar 2024 10:32:43 +0100 [thread overview]
Message-ID: <D064P4KL7L3G.1Z4YP35SBXJWD@redhat.com> (raw)
In-Reply-To: <PH0PR18MB507139823ECB18F60294CCDAAC3A2@PH0PR18MB5071.namprd18.prod.outlook.com>
Kiran Kumar Kokkilagadda, Mar 29, 2024 at 08:44:
> > +167,16 @@ stats_mem_init(struct cluster *cluster,
> >
> > /* Fix up callback */
> > fn = prm->fn;
> > - if (fn == NULL)
> > - fn = graph_cluster_stats_cb;
> > + if (fn == NULL) {
> > + for (int i = 0; i < cluster->nb_graphs; i++) {
> > + const struct rte_graph *graph = cluster->graphs[i]- graph;
> > + if (graph->model == RTE_GRAPH_MODEL_MCORE_DISPATCH)
> > + fn = graph_cluster_stats_cb_dispatch;
> > + else
> > + fn = graph_cluster_stats_cb_rtc;
> > + break;
> > + }
> > + }
> >
>
> Do we need loop here? Just take cluster->graphs[0] and remove break?
I wasn't sure if the cluster could be empty at this point. If it is
guaranteed to contain at least one graph, I'll send a v2 without this
loop.
Thanks!
next prev parent reply other threads:[~2024-03-29 9:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 15:53 Robin Jarry
2024-03-29 7:44 ` [EXTERNAL] " Kiran Kumar Kokkilagadda
2024-03-29 9:32 ` Robin Jarry [this message]
2024-04-01 20:36 ` [PATCH v2] " Robin Jarry
2024-04-03 7:22 ` [EXTERNAL] " Kiran Kumar Kokkilagadda
2024-06-18 13:15 ` David Marchand
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=D064P4KL7L3G.1Z4YP35SBXJWD@redhat.com \
--to=rjarry@redhat.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=yanzhirun_163@163.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).