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 95FACA04B1; Wed, 23 Sep 2020 22:23:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6636F1D976; Wed, 23 Sep 2020 22:23:35 +0200 (CEST) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id 607281D94A for ; Wed, 23 Sep 2020 22:23:34 +0200 (CEST) Received: by mail-pg1-f194.google.com with SMTP id y14so385126pgf.12 for ; Wed, 23 Sep 2020 13:23:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c9jlMXxnFM95EdGOMge/uTFYdCs/ZAMFZ3o+T4IasCU=; b=WYZUZW7YvsivaHB0oxxUXfkFXOYnqLvidqUk81l4uHdCiyekhETQh7xwtXRav2dwXG 9aoCfpQ4Ulp8ZxOm5ODiGQRkXDZrs3vOagdjgT26FHuw3BpgavX6TXtc8Pe1o/2aX8a6 msGoWnsGrsp/TbOhlJCuNdpJ/9jOsvmXr02iaLNG5kJ2cmYfe4JG21dLc21AFYZnnySx /RAB7GkfgcSb9pNM9l0+Ok3WZA84d/0dEhflnpJel/0uGm+D+h1bPSYQoUUqrZooHpGQ zPZsm2o0SoQJACmVvK3nI0MIIqszNQUfF2m7Rd0l0/9n2hPF2pehoYGylufRcmTh2MIr nRVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c9jlMXxnFM95EdGOMge/uTFYdCs/ZAMFZ3o+T4IasCU=; b=nwoEo7y7RRtD08Xw7uLnXntD4yv0/qS1K2ZmbRb05clQ0FO5IhhD/SM5EUyg55G8dy PTzrDGQ5robhM+Qs8o+Dz36WFAxOf7XvIHSmtGD2UpJzNMyxDgpn5ICh7OXpXF+P4L7Z JOfp9RxWG5gFGUqDjWMjXEClmbEhIC394vPSSIDfG3QYGY4g1IBts+FKKrw9udWO5yft IqGibK3JfVd8AIM/pUnt1/kxT4/lf+pk9t1tVyHwTdRQb8xq9G5uUX/8qJJZYFE0KGwf 53S9yuIXSEx/L1zSl9TNDG/I1+zsYMfraRednTLNj6H10I9S7yTCh1JY49Acknuuhw0w 2Z3g== X-Gm-Message-State: AOAM5305SIdSDpLChHGdMmch02zxwz1zT704GBGv9WlwCndd3fXxSmMa wQouJxahNkgalI0zBpRpbN2QKg== X-Google-Smtp-Source: ABdhPJyTkU+4hlVxIUhzAUO556kC4Oj+NorcI/fX6cjB7Lk1cO9OSK0eKC4D37wbk6SKCzKUeIBB8Q== X-Received: by 2002:a63:230f:: with SMTP id j15mr1176569pgj.363.1600892613455; Wed, 23 Sep 2020 13:23:33 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id v13sm331258pjr.12.2020.09.23.13.23.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Sep 2020 13:23:33 -0700 (PDT) Date: Wed, 23 Sep 2020 13:23:24 -0700 From: Stephen Hemminger To: "Dumitrescu, Cristian" Cc: "dev@dpdk.org" , "thomas@monjalon.net" , "david.marchand@redhat.com" Message-ID: <20200923132324.6a9b1a44@hermes.lan> In-Reply-To: References: <20200910152645.9342-2-cristian.dumitrescu@intel.com> <20200923180645.55852-1-cristian.dumitrescu@intel.com> <20200923180645.55852-2-cristian.dumitrescu@intel.com> <20200923112438.4b3e1328@hermes.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 01/41] pipeline: add new SWX pipeline type 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 Wed, 23 Sep 2020 18:37:19 +0000 "Dumitrescu, Cristian" wrote: > Hi Stephen, > > > -----Original Message----- > > From: Stephen Hemminger > > Sent: Wednesday, September 23, 2020 7:25 PM > > To: Dumitrescu, Cristian > > Cc: dev@dpdk.org; thomas@monjalon.net; david.marchand@redhat.com > > Subject: Re: [dpdk-dev] [PATCH v5 01/41] pipeline: add new SWX pipeline > > type > > > > On Wed, 23 Sep 2020 19:06:05 +0100 > > Cristian Dumitrescu wrote: > > > > > +/* > > > + * Pipeline. > > > + */ > > > +struct rte_swx_pipeline { > > > + int build_done; > > > + int numa_node; > > > +}; > > > + > > > > Nit, could build_done be a bool type? > > > > As we discussed this in an earlier version of this patch set: > Isn't the difference between int and bool mostly cosmetic? > AFAIK we don't have a hard rule in DPDK about bool vs. int. > IMO doing this change now it likely not going to add any value. There is no policy and there probably doesn't need to be. Original code was written using BSD style, and BSD predates introduction of . Linux developers have been favoring bool. Purely a human thing, compilers just treat bool == int and allow assigning anything. Coverity or sparse might check though. > > +void > > +rte_swx_pipeline_free(struct rte_swx_pipeline *p) > > +{ > > + if (!p) > > + return; > > + > > + free(p); > > +} > > > > The free() function in libc is defined to accept NULL as ok. > > Please remove the if() > > This is just the early function wrapper in patch 1 out of 41, mode code is added in this function by later patches that need the if statement. IMO this change will not add any value at all here. Sure, makes sense.