DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mk: remove module compilation noise
@ 2016-09-08 12:33 Ferruh Yigit
  2016-09-22 23:35 ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Ferruh Yigit @ 2016-09-08 12:33 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon

Following log generated by Linux kernel Makefiles:
(cat /dev/null;   echo
kernel/.../build/lib/librte_eal/linuxapp/igb_uio/igb_uio.ko;) >
.../build/lib/librte_eal/linuxapp/igb_uio/modules.order

This happens because $(Q) used for both Linux and DPDK makefiles and
DPDK unsets this variable when V=0, which makes Linux verbose.

More details:
rte.modules calls kernel makefile with V=0 argument
kernel makefile includes igb_uio/Makefile, which includes rte.vars.mk
rte.vars.mk unsets Q when V=0

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 mk/rte.module.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mk/rte.module.mk b/mk/rte.module.mk
index 53ed4fe..10cb667 100644
--- a/mk/rte.module.mk
+++ b/mk/rte.module.mk
@@ -78,7 +78,7 @@ build: _postbuild
 $(MODULE).ko: $(SRCS_LINKS)
 	@if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi
 	@$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
-		CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0)
+		CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,)
 
 # install module in $(RTE_OUTPUT)/kmod
 $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko
-- 
2.7.4

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: remove module compilation noise
  2016-09-08 12:33 [dpdk-dev] [PATCH] mk: remove module compilation noise Ferruh Yigit
@ 2016-09-22 23:35 ` Thomas Monjalon
  2016-09-22 23:42   ` [dpdk-dev] [PATCH] mk: fix verbosity zero Thomas Monjalon
  2016-09-23  9:04   ` [dpdk-dev] [PATCH] mk: remove module compilation noise Ferruh Yigit
  0 siblings, 2 replies; 8+ messages in thread
From: Thomas Monjalon @ 2016-09-22 23:35 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

2016-09-08 13:33, Ferruh Yigit:
> Following log generated by Linux kernel Makefiles:
> (cat /dev/null;   echo
> kernel/.../build/lib/librte_eal/linuxapp/igb_uio/igb_uio.ko;) >
> .../build/lib/librte_eal/linuxapp/igb_uio/modules.order
> 
> This happens because $(Q) used for both Linux and DPDK makefiles and
> DPDK unsets this variable when V=0, which makes Linux verbose.
> 
> More details:
> rte.modules calls kernel makefile with V=0 argument
> kernel makefile includes igb_uio/Makefile, which includes rte.vars.mk
> rte.vars.mk unsets Q when V=0

Yes good analysis.
Another consequence is that V=0 is equivalent to V=1 (verbose mode).
I think it is better to fix the latter issue. I'll send a patch.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH] mk: fix verbosity zero
  2016-09-22 23:35 ` Thomas Monjalon
@ 2016-09-22 23:42   ` Thomas Monjalon
  2016-09-23  9:06     ` Ferruh Yigit
  2016-09-23  9:33     ` Ferruh Yigit
  2016-09-23  9:04   ` [dpdk-dev] [PATCH] mk: remove module compilation noise Ferruh Yigit
  1 sibling, 2 replies; 8+ messages in thread
From: Thomas Monjalon @ 2016-09-22 23:42 UTC (permalink / raw)
  To: dev; +Cc: Ferruh Yigit

Verbosity is considered enabled when $V is not empty.
So V=0 and V=1 are equivalent.
It is fixed by unsetting V when it is 0.

A side effect is to fix kernel module compilation verbosity
which is set to 0 when V is empty.

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 mk/rte.sdkroot.mk | 3 +++
 mk/rte.vars.mk    | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk
index 55a9d8a..04ad523 100644
--- a/mk/rte.sdkroot.mk
+++ b/mk/rte.sdkroot.mk
@@ -34,6 +34,9 @@ MAKEFLAGS += --no-print-directory
 # define Q to '@' or not. $(Q) is used to prefix all shell commands to
 # be executed silently.
 Q=@
+ifeq '$V' '0'
+override V=
+endif
 ifdef V
 ifeq ("$(origin V)", "command line")
 Q=
diff --git a/mk/rte.vars.mk b/mk/rte.vars.mk
index 28982a5..c240a0e 100644
--- a/mk/rte.vars.mk
+++ b/mk/rte.vars.mk
@@ -46,6 +46,9 @@ endif
 # define Q to '@' or not. $(Q) is used to prefix all shell commands to
 # be executed silently.
 Q=@
+ifeq '$V' '0'
+override V=
+endif
 ifdef V
 ifeq ("$(origin V)", "command line")
 Q=
-- 
2.7.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: remove module compilation noise
  2016-09-22 23:35 ` Thomas Monjalon
  2016-09-22 23:42   ` [dpdk-dev] [PATCH] mk: fix verbosity zero Thomas Monjalon
@ 2016-09-23  9:04   ` Ferruh Yigit
  1 sibling, 0 replies; 8+ messages in thread
From: Ferruh Yigit @ 2016-09-23  9:04 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On 9/23/2016 12:35 AM, Thomas Monjalon wrote:
> 2016-09-08 13:33, Ferruh Yigit:
>> Following log generated by Linux kernel Makefiles:
>> (cat /dev/null;   echo
>> kernel/.../build/lib/librte_eal/linuxapp/igb_uio/igb_uio.ko;) >
>> .../build/lib/librte_eal/linuxapp/igb_uio/modules.order
>>
>> This happens because $(Q) used for both Linux and DPDK makefiles and
>> DPDK unsets this variable when V=0, which makes Linux verbose.
>>
>> More details:
>> rte.modules calls kernel makefile with V=0 argument
>> kernel makefile includes igb_uio/Makefile, which includes rte.vars.mk
>> rte.vars.mk unsets Q when V=0
> 
> Yes good analysis.
> Another consequence is that V=0 is equivalent to V=1 (verbose mode).

Yes.

> I think it is better to fix the latter issue. I'll send a patch.

OK.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: fix verbosity zero
  2016-09-22 23:42   ` [dpdk-dev] [PATCH] mk: fix verbosity zero Thomas Monjalon
