DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ed Czeck <ed.czeck@atomicrules.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, "Richardson, Bruce" <bruce.richardson@intel.com>,
	 Shepard Siegel <shepard.siegel@atomicrules.com>,
	John Miller <john.miller@atomicrules.com>
Subject: Re: [dpdk-dev] [PATCH] net/ark: fix meson build
Date: Thu, 20 Aug 2020 11:41:37 -0400	[thread overview]
Message-ID: <CALZ3GuixCp1YtR1zHNfVsm_Q6iOVB5xZcNDPBBv33thmXgi59w@mail.gmail.com> (raw)
In-Reply-To: <5715777c-a36a-8edd-7e06-2afebdef6c37@intel.com>

On Thu, Aug 20, 2020 at 7:16 AM Ferruh Yigit <ferruh.yigit@intel.com> 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 <inttypes.h>
> > -#include <rte_log.h>
> > -
> >
> >  /* 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.

  reply	other threads:[~2020-08-20 15:41 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19 15:35 Ed Czeck
2020-08-19 16:29 ` Ferruh Yigit
2020-08-19 20:45 ` Ed Czeck
2020-08-20 11:16   ` Ferruh Yigit
2020-08-20 15:41     ` Ed Czeck [this message]
2020-08-21  9:44       ` Ferruh Yigit
2020-08-20 21:55 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
2020-08-20 21:55   ` [dpdk-dev] [PATCH 2/2] net/ark remove ARK_TX_PAD_TO_60 configuration macro Ed Czeck
2020-08-21  9:50     ` Ferruh Yigit
2020-08-24 13:36 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
2020-08-24 13:36   ` [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
2020-08-24 14:55     ` Ferruh Yigit
2020-08-24 21:51       ` Ed Czeck
2020-08-25  7:43         ` Ferruh Yigit
2020-08-24 14:37   ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ferruh Yigit
2020-08-24 14:40     ` Bruce Richardson
2020-08-24 15:09       ` Ferruh Yigit
2020-08-24 21:40         ` Ed Czeck
2020-08-25  7:44           ` Ferruh Yigit
2020-08-26 15:24 ` Ed Czeck
2020-08-26 15:24   ` [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
2020-08-27 16:11 ` [dpdk-dev] [PATCH 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
2020-08-27 16:11   ` [dpdk-dev] [PATCH 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
2020-09-01 11:17     ` Ferruh Yigit
2020-09-08 19:20 ` [dpdk-dev] [PATCH v7 1/2] net/ark: remove compile time log macros in favor of run time log control Ed Czeck
2020-09-08 19:20   ` [dpdk-dev] [PATCH v7 2/2] net/ark: remove RTE_LIBRTE_ARK_PAD_TX configuration macro Ed Czeck
2020-09-09 13:33   ` [dpdk-dev] [PATCH v7 1/2] net/ark: remove compile time log macros in favor of run time log control Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALZ3GuixCp1YtR1zHNfVsm_Q6iOVB5xZcNDPBBv33thmXgi59w@mail.gmail.com \
    --to=ed.czeck@atomicrules.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=john.miller@atomicrules.com \
    --cc=shepard.siegel@atomicrules.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).