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 63631A0577; Tue, 7 Apr 2020 10:47:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D623E2B83; Tue, 7 Apr 2020 10:47:37 +0200 (CEST) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id 054FDFFA for ; Tue, 7 Apr 2020 10:47:35 +0200 (CEST) Received: by mail-lj1-f193.google.com with SMTP id k21so2802174ljh.2 for ; Tue, 07 Apr 2020 01:47:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=rAFDtSDCb97wLNcTUCm/bReXmMoDfpwwvtNF14i75ws=; b=Bq8sotkIyEo0x924YjHUHuq1yritDJO/q6797OofNEfblEyTJje3+xzjclSA2mbHXw Mlih/6ddbvIlE/cKSdSqZGbSfUtxOSli6xMCTQSHf8bW1ZWdJx5pA4xnHTk0gG5TwrhB LL6MCw9ZDWtdc1/9CcRNers4GbgosdU1Z1Ig/RbkuBz4wIiKoFZi3pCNXPW1OvXSQUfO CQYrp7mXyMX5I24gP6+zDgs/CsczVhgejd/+LtadcoSdwG8qJc6Xm+xNgy1AkhAp2Ej8 OfvcUc1pj+tk01q7ddMkNeWJPpVGEzbdoGpwC02+h7w4iSbia9XBkSGmnz09FBi9wwEe LMxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rAFDtSDCb97wLNcTUCm/bReXmMoDfpwwvtNF14i75ws=; b=uHDcC3fBP1FnG9+tzCEVHpLhTndkmnxiLRK9Yjr1GJH/gbrlhWyu21YnaPWi8ys2OZ KB+BkkiHu+sspV1pIydYw0LTUI79KzLUosVR9sJ7Hadr3Dj3tDZjQU4aHoQ0ANukvHrM V/6CkNpob+ZclA4dcDkV4OK+5GpA5ab/r1L1ZdzUJheYRTJwpMDWm12DscbtxnhPez68 0ojFXZM/t3ngVARYIHFZutnO8Oex8fb9gJ2eeq4mlQq82Eg78hhzA3zHRDL88vkUCXo6 fGkNoEa8gbjXBY38PTQAZ5dTUamjQ0YiUq2PaGdSZrE/Hg4vZ1d5kXKqX1OvwJpoYPlH eW4g== X-Gm-Message-State: AGi0PuZinyZU1IRreZDj/MXkK60D2XJs8+PL9caJATmdc6CjgXzjZiy+ 1pHDDn1vSDMorNUqqvAeIesWnQ== X-Google-Smtp-Source: APiQypK7WRikpLNovGqtYuFKX3TjTNe7ICDDhrEn88YIgThG/SISYrDatHSWWGH02OWmkcc2S0MqoA== X-Received: by 2002:a2e:b610:: with SMTP id r16mr1067715ljn.254.1586249255559; Tue, 07 Apr 2020 01:47:35 -0700 (PDT) Received: from [192.168.8.100] (user-5-173-33-152.play-internet.pl. [5.173.33.152]) by smtp.gmail.com with ESMTPSA id v10sm12801264lfb.61.2020.04.07.01.47.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Apr 2020 01:47:34 -0700 (PDT) To: Kiran Kumar Kokkilagadda , Jerin Jacob Kollanukkaran Cc: "dev@dpdk.org" , "thomas@monjalon.net" , "david.marchand@redhat.com" , "mdr@ashroe.eu" , "mattias.ronnblom@ericsson.com" , Pavan Nikhilesh Bhagavatula , Nithin Kumar Dabilpuram , "xiao.w.wang@intel.com" References: <20200331192945.2466880-1-jerinj@marvell.com> <20200405085613.1336841-1-jerinj@marvell.com> <20200405085613.1336841-4-jerinj@marvell.com> From: Andrzej Ostruszka Message-ID: Date: Tue, 7 Apr 2020 10:47:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v4 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 4/7/20 4:43 AM, Kiran Kumar Kokkilagadda 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) { >>> + rte_edge_t i, max_edges, count = 0; >>> + struct node *new_node; >>> + bool need_realloc; >>> + size_t sz; >>> + >>> + if (from == RTE_EDGE_ID_INVALID) >>> + from = node->nb_edges; >>> + >>> + /* Don't create hole in next_nodes[] list */ >>> + if (from > node->nb_edges) { >>> + rte_errno = ENOMEM; >>> + goto fail; >>> + } >>> + >>> + /* Remove me from list */ >>> + STAILQ_REMOVE(&node_list, node, node, next); > > This is where we will remove the node first unconditionally. Later we update the new node. Thanks Kiran, don't know how I missed that :) With regards Andrzej Ostruszka