From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B165DA0562; Sat, 4 Apr 2020 15:08:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 87DF51BE99; Sat, 4 Apr 2020 15:08:11 +0200 (CEST) Received: from mail-il1-f193.google.com (mail-il1-f193.google.com [209.85.166.193]) by dpdk.org (Postfix) with ESMTP id E5CEE5F13 for ; Sat, 4 Apr 2020 15:08:09 +0200 (CEST) Received: by mail-il1-f193.google.com with SMTP id j69so10133018ila.11 for ; Sat, 04 Apr 2020 06:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u6ixRnEKn14/gC+xyuqpgsXNAymvEZKzlpT3AhPpiGw=; b=JiaA2XviO3JpOLlhBtGfYzvtyOO+LzdAKyjnVwzLg0NhanSJq8LBMAL0NWrR2fUhub WcwjqeNgNBnO+DcKKkbhWCDyQBoLyFMAA8hLykoN2cBvuRx+d4TM0C2iglOaDIDPSUfK W0tbCYuJn8e1PNHmIXEpbU4uJmJaik5cKhsTVdvs3d7h6zC05C2XNkxpnAYUseFNQ83/ +SLbLQGGZRny/tSBIEhkNxMZodMtzIGKCkMjvgrxF4rx5P+GsJu2gh3yh7olSfN5i2Rw ExjxYqAMCgd1w22YX3k4ZWubzhPzP1GKFVLSbUFIXl4FU9KZjPpRK+tX53Lj6GjaTrpY aRxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=u6ixRnEKn14/gC+xyuqpgsXNAymvEZKzlpT3AhPpiGw=; b=j29t1eo8SStkIP9aPW0TkQV3rytH7dr2IUE7ja2qjjxPJqgz3UF37O+wMwdyKK+uXY ZHCd+H+Pavj0kAuWK1SVmec57vcKk6HwCEy+8XRIaKAdpwDZ2kzrxK2qpmH+HrC/Wz57 JYv+yXfhe9Hz2FM/UGpbnidIimuA0wxe03iqxHlsVVvKaWWPG1+bHLUOIUkYUpvHUeay CRRXxA1rhmazDOGAPagQUW6AadXDbpMauzSbieBhU4hy1kVinVDcaLcZJhXjvpgvUhv2 Op0yYi8GcbWI+QKSr0mVkMTKZVNI0cXkvqOQ9CcCdvBP3/iRdmsSvEaytfL+YBX8XCiA hhAA== X-Gm-Message-State: AGi0PuZfaRPV6EhGtpkOmoJRKL+CYPaa3wciSFjzDBe8dnggkG51Ud2F r9R1G/8YmYI1ePB0FamObOTeSdMNw/4pzf/Vhf0= X-Google-Smtp-Source: APiQypIZTXzvi6Q8Lf6wBDyHKKgVYU9zH2SvneW+ca5+PGJ1SwYziCiWiAgwckkhJHrqpSfFnyxWPgXuZuYZnNOA9CQ= X-Received: by 2002:a92:2804:: with SMTP id l4mr13862747ilf.130.1586005689285; Sat, 04 Apr 2020 06:08:09 -0700 (PDT) MIME-Version: 1.0 References: <20200326165644.866053-1-jerinj@marvell.com> <20200331192945.2466880-1-jerinj@marvell.com> <20200331192945.2466880-4-jerinj@marvell.com> In-Reply-To: From: Jerin Jacob Date: Sat, 4 Apr 2020 18:37:53 +0530 Message-ID: To: "Wang, Xiao W" Cc: "jerinj@marvell.com" , Kiran Kumar K , "dev@dpdk.org" , "thomas@monjalon.net" , "david.marchand@redhat.com" , "mdr@ashroe.eu" , "mattias.ronnblom@ericsson.com" , "pbhagavatula@marvell.com" , "ndabilpuram@marvell.com" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v3 03/29] graph: implement node operations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Apr 3, 2020 at 4:24 PM Wang, Xiao W 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.