[dpdk-dev] [PATCH v3 03/29] graph: implement node operations
Jerin Jacob
jerinjacobk at gmail.com
Sat Apr 4 15:07:53 CEST 2020
On Fri, Apr 3, 2020 at 4:24 PM Wang, Xiao W <xiao.w.wang at intel.com> wrote:
> > +
> > +static rte_edge_t
> > +edge_update(struct node *node, struct node *prev, rte_edge_t from,
> > + const char **next_nodes, rte_edge_t nb_edges)
> > +{
[..]
> > + /* Update the linked list to point new node address in prev node */
> > + if (prev)
> > + STAILQ_INSERT_AFTER(&node_list, prev, node, next);
> > + else
> > + STAILQ_INSERT_HEAD(&node_list, node, next);
> > +
> > + if (need_realloc)
> > + node->nb_edges += count;
>
> If the "from" starts from somewhere in the middle of the edges, and also triggers a realloc,
> then the new edge number should be: node->nb_edges = max_edges;
Agree. I will fix it in v4.
More information about the dev
mailing list