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 06F55A04AF; Thu, 20 Aug 2020 17:41:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EEF551C027; Thu, 20 Aug 2020 17:41:50 +0200 (CEST) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by dpdk.org (Postfix) with ESMTP id 3A4091BEC4 for ; Thu, 20 Aug 2020 17:41:49 +0200 (CEST) Received: by mail-lj1-f196.google.com with SMTP id w14so2609639ljj.4 for ; Thu, 20 Aug 2020 08:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atomicrules-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PB85SfiFvgn0KeH9d9Dez7k3BB5AslqmKTaqixgADhc=; b=vVJwCQ07yfsuiVioFf/UeyhGGLMixpVaaixaq2npvVZaB4BQW8Cl86b4LmL4YKKP4v /pQYmvG6U1clgXNjmio2hv0DoqthhkhDujfYFRb8mYMzQGwKU/D+Fa3T2WxGhl6uXNyd 3BEMOA81dDQIG/QF0ZP9q8W0rlUp1FKCdU6bxGyIMWCFMSjfZR8R7+PfqQkveFXCY9vN xIFMNI/0vc47Lqjp7Kl22Y1hl0gODUqBAd/jU8zJoAQhSlqoZad29dIkJPeXESkSUNuo CiiWsdSqFCykS716hWj4+f59CJRTGBnvwwEVJFKaFp/1Qn6ohtMCTarKJoTJR72hak8B GIAw== 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=PB85SfiFvgn0KeH9d9Dez7k3BB5AslqmKTaqixgADhc=; b=XDz5pE2dDAW4DjJ5gz76E8WzUaWO7lEwxlDqv/MhasR+hQHMqTrbfNGBhPg3Lt2wqe zAx1a6tp3BxtxnhKiSUxvW/4NINPS6XOh8zs+GZKVcfffQLFNLXMkiKPNV5VsSFaspLr 4K7t06kKeUg3jPvH0fWOch8+Mx9M4NH5KdzPHSTcBu5yu2Z5AfN/LyesiaGb644N0nWJ r1wxOySGGWLWiHgbRay3dx+H3YXcA7R1so8Yb6Sg23XQzX2YMQAIPWCjc9++O7MbpJ90 ImIBTxCbuuqz2eZYr7lS6zEuTwTA8NnDkszo9XLcKmJlDIlGkeImG3jgmMxbsdhArnfT wi6w== X-Gm-Message-State: AOAM530EChY1hYq1bIPogq+450WO1b9BxMg222N0QCXCNKN1+ddCz678 FcZxqWJF//SR6oKcr5WmfQuCFjCImZJ8EMo4FzuzyA== X-Google-Smtp-Source: ABdhPJy4r3BzI9Nqp1dCh6IRQ6Wa2KqxIy6K7O3/VMO9sYJJqYCDAzkjxsV+zCvawIprFrX1rSdYa6mhT0Y4WgbmIwg= X-Received: by 2002:a05:651c:294:: with SMTP id b20mr1818602ljo.4.1597938108617; Thu, 20 Aug 2020 08:41:48 -0700 (PDT) MIME-Version: 1.0 References: <20200819153539.32698-1-ed.czeck@atomicrules.com> <20200819204514.22187-1-ed.czeck@atomicrules.com> <5715777c-a36a-8edd-7e06-2afebdef6c37@intel.com> In-Reply-To: <5715777c-a36a-8edd-7e06-2afebdef6c37@intel.com> From: Ed Czeck Date: Thu, 20 Aug 2020 11:41:37 -0400 Message-ID: To: Ferruh Yigit Cc: dev@dpdk.org, "Richardson, Bruce" , Shepard Siegel , John Miller Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] net/ark: fix meson build 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 Thu, Aug 20, 2020 at 7:16 AM Ferruh Yigit wrote: > ... > > Logging can be controlled in runtime, that is what we should use. > In data path, we use compile time flags because of the performance issues. So OK > to have 'CONFIG_RTE_LIBRTE_ARK_DEBUG_RX' & 'CONFIG_RTE_LIBRTE_ARK_DEBUG_TX' as > compile time flag, but why having compile time flag for rest? Agreed. We'll remove most of these macro in the next commit pushing the behavior into run-time log control. > > > > +Note that enabling debugging options may affect system performance. > > +These options may be set by specifying them in CFLAG > > +environment before the meson build set. E.g.:: > > + > > + export CFLAGS="-DARK_DEBUG_TRACE" > > + meson build > > + > > When you passed the flag as above, it is still global to all components in the > DPDK, this is not just for ark. What is the motivation to remove the > "RET_LIBRTE_" prefix? There are 2 issues here. 1) With the makefile flow, users could add other configurations with the documented and recommended sed commands. I.e., sed -ri 's/(CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE)=n/\1=y/' build/.config The makefiles took care of everything from there. This no longer works with the meson build flow. The solution is to set that macro passing it in the CFLAG environment. We're open to other recommendations. 2) Is there an advantage of promoting a PMD macro to a global macro? It seems to add to the noise of dpdk configuration and there are many PMD specific macros throughout the code base. > > > > > Building DPDK > > ------------- > > diff --git a/drivers/net/ark/ark_logs.h b/drivers/net/ark/ark_logs.h > > index 44aac6102..125583475 100644 > > --- a/drivers/net/ark/ark_logs.h > > +++ b/drivers/net/ark/ark_logs.h > > @@ -6,14 +6,12 @@ > > #define _ARK_DEBUG_H_ > > > > #include > > -#include > > - > > > > /* Configuration option to pad TX packets to 60 bytes */ > > -#ifdef RTE_LIBRTE_ARK_PAD_TX > > -#define ARK_TX_PAD_TO_60 1 > > -#else > > +#ifdef ARK_NOPAD_TX > > #define ARK_TX_PAD_TO_60 0 > > +#else > > +#define ARK_TX_PAD_TO_60 1 > > #endif > > So you don't want to convert this to runtime configuration. > > The point we are reducing compile time flags: > 1) It forks the code paths and by time it leave not tested, even not compiled > code paths which may cause rotten code by time. > > 2) Multiple code paths will lead deployment problems. When you deploy an > application, you won't able to change the compile time configuration in customer > environment and need to re-compile (most probably re-test) and re-deploy it. > Also there is not easy way to figure out from binary in customer environment > that with which compile time flags it has been built. > > Switching to CFLAGS="..." doesn't make above concerns go away and indeed it > makes (1) worst since hides the config options within the driver. Previously it > was possible to trigger each config option and do testing using scripts, now > since config options are hidden in driver we can't do even that. > > Can you please detail why "ARK_TX_PAD_TO_60" is needed exactly? > And can you please justify why it has to be compile time config option? > The need to pad packets is dependent on the underlying FPGA hardware implementation which lies outside the control of our deliverables. Thus we leave control up to our customer and how they deliver and deploy DPDK. This needs to be a compile-time macro since the code executes within the per-packet processing under rte_eth_tx_burst(). We can change the macro to ARK_MIN_TX_PKTLEN, which should have zero overhead when set to 0. (I'm assuming that compiles will remove if (unsigned < 0) blocks.) Should this be an RTE_LIBRTE macro? How does a user change this during compile? > <...> > > > @@ -11,3 +11,5 @@ sources = files('ark_ddm.c', > > 'ark_pktgen.c', > > 'ark_rqp.c', > > 'ark_udm.c') > > + > > +install_headers('ark_ext.h') > > > > Installing PMD header file is not required but this has an unique usage. > > Ark PMD is wrapper to the external shared library which should implement the > functions that has prototypes in the 'ark_ext.h'. > > Since this header is not needed by users of the dpdk library, but needed by > extension developers for the ark PMD, I think the header should not be installed. So is your recommendation that anyone developing an ark pmd extension must have access to DPDK source, in addition to the installed code? It seems like one include location is better than two. Many thanks, Ed.