On Fri, Apr 3, 2020 at 4:24 PM Wang, Xiao W <xiao.w.w...@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.

Reply via email to