DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Di, ChenxuX" <chenxux.di@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>
Cc: "sachin.saxena@nxp.com" <sachin.saxena@nxp.com>,
	"stable@dpdk.org" <stable@dpdk.org>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Richardson, Bruce" <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/dpaa2: fix build error about timesync functions
Date: Thu, 17 Sep 2020 02:03:38 +0000	[thread overview]
Message-ID: <2ada3c33bf2b4dcf862e6fa4e6a97cbc@intel.com> (raw)
In-Reply-To: <974e79a6-6a52-c84c-6ae2-cf802e551444@intel.com>

Hi,

> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Wednesday, September 16, 2020 11:29 PM
> To: Di, ChenxuX <chenxux.di@intel.com>; hemant.agrawal@nxp.com
> Cc: sachin.saxena@nxp.com; stable@dpdk.org; dev@dpdk.org; Richardson,
> Bruce <bruce.richardson@intel.com>
> Subject: Re: [dpdk-stable] [PATCH] net/dpaa2: fix build error about timesync
> functions
> 
> On 9/15/2020 3:40 AM, Chenxu Di wrote:
> > When the build option has '-DRTE_LIBRTE_IEEE1588=1', the announce of
> > timesync functions will be build.
> > However the dpdk_conf doesn't hav RTE_LIBRTE_IEEE1588 so that the file
> > dpaa2_ptp.c will not be build.
> > It cause the build error.
> > This patch fixes it by adding set for dpdk_conf.
> >
> > Fixes: 184c39d16568 ("net/dpaa2: add DPRTC sub-module")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Chenxu Di <chenxux.di@intel.com>
> > ---
> >   drivers/net/dpaa2/meson.build | 4 ++++
> >   1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/net/dpaa2/meson.build
> > b/drivers/net/dpaa2/meson.build index 6dd0eb274..d9aadfdae 100644
> > --- a/drivers/net/dpaa2/meson.build
> > +++ b/drivers/net/dpaa2/meson.build
> > @@ -17,6 +17,10 @@ sources = files('base/dpaa2_hw_dpni.c',
> >   		'mc/dpdmux.c',
> >   		'mc/dpni.c')
> >
> > +if '-DRTE_LIBRTE_IEEE1588=1' in get_option('c_args')
> 
> The "RTE_LIBRTE_IEEE1588=1" can fail,
> all places looking for "#ifdef RTE_LIBRTE_IEEE1588", so a "-Dc_args=-
> DRTE_LIBRTE_IEEE1588" is more likely, but why not "-Dc_args=-
> DRTE_LIBRTE_IEEE1588=666"
> 

Yes, I will change it

> > +	dpdk_conf.set('RTE_LIBRTE_IEEE1588', 1) endif
> > +
> >   if dpdk_conf.has('RTE_LIBRTE_IEEE1588')
> >   	sources += files('mc/dprtc.c')
> >   	sources += files('dpaa2_ptp.c')
> >
> 
> Can't we just remove the conditional build:
> 
>   -if dpdk_conf.has('RTE_LIBRTE_IEEE1588')
>   -       sources += files('mc/dprtc.c')
>   -       sources += files('dpaa2_ptp.c')
>   -endif
>   +sources += files('mc/dprtc.c')
>   +sources += files('dpaa2_ptp.c')

The announce of timesync functions are in the #define DRTE_LIBRTE_IEEE1588
While the define of the functions are in the file 'dpaa2_ptp.c'.
So they should be both build or not build by whether the build option -DRTE_LIBRTE_IEEE1588=1 or not.
So it seems not a good idea that remove the conditional.



  reply	other threads:[~2020-09-17  2:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15  2:40 [dpdk-dev] " Chenxu Di
2020-09-15  3:22 ` Hemant Agrawal
2020-09-16  5:12 ` Zhou, JunX W
2020-09-16 15:29 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2020-09-17  2:03   ` Di, ChenxuX [this message]
2020-09-17 11:38     ` Ferruh Yigit
2020-09-17 11:50       ` Hemant Agrawal
2020-09-17 11:59         ` Ferruh Yigit
2020-09-17 15:40           ` Hemant Agrawal
2020-09-30 15:09             ` Ferruh Yigit
2020-09-17  8:43 ` [dpdk-dev] [PATCH v2] " Chenxu Di
2020-09-17 11:48   ` Hemant Agrawal
2020-10-06 17:16   ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
2020-10-08  2:24     ` Sachin Saxena (OSS)
2020-10-08 13:12       ` Ferruh Yigit
2020-10-09  7:48         ` Sachin Saxena (OSS)
2020-10-09 11:22           ` 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=2ada3c33bf2b4dcf862e6fa4e6a97cbc@intel.com \
    --to=chenxux.di@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=sachin.saxena@nxp.com \
    --cc=stable@dpdk.org \
    /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).