From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5DD14A0547; Thu, 24 Jun 2021 20:44:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 29C8440040; Thu, 24 Jun 2021 20:44:09 +0200 (CEST) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by mails.dpdk.org (Postfix) with ESMTP id 86A844003C; Thu, 24 Jun 2021 20:44:07 +0200 (CEST) Received: by mail-lj1-f182.google.com with SMTP id a16so9093679ljq.3; Thu, 24 Jun 2021 11:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ykT9bxc2SfLh5ldBZqzAPjcno98K/SWKjXfZuduN9ME=; b=eJO5kBE4sS7u3gUgJtcpR6UcKBSelqQ5lQR0fWgIiowfoEaFhtO2Ha5CMfcDKuJJ7W mrpzKEQw1EjDgHU43lE3wIVWPiNu6ZTt14utoTfmzPeMdHH5f231xVs/BAfWutTiIM8P fy76X7ECbCXHexjpe3yqDXHEFwdrY8d8xLrFGB3Ns5OaKNSJEPy2a5UrTGB/apRmM2fd A/+ycGHDmjbzPQpsDhVcfH+y/Yd+I1DMkZWLeaLazdimg0xE8XEWVWS0+TI2VJk1ELXR V75BPx0QxvK3j1lmR0JA1o/ywum5waIEnPi6rIiMhTyfQjUk53oP8i144KZagSQSK3s8 S7wg== 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=ykT9bxc2SfLh5ldBZqzAPjcno98K/SWKjXfZuduN9ME=; b=jPLbw87DhFpjEjarysLAWzp0cLmfo78eL7Bj0jRUidN77d7TDGdOCC6kvRbsjliC6X vDzhl55xeXc3FkNYAdVR9J0edsSNEjOgUNwih+RwY3OaaZj6p+PDOfEzTKj/vaTGE2AI uZ7XJaaKLE3wWe4frff55aTvv6B05sVfhjGdS1XYgoX9SG9a2xnVfXCOMTttdZ33kXLE oz+gUBF0LJqFPEoC2/rTcggp0Yi8ymSNzmEwBpq8zOJhXxxzRv+SqyJdtvBhE984ZXlb gEkObxYY+/5lURo6tQLbmS2zxiiSg+jRCGnRH/B9+GDrhmihIYtzTbq57UBbnrKQB93U 3FAA== X-Gm-Message-State: AOAM532ER5daP2manTuLxmA9w+vi+tPzAgzSLHSKnW61oOONWtyQPb8O Ct5SAQzxxKCMhJs3DESrmUQ= X-Google-Smtp-Source: ABdhPJwjSqCoUo9Hexly09JK69lHa2IhGR7GUyxj7f7kXpLtXYfMLCAlb+yaMU9IhZ1KjwC4NZFtfA== X-Received: by 2002:a05:651c:1132:: with SMTP id e18mr2249157ljo.154.1624560247053; Thu, 24 Jun 2021 11:44:07 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id m16sm318838lfl.300.2021.06.24.11.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Jun 2021 11:44:05 -0700 (PDT) Date: Thu, 24 Jun 2021 21:44:04 +0300 From: Dmitry Kozlyuk To: Tyler Retzlaff Cc: Jie Zhou , dev@dpdk.org, xiaoyun.li@intel.com, roretzla@microsoft.com, talshn@nvidia.com, pallavi.kadam@intel.com, thomas@monjalon.net, bruce.richardson@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, stable@dpdk.org Message-ID: <20210624214404.282808cf@sovereign> In-Reply-To: <20210624154524.GA22718@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1620236174-10676-1-git-send-email-jizh@linux.microsoft.com> <1620241931-28435-1-git-send-email-jizh@linux.microsoft.com> <1620241931-28435-10-git-send-email-jizh@linux.microsoft.com> <20210621023053.07b8a425@sovereign> <20210623212632.GD20289@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <20210624154524.GA22718@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v13 09/10] app/testpmd: fix unused function warnings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" 2021-06-24 08:45 (UTC-0700), Tyler Retzlaff: > On Wed, Jun 23, 2021 at 02:26:32PM -0700, Jie Zhou wrote: > > On Mon, Jun 21, 2021 at 02:30:53AM +0300, Dmitry Kozlyuk wrote: > > > - > > > void > > > fdir_set_flex_mask(portid_t port_id, struct rte_eth_fdir_flex_mask *cfg) > > > { > > > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h > > > index d61a055bdd..a40ee902e8 100644 > > > --- a/app/test-pmd/testpmd.h > > > +++ b/app/test-pmd/testpmd.h > > > @@ -917,9 +917,7 @@ int all_ports_stopped(void); > > > int port_is_stopped(portid_t port_id); > > > int port_is_started(portid_t port_id); > > > void pmd_test_exit(void); > > > -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) > > > void fdir_get_infos(portid_t port_id); > > > -#endif > > > void fdir_set_flex_mask(portid_t port_id, > > > struct rte_eth_fdir_flex_mask *cfg); > > > void fdir_set_flex_payload(portid_t port_id, > > > > Hi Dmitry, I agree that should avoid the #ifdef as much as possible. But in this case, I am not quite sure if I followed your comment correctly. Someone originally introduced these i40e and ixgbe related fdir functions (print_fdir_mask, print_fdir_flex_payload, print_fdir_flex_mask, print_fdir_flow_type, get_fdir_info, fdir_get_infos) into testpmd with adding the #if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) for 4 out of 6 functions and left 2 of them outside the #ifdef which caused compilation "unused function" warning. What I did here is just move the starting point of #ifdef to also include those 2 missed functions (print_fdir_mask and print_fdir_flex_payload). IMO the original author would be in better place to reducing the unneccary #ifdef in a proper way. > > i think i have to agree with jie here. there are limits to how many > defects we should have to correct which are unrelated change. if this is > critical i think it would be best if the maintainer provide a patch > cleaning up the code they own. > > let's not hold this patch up over it because of it being a broad change > we lose a lot of time rebasing where either the maintainer or author > could follow up with a narrow change to correct this. Fair enough, the patch doesn't add technical debt at least. Acked-by: Dmitry Kozlyuk