[dpdk-dev] app: fix proc_info app dependency

Message ID ab9cedc7976ffda3060682a55d15d0cb187ad248.1515765793.git.anatoly.burakov@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Anatoly Burakov Jan. 12, 2018, 2:17 p.m. UTC
  proc_info app is compiled unconditionally on Linux, but it's
actually dependent on librte_ethdev library, which prevents
DPDK from building without librte_ethdev library enabled.

Fixes: 22561383ea17 ("app: replace dump_cfg by proc_info")
Cc: maryam.tahhan@intel.com
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Comments

Thomas Monjalon Jan. 12, 2018, 2:59 p.m. UTC | #1
12/01/2018 15:17, Anatoly Burakov:
> proc_info app is compiled unconditionally on Linux, but it's
> actually dependent on librte_ethdev library, which prevents
> DPDK from building without librte_ethdev library enabled.
> 
> Fixes: 22561383ea17 ("app: replace dump_cfg by proc_info")
> Cc: maryam.tahhan@intel.com
> Cc: stable@dpdk.org

nit: please insert a blank line here

> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>  DIRS-$(CONFIG_RTE_TEST_PMD) += test-pmd
> -DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += proc_info
> +ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
> +DIRS-$(CONFIG_RTE_LIBRTE_ETHER) += proc_info
> +endif
>  DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += pdump

What about pdump and testpmd?

I guess a lot of things do not compile without ethdev, isn't it?
  
Anatoly Burakov Jan. 12, 2018, 3:04 p.m. UTC | #2
On 12-Jan-18 2:59 PM, Thomas Monjalon wrote:
> 12/01/2018 15:17, Anatoly Burakov:
>> proc_info app is compiled unconditionally on Linux, but it's
>> actually dependent on librte_ethdev library, which prevents
>> DPDK from building without librte_ethdev library enabled.
>>
>> Fixes: 22561383ea17 ("app: replace dump_cfg by proc_info")
>> Cc: maryam.tahhan@intel.com
>> Cc: stable@dpdk.org
> 
> nit: please insert a blank line here
> 
>> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>> ---
>>   DIRS-$(CONFIG_RTE_TEST_PMD) += test-pmd
>> -DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += proc_info
>> +ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
>> +DIRS-$(CONFIG_RTE_LIBRTE_ETHER) += proc_info
>> +endif
>>   DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += pdump
> 
> What about pdump and testpmd?
> 
> I guess a lot of things do not compile without ethdev, isn't it?
> 

True, however one can still disable testpmd compilation with a config 
option (CONFIG_RTE_TEST_PMD). I guess a better fix for this would be a 
new config option (i.e. CONFIG_RTE_PROC_INFO)?
  
Thomas Monjalon Jan. 12, 2018, 3:41 p.m. UTC | #3
12/01/2018 16:04, Burakov, Anatoly:
> On 12-Jan-18 2:59 PM, Thomas Monjalon wrote:
> > 12/01/2018 15:17, Anatoly Burakov:
> >> proc_info app is compiled unconditionally on Linux, but it's
> >> actually dependent on librte_ethdev library, which prevents
> >> DPDK from building without librte_ethdev library enabled.
> >>
> >> Fixes: 22561383ea17 ("app: replace dump_cfg by proc_info")
> >> Cc: maryam.tahhan@intel.com
> >> Cc: stable@dpdk.org
> > 
> > nit: please insert a blank line here
> > 
> >> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> >> ---
> >>   DIRS-$(CONFIG_RTE_TEST_PMD) += test-pmd
> >> -DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += proc_info
> >> +ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
> >> +DIRS-$(CONFIG_RTE_LIBRTE_ETHER) += proc_info
> >> +endif
> >>   DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += pdump
> > 
> > What about pdump and testpmd?
> > 
> > I guess a lot of things do not compile without ethdev, isn't it?
> > 
> 
> True, however one can still disable testpmd compilation with a config 
> option (CONFIG_RTE_TEST_PMD). I guess a better fix for this would be a 
> new config option (i.e. CONFIG_RTE_PROC_INFO)?

Yes, good idea.
  

Patch

diff --git a/app/Makefile b/app/Makefile
index 24c9067..d7fc26d 100644
--- a/app/Makefile
+++ b/app/Makefile
@@ -4,7 +4,9 @@ 
 include $(RTE_SDK)/mk/rte.vars.mk
 
 DIRS-$(CONFIG_RTE_TEST_PMD) += test-pmd
-DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += proc_info
+ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
+DIRS-$(CONFIG_RTE_LIBRTE_ETHER) += proc_info
+endif
 DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += pdump
 
 ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)