@ 2016-09-23  9:06     ` Ferruh Yigit
  2016-09-23  9:30       ` Thomas Monjalon
  2016-09-23  9:33     ` Ferruh Yigit
  1 sibling, 1 reply; 8+ messages in thread
From: Ferruh Yigit @ 2016-09-23  9:06 UTC (permalink / raw)
  To: Thomas Monjalon, dev

On 9/23/2016 12:42 AM, Thomas Monjalon wrote:
> Verbosity is considered enabled when $V is not empty.
> So V=0 and V=1 are equivalent.
> It is fixed by unsetting V when it is 0.
> 
> A side effect is to fix kernel module compilation verbosity
> which is set to 0 when V is empty.
> 
> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  mk/rte.sdkroot.mk | 3 +++
>  mk/rte.vars.mk    | 3 +++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk
> index 55a9d8a..04ad523 100644
> --- a/mk/rte.sdkroot.mk
> +++ b/mk/rte.sdkroot.mk
> @@ -34,6 +34,9 @@ MAKEFLAGS += --no-print-directory
>  # define Q to '@' or not. $(Q) is used to prefix all shell commands to
>  # be executed silently.
>  Q=@
> +ifeq '$V' '0'
> +override V=
> +endif
>  ifdef V

Why not simply:
-ifdef V
+ifeq ($(V),1)


>  ifeq ("$(origin V)", "command line")
>  Q=
> diff --git a/mk/rte.vars.mk b/mk/rte.vars.mk
> index 28982a5..c240a0e 100644
> --- a/mk/rte.vars.mk
> +++ b/mk/rte.vars.mk
> @@ -46,6 +46,9 @@ endif
>  # define Q to '@' or not. $(Q) is used to prefix all shell commands to
>  # be executed silently.
>  Q=@
> +ifeq '$V' '0'
> +override V=
> +endif
>  ifdef V
>  ifeq ("$(origin V)", "command line")
>  Q=
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: fix verbosity zero
  2016-09-23  9:06     ` Ferruh Yigit
@ 2016-09-23  9:30       ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2016-09-23  9:30 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

2016-09-23 10:06, Ferruh Yigit:
> On 9/23/2016 12:42 AM, Thomas Monjalon wrote:
> > Verbosity is considered enabled when $V is not empty.
> > So V=0 and V=1 are equivalent.
> > It is fixed by unsetting V when it is 0.
> > 
> > A side effect is to fix kernel module compilation verbosity
> > which is set to 0 when V is empty.
> > 
> > Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
[...]
> > --- a/mk/rte.sdkroot.mk
> > +++ b/mk/rte.sdkroot.mk
> > @@ -34,6 +34,9 @@ MAKEFLAGS += --no-print-directory
> >  # define Q to '@' or not. $(Q) is used to prefix all shell commands to
> >  # be executed silently.
> >  Q=@
> > +ifeq '$V' '0'
> > +override V=
> > +endif
> >  ifdef V
> 
> Why not simply:
> -ifdef V
> +ifeq ($(V),1)

Because:
- V could have a higher value
- $(if $V) construct is used in several places in the makefiles
	See git grep '$(if $(*V'

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: fix verbosity zero
  2016-09-22 23:42   ` [dpdk-dev] [PATCH] mk: fix verbosity zero Thomas Monjalon
  2016-09-23  9:06     ` Ferruh Yigit
@ 2016-09-23  9:33     ` Ferruh Yigit
  2016-09-23 14:26       ` Thomas Monjalon
  1 sibling, 1 reply; 8+ messages in thread
From: Ferruh Yigit @ 2016-09-23  9:33 UTC (permalink / raw)
  To: Thomas Monjalon, dev

On 9/23/2016 12:42 AM, Thomas Monjalon wrote:
> Verbosity is considered enabled when $V is not empty.
> So V=0 and V=1 are equivalent.
> It is fixed by unsetting V when it is 0.
> 
> A side effect is to fix kernel module compilation verbosity
> which is set to 0 when V is empty.
> 
> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: fix verbosity zero
  2016-09-23  9:33     ` Ferruh Yigit
@ 2016-09-23 14:26       ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2016-09-23 14:26 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

2016-09-23 10:33, Ferruh Yigit:
> On 9/23/2016 12:42 AM, Thomas Monjalon wrote:
> > Verbosity is considered enabled when $V is not empty.
> > So V=0 and V=1 are equivalent.
> > It is fixed by unsetting V when it is 0.
> > 
> > A side effect is to fix kernel module compilation verbosity
> > which is set to 0 when V is empty.
> > 
> > Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied with additional comment:
"It is a well spread shortcut in makefiles, see git grep '$(if $(*V'"

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-09-23 14:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08 12:33 [dpdk-dev] [PATCH] mk: remove module compilation noise Ferruh Yigit
2016-09-22 23:35 ` Thomas Monjalon
2016-09-22 23:42   ` [dpdk-dev] [PATCH] mk: fix verbosity zero Thomas Monjalon
2016-09-23  9:06     ` Ferruh Yigit
2016-09-23  9:30       ` Thomas Monjalon
2016-09-23  9:33     ` Ferruh Yigit
2016-09-23 14:26       ` Thomas Monjalon
2016-09-23  9:04   ` [dpdk-dev] [PATCH] mk: remove module compilation noise Ferruh Yigit

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).