DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shreyansh Jain <shreyansh.jain@nxp.com>
To: "Hunt, David" <david.hunt@intel.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH v2 1/2] mk: allow use of environment var for make config
Date: Wed, 7 Jun 2017 17:16:18 +0530	[thread overview]
Message-ID: <9f34de63-beea-fdd6-47c4-4ce3a8208b02@nxp.com> (raw)
In-Reply-To: <ccf49fb3-032b-f5aa-62a0-ebb32086b3f7@intel.com>

On Wednesday 07 June 2017 03:58 PM, Hunt, David wrote:
> Hi Shreyansh,
> 
> 
> On 7/6/2017 10:36 AM, Shreyansh Jain wrote:
>> Hello David,
>>
>> On Wednesday 07 June 2017 02:09 PM, Hunt, David wrote:
>>> Shreyansh,
>>>
>>>      I found an issue (or two) with this part of the patch, and have 
>>> a proposed solution.
>>>
>>> 1. RTE_TARGET originally had a different meaning. It was used for 
>>> making examples, specifying the target directory of where the SDK was 
>>> built. It's not good to re-purpose this for something else, as I'm 
>>> doing in this patch. (even though I'm not sure that variable is 
>>> suitably named in the first place, but that's a different issue).
>>
>> Even I didn't realize this until you highlighted here.
>>
>>> 2. If we set RTE_TARGET on the environment, we will break the 'make 
>>> -C examples/<app>', unless we set RTE_TARGET to be something else 
>>> (i.e. 'make -C examples/<app> RTE_TARGET=build'). One value for 
>>> making DPDK, and another for building examples. It's confusing to the 
>>> user.
>>
>> Agree about re-using RTE_TARGET is breaking existing assumption about
>> its use.
>>
>>>
>>> An alternative patch would be as follows:
>>>
>>>   RTE_CONFIG_TEMPLATE :=
>>>   ifdef T
>>> *-ifeq ("$(origin T)", "command line")*
>>>   RTE_CONFIG_TEMPLATE := $(RTE_SRCDIR)/config/defconfig_$(T)
>>> *-endif**
>>> *endif
>>>   export RTE_CONFIG_TEMPLATE
>> So, that would mean, user would do either of the following:
>>
>> make T=<template> config
>>
>> or
>>
>> export T=<template>
>> make config
>>
>> Is that correct? (I tried it and it seems to be working fine)
>> First method is same as today. For the second, I am just skeptical
>> whether we should use such a small identifier ("T") or we have a new
>> RTE_TEMPLATE.
>>
>> Either way, I am OK. [export T=<template>] looks fine to me - in fact,
>> on a second though, IMO, if T=<template> is provided as command line, 
>> it should also be acceptable as env variable.
>>
> 
> I did a quick poll here in the office and people feel that 'T' is too 
> short for an environment variable. RTE_TEMPLATE would be preferred, and 
> it's a sensible choice that does not conflict with RTE_TARGET.
> 
> So if we use RTE_TEMPLATE, we'd also have to put in a couple of lines 
> for the "make install" case, but it's still a small enough patch:
> 
> diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
> index dbac2a2..a464b01 100644
> --- a/mk/rte.sdkinstall.mk
> +++ b/mk/rte.sdkinstall.mk
> @@ -47,6 +47,10 @@ ifneq ($(MAKECMDGOALS),pre_install)
>   include $(RTE_SDK)/mk/rte.vars.mk
>   endif
> 
> *+ifndef T**
> **+T := $(RTE_TEMPLATE)**
> **+endif**
> * ifdef T # defaults with T= will install an almost flat staging tree
>   export prefix ?=
>   kerneldir   ?= $(prefix)/kmod
> 
> 
> diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk
> index 076a2d7..0b71a4e 100644
> --- a/mk/rte.sdkroot.mk
> +++ b/mk/rte.sdkroot.mk
> @@ -63,6 +63,8 @@ ifdef T
>   ifeq ("$(origin T)", "command line")
>   RTE_CONFIG_TEMPLATE := $(RTE_SRCDIR)/config/defconfig_$(T)
>   endif
> *+else**
> **+RTE_CONFIG_TEMPLATE := $(RTE_SRCDIR)/config/defconfig_$(RTE_TEMPLATE)**
> * endif
>   export RTE_CONFIG_TEMPLATE
> 
> So if T is provided on the command line, it takes priority.
> If that seems reasonable to you, I'll push up a v3. :)

Sounds good to me.
Feel free to add my signoff to v3.

> 
> Regards,
> Dave.
> 
> 
> 
> 
> 

  reply	other threads:[~2017-06-07 11:38 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 10:28 [dpdk-dev] mk: make config enhancements David Hunt
2017-05-23 10:28 ` [dpdk-dev] [PATCH v1 1/2] mk: allow use of environment var for make config David Hunt
2017-05-23 10:28 ` [dpdk-dev] [PATCH v1 2/2] mk: add sensible default target with defconfig David Hunt
2017-05-24  6:10   ` Shreyansh Jain
2017-05-25 13:04     ` Hunt, David
2017-05-25 13:19       ` Shreyansh Jain
2017-05-26  8:52   ` [dpdk-dev] [PATCH v2 0/2] mk: make config enhancements David Hunt
2017-05-26  8:52     ` [dpdk-dev] [PATCH v2 1/2] mk: allow use of environment var for make config David Hunt
2017-06-07  8:39       ` Hunt, David
2017-06-07  9:36         ` Shreyansh Jain
2017-06-07 10:28           ` Hunt, David
2017-06-07 11:46             ` Shreyansh Jain [this message]
2017-06-07 12:07               ` Bruce Richardson
2017-06-07 14:37       ` [dpdk-dev] [PATCH v3 0/3] mk: make config enhancements David Hunt
2017-06-07 14:37         ` [dpdk-dev] [PATCH v3 1/3] mk: add sensible default target with defconfig David Hunt
2017-06-12  8:36           ` Jerin Jacob
2017-08-03 22:39           ` Thomas Monjalon
2017-08-04  8:22             ` Hunt, David
2017-08-04  9:36               ` Thomas Monjalon
2017-08-04  9:53                 ` Hunt, David
2017-08-04 10:05                   ` Thomas Monjalon
2017-08-04 10:42                     ` Hunt, David
2017-08-04 10:28           ` [dpdk-dev] [PATCH v4] " David Hunt
2017-08-04 10:39             ` [dpdk-dev] [PATCH v5] " David Hunt
2017-08-05  8:24               ` Thomas Monjalon
2017-06-07 14:37         ` [dpdk-dev] [PATCH v3 2/3] mk: allow use of environment var for template David Hunt
2017-06-12  8:37           ` Jerin Jacob
2017-08-03 22:42           ` Thomas Monjalon
2017-06-07 14:37         ` [dpdk-dev] [PATCH v3 3/3] doc: update build-sdk-quick txt file David Hunt
2017-06-12 12:50           ` Mcnamara, John
2018-02-13 12:18             ` Ferruh Yigit
2018-02-13 23:41               ` Thomas Monjalon
2018-04-11  8:44                 ` Hunt, David
2018-04-11  8:49                   ` Thomas Monjalon
2017-05-26  8:52     ` [dpdk-dev] [PATCH v2 2/2] mk: add sensible default target with defconfig David Hunt
2017-05-29  7:31     ` [dpdk-dev] [PATCH v2 0/2] mk: make config enhancements Shreyansh Jain

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=9f34de63-beea-fdd6-47c4-4ce3a8208b02@nxp.com \
    --to=shreyansh.jain@nxp.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).