DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation
@ 2016-06-21  8:11 Panu Matilainen
  2016-06-21  8:11 ` [dpdk-dev] [PATCH 2/3] pdump: fix missing dependency on libpthread Panu Matilainen
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Panu Matilainen @ 2016-06-21  8:11 UTC (permalink / raw)
  To: dev; +Cc: christian.ehrhardt, thomas.monjalon

In other libraries, dependency list is always appended to, but
in commit 6cbf4f75e059 it with an assignment. This causes the
librte_eal dependency added in commit 6cbf4f75e059 to get discarded,
resulting in missing dependency on librte_eal.

Fixes: b3688bee81a8 ("pipeline: new packet framework logic")
Fixes: 6cbf4f75e059 ("mk: fix missing internal dependencies")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
---
 lib/librte_pipeline/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
index 95387aa..a8f3128 100644
--- a/lib/librte_pipeline/Makefile
+++ b/lib/librte_pipeline/Makefile
@@ -53,7 +53,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_PIPELINE)-include += rte_pipeline.h
 
 # this lib depends upon:
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_eal
-DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_table
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port
 
 include $(RTE_SDK)/mk/rte.lib.mk
-- 
2.5.5

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

* [dpdk-dev] [PATCH 2/3] pdump: fix missing dependency on libpthread
  2016-06-21  8:11 [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation Panu Matilainen
@ 2016-06-21  8:11 ` Panu Matilainen
  2016-06-21  8:11 ` [dpdk-dev] [PATCH 3/3] mk: fail build on incomplete shared library dependencies Panu Matilainen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 21+ messages in thread
From: Panu Matilainen @ 2016-06-21  8:11 UTC (permalink / raw)
  To: dev; +Cc: christian.ehrhardt, thomas.monjalon

Fixes: 278f945402c5 ("pdump: add new library for packet capture")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
---
 lib/librte_pdump/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_pdump/Makefile b/lib/librte_pdump/Makefile
index af81a28..a506c4d 100644
--- a/lib/librte_pdump/Makefile
+++ b/lib/librte_pdump/Makefile
@@ -36,6 +36,7 @@ LIB = librte_pdump.a
 
 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
 CFLAGS += -D_GNU_SOURCE
+LDLIBS += -lpthread
 
 EXPORT_MAP := rte_pdump_version.map
 
-- 
2.5.5

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

* [dpdk-dev] [PATCH 3/3] mk: fail build on incomplete shared library dependencies
  2016-06-21  8:11 [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation Panu Matilainen
  2016-06-21  8:11 ` [dpdk-dev] [PATCH 2/3] pdump: fix missing dependency on libpthread Panu Matilainen
@ 2016-06-21  8:11 ` Panu Matilainen
  2016-06-21 10:01 ` [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation Dumitrescu, Cristian
  2016-06-26 16:41 ` [dpdk-dev] [PATCH v2 0/7] fix dependencies Thomas Monjalon
  3 siblings, 0 replies; 21+ messages in thread
From: Panu Matilainen @ 2016-06-21  8:11 UTC (permalink / raw)
  To: dev; +Cc: christian.ehrhardt, thomas.monjalon

Require all symbols used by a DSO to be resolvable via LDLIBS at
build-time. Previously it was possible to build a library with
incomplete dependencies which could then fail at run-time.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
---
 mk/rte.lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index 1ff403f..f75ec10 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -94,7 +94,7 @@ O_TO_A_DO = @set -e; \
 	echo $(O_TO_A_CMD) > $(call exe2cmd,$(@))
 
 O_TO_S = $(LD) -L$(RTE_OUTPUT)/lib $(_CPU_LDFLAGS) $(EXTRA_LDFLAGS) \
-	  -shared $(OBJS-y) $(LDLIBS) -Wl,-soname,$(LIB) -o $(LIB)
+	  -shared $(OBJS-y) -z defs $(LDLIBS) -Wl,-soname,$(LIB) -o $(LIB)
 O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight
 O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)","  LD $(@)")
 O_TO_S_DO = @set -e; \
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation
  2016-06-21  8:11 [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation Panu Matilainen
  2016-06-21  8:11 ` [dpdk-dev] [PATCH 2/3] pdump: fix missing dependency on libpthread Panu Matilainen
  2016-06-21  8:11 ` [dpdk-dev] [PATCH 3/3] mk: fail build on incomplete shared library dependencies Panu Matilainen
@ 2016-06-21 10:01 ` Dumitrescu, Cristian
  2016-06-21 10:25   ` Panu Matilainen
  2016-06-26 16:41 ` [dpdk-dev] [PATCH v2 0/7] fix dependencies Thomas Monjalon
  3 siblings, 1 reply; 21+ messages in thread
From: Dumitrescu, Cristian @ 2016-06-21 10:01 UTC (permalink / raw)
  To: Panu Matilainen, dev; +Cc: christian.ehrhardt, thomas.monjalon



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Panu Matilainen
> Sent: Tuesday, June 21, 2016 9:12 AM
> To: dev@dpdk.org
> Cc: christian.ehrhardt@canonical.com; thomas.monjalon@6wind.com
> Subject: [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list
> truncation
> 
> In other libraries, dependency list is always appended to, but
> in commit 6cbf4f75e059 it with an assignment. This causes the
> librte_eal dependency added in commit 6cbf4f75e059 to get discarded,
> resulting in missing dependency on librte_eal.
> 
> Fixes: b3688bee81a8 ("pipeline: new packet framework logic")
> Fixes: 6cbf4f75e059 ("mk: fix missing internal dependencies")
> 
> Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
> ---
>  lib/librte_pipeline/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
> index 95387aa..a8f3128 100644
> --- a/lib/librte_pipeline/Makefile
> +++ b/lib/librte_pipeline/Makefile
> @@ -53,7 +53,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_PIPELINE)-include +=
> rte_pipeline.h
> 
>  # this lib depends upon:
>  DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_eal
> -DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_table
> +DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
>  DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port
> 
>  include $(RTE_SDK)/mk/rte.lib.mk
> --
> 2.5.5


In release 16.4, EAL was missing from the dependency list, now it is added. The librte_pipeline uses rte_malloc, therefore it depends on librte_eal being present.

In the Makefile of the other Packet Framework libraries (librte_port, librte_table), it looks like the first dependency in the list is EAL, which is listed with the assignment operator, followed by others that are listed with the append operator:
	DEPDIRS-$(CONFIG_RTE_LIBRTE_XYZ) := lib/librte_eal
	DEPDIRS-$(CONFIG_RTE_LIBRTE_XYZ) += lib/librte_some other lib

Therefore, at least for cosmetic reasons, we should probably do the same in librte_pipeline, which requires changing both the librte_eal and the librte_table lines as below:
	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_eal
	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port

However, some other libraries e.g. librte_lpm simply add the EAL dependency using the append operator:
	DEPDIRS-$(CONFIG_RTE_LIBRTE_LPM) += lib/librte_eal

To be honest, I need to refresh my knowledge on make, I don't remember right now when we should use the assignment and when the append. Do we need to use the assign for first dependency (EAL) and append for others or should we use append everywhere?

Thanks,
Cristian

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

* Re: [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation
  2016-06-21 10:01 ` [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation Dumitrescu, Cristian
@ 2016-06-21 10:25   ` Panu Matilainen
  2016-06-21 10:31     ` Bruce Richardson
  0 siblings, 1 reply; 21+ messages in thread
From: Panu Matilainen @ 2016-06-21 10:25 UTC (permalink / raw)
  To: Dumitrescu, Cristian, dev; +Cc: christian.ehrhardt, thomas.monjalon

On 06/21/2016 01:01 PM, Dumitrescu, Cristian wrote:
>
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Panu Matilainen
>> Sent: Tuesday, June 21, 2016 9:12 AM
>> To: dev@dpdk.org
>> Cc: christian.ehrhardt@canonical.com; thomas.monjalon@6wind.com
>> Subject: [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list
>> truncation
>>
>> In other libraries, dependency list is always appended to, but
>> in commit 6cbf4f75e059 it with an assignment. This causes the
>> librte_eal dependency added in commit 6cbf4f75e059 to get discarded,
>> resulting in missing dependency on librte_eal.
>>
>> Fixes: b3688bee81a8 ("pipeline: new packet framework logic")
>> Fixes: 6cbf4f75e059 ("mk: fix missing internal dependencies")
>>
>> Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
>> ---
>>  lib/librte_pipeline/Makefile | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
>> index 95387aa..a8f3128 100644
>> --- a/lib/librte_pipeline/Makefile
>> +++ b/lib/librte_pipeline/Makefile
>> @@ -53,7 +53,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_PIPELINE)-include +=
>> rte_pipeline.h
>>
>>  # this lib depends upon:
>>  DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_eal
>> -DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_table
>> +DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
>>  DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port
>>
>>  include $(RTE_SDK)/mk/rte.lib.mk
>> --
>> 2.5.5
>
>
> In release 16.4, EAL was missing from the dependency list, now it is added. The librte_pipeline uses rte_malloc, therefore it depends on librte_eal being present.
>
> In the Makefile of the other Packet Framework libraries (librte_port, librte_table), it looks like the first dependency in the list is EAL, which is listed with the assignment operator, followed by others that are listed with the append operator:
> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_XYZ) := lib/librte_eal
> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_XYZ) += lib/librte_some other lib
>
> Therefore, at least for cosmetic reasons, we should probably do the same in librte_pipeline, which requires changing both the librte_eal and the librte_table lines as below:
> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_eal
> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port

Ah, didn't notice those because the assignment is first of the dependencies.

>
> However, some other libraries e.g. librte_lpm simply add the EAL dependency using the append operator:
> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_LPM) += lib/librte_eal
>
> To be honest, I need to refresh my knowledge on make, I don't remember right now when we should use the assignment and when the append. Do we need to use the assign for first dependency (EAL) and append for others or should we use append everywhere?

At least in automake, you need to assign before you can append. But in 
gmake this apparently is not the case, quoting from 
https://www.gnu.org/software/make/manual/html_node/Appending.html:

"When the variable in question has not been defined before, ‘+=’ acts 
just like normal ‘=’: it defines a recursively-expanded variable. 
However, when there is a previous definition, exactly what ‘+=’ does 
depends on what flavor of variable you defined originally."

So there's no need to use := anywhere for the dependencies, in fact its 
probably best avoided to avoid issues like this. Of course after the 
third patch in this "series" is applied, mistakes like these can no 
longer go unnoticed.

	- Panu -

> Thanks,
> Cristian
>

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

* Re: [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation
  2016-06-21 10:25   ` Panu Matilainen
@ 2016-06-21 10:31     ` Bruce Richardson
  2016-06-21 10:44       ` Panu Matilainen
  0 siblings, 1 reply; 21+ messages in thread
From: Bruce Richardson @ 2016-06-21 10:31 UTC (permalink / raw)
  To: Panu Matilainen
  Cc: Dumitrescu, Cristian, dev, christian.ehrhardt, thomas.monjalon

On Tue, Jun 21, 2016 at 01:25:52PM +0300, Panu Matilainen wrote:
> On 06/21/2016 01:01 PM, Dumitrescu, Cristian wrote:
> >
> >
> >>-----Original Message-----
> >>From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Panu Matilainen
> >>Sent: Tuesday, June 21, 2016 9:12 AM
> >>To: dev@dpdk.org
> >>Cc: christian.ehrhardt@canonical.com; thomas.monjalon@6wind.com
> >>Subject: [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list
> >>truncation
> >>
> >>In other libraries, dependency list is always appended to, but
> >>in commit 6cbf4f75e059 it with an assignment. This causes the
> >>librte_eal dependency added in commit 6cbf4f75e059 to get discarded,
> >>resulting in missing dependency on librte_eal.
> >>
> >>Fixes: b3688bee81a8 ("pipeline: new packet framework logic")
> >>Fixes: 6cbf4f75e059 ("mk: fix missing internal dependencies")
> >>
> >>Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
> >>---
> >> lib/librte_pipeline/Makefile | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >>diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
> >>index 95387aa..a8f3128 100644
> >>--- a/lib/librte_pipeline/Makefile
> >>+++ b/lib/librte_pipeline/Makefile
> >>@@ -53,7 +53,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_PIPELINE)-include +=
> >>rte_pipeline.h
> >>
> >> # this lib depends upon:
> >> DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_eal
> >>-DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_table
> >>+DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
> >> DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port
> >>
> >> include $(RTE_SDK)/mk/rte.lib.mk
> >>--
> >>2.5.5
> >
> >
> >In release 16.4, EAL was missing from the dependency list, now it is added. The librte_pipeline uses rte_malloc, therefore it depends on librte_eal being present.
> >
> >In the Makefile of the other Packet Framework libraries (librte_port, librte_table), it looks like the first dependency in the list is EAL, which is listed with the assignment operator, followed by others that are listed with the append operator:
> >	DEPDIRS-$(CONFIG_RTE_LIBRTE_XYZ) := lib/librte_eal
> >	DEPDIRS-$(CONFIG_RTE_LIBRTE_XYZ) += lib/librte_some other lib
> >
> >Therefore, at least for cosmetic reasons, we should probably do the same in librte_pipeline, which requires changing both the librte_eal and the librte_table lines as below:
> >	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_eal
> >	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
> >	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port
> 
> Ah, didn't notice those because the assignment is first of the dependencies.
> 
> >
> >However, some other libraries e.g. librte_lpm simply add the EAL dependency using the append operator:
> >	DEPDIRS-$(CONFIG_RTE_LIBRTE_LPM) += lib/librte_eal
> >
> >To be honest, I need to refresh my knowledge on make, I don't remember right now when we should use the assignment and when the append. Do we need to use the assign for first dependency (EAL) and append for others or should we use append everywhere?
> 
> At least in automake, you need to assign before you can append. But in gmake
> this apparently is not the case, quoting from
> https://www.gnu.org/software/make/manual/html_node/Appending.html:
> 
> "When the variable in question has not been defined before, ‘+=’ acts just
> like normal ‘=’: it defines a recursively-expanded variable. However, when
> there is a previous definition, exactly what ‘+=’ does depends on what
> flavor of variable you defined originally."
> 
> So there's no need to use := anywhere for the dependencies, in fact its
> probably best avoided to avoid issues like this. Of course after the third
> patch in this "series" is applied, mistakes like these can no longer go
> unnoticed.
> 
Will the build be any slower with everything defaulting to recursively expanded
variables rather than the simply-expanded variables defined by the initial ":="?

/Bruce

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

* Re: [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation
  2016-06-21 10:31     ` Bruce Richardson
@ 2016-06-21 10:44       ` Panu Matilainen
  2016-06-21 10:58         ` Dumitrescu, Cristian
  0 siblings, 1 reply; 21+ messages in thread
From: Panu Matilainen @ 2016-06-21 10:44 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: Dumitrescu, Cristian, dev, christian.ehrhardt, thomas.monjalon

On 06/21/2016 01:31 PM, Bruce Richardson wrote:
> On Tue, Jun 21, 2016 at 01:25:52PM +0300, Panu Matilainen wrote:
>> On 06/21/2016 01:01 PM, Dumitrescu, Cristian wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Panu Matilainen
>>>> Sent: Tuesday, June 21, 2016 9:12 AM
>>>> To: dev@dpdk.org
>>>> Cc: christian.ehrhardt@canonical.com; thomas.monjalon@6wind.com
>>>> Subject: [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list
>>>> truncation
>>>>
>>>> In other libraries, dependency list is always appended to, but
>>>> in commit 6cbf4f75e059 it with an assignment. This causes the
>>>> librte_eal dependency added in commit 6cbf4f75e059 to get discarded,
>>>> resulting in missing dependency on librte_eal.
>>>>
>>>> Fixes: b3688bee81a8 ("pipeline: new packet framework logic")
>>>> Fixes: 6cbf4f75e059 ("mk: fix missing internal dependencies")
>>>>
>>>> Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
>>>> ---
>>>> lib/librte_pipeline/Makefile | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
>>>> index 95387aa..a8f3128 100644
>>>> --- a/lib/librte_pipeline/Makefile
>>>> +++ b/lib/librte_pipeline/Makefile
>>>> @@ -53,7 +53,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_PIPELINE)-include +=
>>>> rte_pipeline.h
>>>>
>>>> # this lib depends upon:
>>>> DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_eal
>>>> -DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_table
>>>> +DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
>>>> DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port
>>>>
>>>> include $(RTE_SDK)/mk/rte.lib.mk
>>>> --
>>>> 2.5.5
>>>
>>>
>>> In release 16.4, EAL was missing from the dependency list, now it is added. The librte_pipeline uses rte_malloc, therefore it depends on librte_eal being present.
>>>
>>> In the Makefile of the other Packet Framework libraries (librte_port, librte_table), it looks like the first dependency in the list is EAL, which is listed with the assignment operator, followed by others that are listed with the append operator:
>>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_XYZ) := lib/librte_eal
>>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_XYZ) += lib/librte_some other lib
>>>
>>> Therefore, at least for cosmetic reasons, we should probably do the same in librte_pipeline, which requires changing both the librte_eal and the librte_table lines as below:
>>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_eal
>>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
>>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port
>>
>> Ah, didn't notice those because the assignment is first of the dependencies.
>>
>>>
>>> However, some other libraries e.g. librte_lpm simply add the EAL dependency using the append operator:
>>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_LPM) += lib/librte_eal
>>>
>>> To be honest, I need to refresh my knowledge on make, I don't remember right now when we should use the assignment and when the append. Do we need to use the assign for first dependency (EAL) and append for others or should we use append everywhere?
>>
>> At least in automake, you need to assign before you can append. But in gmake
>> this apparently is not the case, quoting from
>> https://www.gnu.org/software/make/manual/html_node/Appending.html:
>>
>> "When the variable in question has not been defined before, ‘+=’ acts just
>> like normal ‘=’: it defines a recursively-expanded variable. However, when
>> there is a previous definition, exactly what ‘+=’ does depends on what
>> flavor of variable you defined originally."
>>
>> So there's no need to use := anywhere for the dependencies, in fact its
>> probably best avoided to avoid issues like this. Of course after the third
>> patch in this "series" is applied, mistakes like these can no longer go
>> unnoticed.
>>
> Will the build be any slower with everything defaulting to recursively expanded
> variables rather than the simply-expanded variables defined by the initial ":="?

Bruce, everything already *is* defaulting to recursively expanded 
variables, except for the three libraries here which have used := for 
who knows what (historical or other) reason. And out of those three 
exceptions, one is buggy. Which is what I'm addressing here.

	- Panu -

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

* Re: [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation
  2016-06-21 10:44       ` Panu Matilainen
@ 2016-06-21 10:58         ` Dumitrescu, Cristian
  2016-06-21 11:53           ` Panu Matilainen
  0 siblings, 1 reply; 21+ messages in thread
From: Dumitrescu, Cristian @ 2016-06-21 10:58 UTC (permalink / raw)
  To: Panu Matilainen, Richardson, Bruce
  Cc: dev, christian.ehrhardt, thomas.monjalon



> -----Original Message-----
> From: Panu Matilainen [mailto:pmatilai@redhat.com]
> Sent: Tuesday, June 21, 2016 11:45 AM
> To: Richardson, Bruce <bruce.richardson@intel.com>
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; dev@dpdk.org;
> christian.ehrhardt@canonical.com; thomas.monjalon@6wind.com
> Subject: Re: [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list
> truncation
> 
> On 06/21/2016 01:31 PM, Bruce Richardson wrote:
> > On Tue, Jun 21, 2016 at 01:25:52PM +0300, Panu Matilainen wrote:
> >> On 06/21/2016 01:01 PM, Dumitrescu, Cristian wrote:
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Panu
> Matilainen
> >>>> Sent: Tuesday, June 21, 2016 9:12 AM
> >>>> To: dev@dpdk.org
> >>>> Cc: christian.ehrhardt@canonical.com; thomas.monjalon@6wind.com
> >>>> Subject: [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list
> >>>> truncation
> >>>>
> >>>> In other libraries, dependency list is always appended to, but
> >>>> in commit 6cbf4f75e059 it with an assignment. This causes the
> >>>> librte_eal dependency added in commit 6cbf4f75e059 to get discarded,
> >>>> resulting in missing dependency on librte_eal.
> >>>>
> >>>> Fixes: b3688bee81a8 ("pipeline: new packet framework logic")
> >>>> Fixes: 6cbf4f75e059 ("mk: fix missing internal dependencies")
> >>>>
> >>>> Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
> >>>> ---
> >>>> lib/librte_pipeline/Makefile | 2 +-
> >>>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
> >>>> index 95387aa..a8f3128 100644
> >>>> --- a/lib/librte_pipeline/Makefile
> >>>> +++ b/lib/librte_pipeline/Makefile
> >>>> @@ -53,7 +53,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_PIPELINE)-
> include +=
> >>>> rte_pipeline.h
> >>>>
> >>>> # this lib depends upon:
> >>>> DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_eal
> >>>> -DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_table
> >>>> +DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
> >>>> DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port
> >>>>
> >>>> include $(RTE_SDK)/mk/rte.lib.mk
> >>>> --
> >>>> 2.5.5
> >>>
> >>>
> >>> In release 16.4, EAL was missing from the dependency list, now it is
> added. The librte_pipeline uses rte_malloc, therefore it depends on
> librte_eal being present.
> >>>
> >>> In the Makefile of the other Packet Framework libraries (librte_port,
> librte_table), it looks like the first dependency in the list is EAL, which is listed
> with the assignment operator, followed by others that are listed with the
> append operator:
> >>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_XYZ) := lib/librte_eal
> >>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_XYZ) += lib/librte_some other lib
> >>>
> >>> Therefore, at least for cosmetic reasons, we should probably do the
> same in librte_pipeline, which requires changing both the librte_eal and the
> librte_table lines as below:
> >>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_eal
> >>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
> >>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port
> >>
> >> Ah, didn't notice those because the assignment is first of the
> dependencies.
> >>
> >>>
> >>> However, some other libraries e.g. librte_lpm simply add the EAL
> dependency using the append operator:
> >>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_LPM) += lib/librte_eal
> >>>
> >>> To be honest, I need to refresh my knowledge on make, I don't
> remember right now when we should use the assignment and when the
> append. Do we need to use the assign for first dependency (EAL) and
> append for others or should we use append everywhere?
> >>
> >> At least in automake, you need to assign before you can append. But in
> gmake
> >> this apparently is not the case, quoting from
> >>
> https://www.gnu.org/software/make/manual/html_node/Appending.html:
> >>
> >> "When the variable in question has not been defined before, ‘+=’ acts
> just
> >> like normal ‘=’: it defines a recursively-expanded variable. However,
> when
> >> there is a previous definition, exactly what ‘+=’ does depends on what
> >> flavor of variable you defined originally."
> >>
> >> So there's no need to use := anywhere for the dependencies, in fact its
> >> probably best avoided to avoid issues like this. Of course after the third
> >> patch in this "series" is applied, mistakes like these can no longer go
> >> unnoticed.
> >>
> > Will the build be any slower with everything defaulting to recursively
> expanded
> > variables rather than the simply-expanded variables defined by the initial
> ":="?
> 
> Bruce, everything already *is* defaulting to recursively expanded
> variables, except for the three libraries here which have used := for
> who knows what (historical or other) reason. And out of those three
> exceptions, one is buggy. Which is what I'm addressing here.
> 
> 	- Panu -

Yes, you're right, looks like the assign operator is only used in these 3 places. Therefore, it would probably make sense to replace it with the append operator for all of them?

dpdk/lib> grep DEPDIRS `find . -name Makefile` | grep '+=' | wc -l
60
dpdk/lib> grep DEPDIRS `find . -name Makefile` | grep ':=' | wc -l
3
dpdk/lib> grep DEPDIRS `find . -name Makefile` | grep ':='
./librte_pipeline/Makefile:DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_table
./librte_port/Makefile:DEPDIRS-$(CONFIG_RTE_LIBRTE_PORT) := lib/librte_eal
./librte_table/Makefile:DEPDIRS-$(CONFIG_RTE_LIBRTE_TABLE) := lib/librte_eal

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

* Re: [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation
  2016-06-21 10:58         ` Dumitrescu, Cristian
@ 2016-06-21 11:53           ` Panu Matilainen
  0 siblings, 0 replies; 21+ messages in thread
From: Panu Matilainen @ 2016-06-21 11:53 UTC (permalink / raw)
  To: Dumitrescu, Cristian, Richardson, Bruce
  Cc: dev, christian.ehrhardt, thomas.monjalon

On 06/21/2016 01:58 PM, Dumitrescu, Cristian wrote:
>
>
>> -----Original Message-----
>> From: Panu Matilainen [mailto:pmatilai@redhat.com]
>> Sent: Tuesday, June 21, 2016 11:45 AM
>> To: Richardson, Bruce <bruce.richardson@intel.com>
>> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; dev@dpdk.org;
>> christian.ehrhardt@canonical.com; thomas.monjalon@6wind.com
>> Subject: Re: [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list
>> truncation
>>
>> On 06/21/2016 01:31 PM, Bruce Richardson wrote:
>>> On Tue, Jun 21, 2016 at 01:25:52PM +0300, Panu Matilainen wrote:
>>>> On 06/21/2016 01:01 PM, Dumitrescu, Cristian wrote:
>>>>>
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Panu
>> Matilainen
>>>>>> Sent: Tuesday, June 21, 2016 9:12 AM
>>>>>> To: dev@dpdk.org
>>>>>> Cc: christian.ehrhardt@canonical.com; thomas.monjalon@6wind.com
>>>>>> Subject: [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list
>>>>>> truncation
>>>>>>
>>>>>> In other libraries, dependency list is always appended to, but
>>>>>> in commit 6cbf4f75e059 it with an assignment. This causes the
>>>>>> librte_eal dependency added in commit 6cbf4f75e059 to get discarded,
>>>>>> resulting in missing dependency on librte_eal.
>>>>>>
>>>>>> Fixes: b3688bee81a8 ("pipeline: new packet framework logic")
>>>>>> Fixes: 6cbf4f75e059 ("mk: fix missing internal dependencies")
>>>>>>
>>>>>> Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
>>>>>> ---
>>>>>> lib/librte_pipeline/Makefile | 2 +-
>>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
>>>>>> index 95387aa..a8f3128 100644
>>>>>> --- a/lib/librte_pipeline/Makefile
>>>>>> +++ b/lib/librte_pipeline/Makefile
>>>>>> @@ -53,7 +53,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_PIPELINE)-
>> include +=
>>>>>> rte_pipeline.h
>>>>>>
>>>>>> # this lib depends upon:
>>>>>> DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_eal
>>>>>> -DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_table
>>>>>> +DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
>>>>>> DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port
>>>>>>
>>>>>> include $(RTE_SDK)/mk/rte.lib.mk
>>>>>> --
>>>>>> 2.5.5
>>>>>
>>>>>
>>>>> In release 16.4, EAL was missing from the dependency list, now it is
>> added. The librte_pipeline uses rte_malloc, therefore it depends on
>> librte_eal being present.
>>>>>
>>>>> In the Makefile of the other Packet Framework libraries (librte_port,
>> librte_table), it looks like the first dependency in the list is EAL, which is listed
>> with the assignment operator, followed by others that are listed with the
>> append operator:
>>>>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_XYZ) := lib/librte_eal
>>>>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_XYZ) += lib/librte_some other lib
>>>>>
>>>>> Therefore, at least for cosmetic reasons, we should probably do the
>> same in librte_pipeline, which requires changing both the librte_eal and the
>> librte_table lines as below:
>>>>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_eal
>>>>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
>>>>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port
>>>>
>>>> Ah, didn't notice those because the assignment is first of the
>> dependencies.
>>>>
>>>>>
>>>>> However, some other libraries e.g. librte_lpm simply add the EAL
>> dependency using the append operator:
>>>>> 	DEPDIRS-$(CONFIG_RTE_LIBRTE_LPM) += lib/librte_eal
>>>>>
>>>>> To be honest, I need to refresh my knowledge on make, I don't
>> remember right now when we should use the assignment and when the
>> append. Do we need to use the assign for first dependency (EAL) and
>> append for others or should we use append everywhere?
>>>>
>>>> At least in automake, you need to assign before you can append. But in
>> gmake
>>>> this apparently is not the case, quoting from
>>>>
>> https://www.gnu.org/software/make/manual/html_node/Appending.html:
>>>>
>>>> "When the variable in question has not been defined before, ‘+=’ acts
>> just
>>>> like normal ‘=’: it defines a recursively-expanded variable. However,
>> when
>>>> there is a previous definition, exactly what ‘+=’ does depends on what
>>>> flavor of variable you defined originally."
>>>>
>>>> So there's no need to use := anywhere for the dependencies, in fact its
>>>> probably best avoided to avoid issues like this. Of course after the third
>>>> patch in this "series" is applied, mistakes like these can no longer go
>>>> unnoticed.
>>>>
>>> Will the build be any slower with everything defaulting to recursively
>> expanded
>>> variables rather than the simply-expanded variables defined by the initial
>> ":="?
>>
>> Bruce, everything already *is* defaulting to recursively expanded
>> variables, except for the three libraries here which have used := for
>> who knows what (historical or other) reason. And out of those three
>> exceptions, one is buggy. Which is what I'm addressing here.
>>
>> 	- Panu -
>
> Yes, you're right, looks like the assign operator is only used in these 3 places. Therefore, it would probably make sense to replace it with the append operator for all of them?
>
> dpdk/lib> grep DEPDIRS `find . -name Makefile` | grep '+=' | wc -l
> 60
> dpdk/lib> grep DEPDIRS `find . -name Makefile` | grep ':=' | wc -l
> 3
> dpdk/lib> grep DEPDIRS `find . -name Makefile` | grep ':='
> ./librte_pipeline/Makefile:DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_table
> ./librte_port/Makefile:DEPDIRS-$(CONFIG_RTE_LIBRTE_PORT) := lib/librte_eal
> ./librte_table/Makefile:DEPDIRS-$(CONFIG_RTE_LIBRTE_TABLE) := lib/librte_eal
>

Yeah, it wouldn't hurt to be consistent. OTOH only the one in 
librte_pipeline is an actual problem.

	- Panu -

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

* [dpdk-dev] [PATCH v2 0/7] fix dependencies
  2016-06-21  8:11 [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation Panu Matilainen
                   ` (2 preceding siblings ...)
  2016-06-21 10:01 ` [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation Dumitrescu, Cristian
@ 2016-06-26 16:41 ` Thomas Monjalon
  2016-06-26 16:41   ` [dpdk-dev] [PATCH v2 1/7] mk: remove traces of combined library Thomas Monjalon
                     ` (7 more replies)
  3 siblings, 8 replies; 21+ messages in thread
From: Thomas Monjalon @ 2016-06-26 16:41 UTC (permalink / raw)
  To: Panu Matilainen; +Cc: dev

Thanks to the option '-z defs' it is possible to check for missing
link dependencies.
This series add the missing internal and external dependencies,
fix use of rte.extlib.mk and force the check with '-z defs'.

v2:
- remove traces of combined library
- fix a lot more internal dependencies
- fix external library link
- fix external dependencies of crypto drivers

Panu Matilainen (3):
  pipeline: fix truncated dependency list
  pdump: fix missing dependency on libpthread
  mk: check shared library dependencies

Thomas Monjalon (4):
  mk: remove traces of combined library
  mk: fix external library link
  mk: fix internal dependencies
  mk: fix external dependencies of crypto drivers

 drivers/crypto/aesni_gcm/Makefile |  5 ++++-
 drivers/crypto/aesni_mb/Makefile  |  5 ++++-
 drivers/crypto/kasumi/Makefile    |  5 ++++-
 drivers/crypto/null/Makefile      |  3 ++-
 drivers/crypto/qat/Makefile       |  1 +
 drivers/crypto/snow3g/Makefile    |  5 ++++-
 drivers/net/af_packet/Makefile    |  1 +
 drivers/net/null/Makefile         |  1 +
 drivers/net/pcap/Makefile         |  1 +
 drivers/net/szedata2/Makefile     |  2 ++
 drivers/net/vhost/Makefile        |  1 +
 drivers/net/virtio/Makefile       |  1 +
 examples/ethtool/lib/Makefile     |  4 ++++
 lib/librte_ip_frag/Makefile       |  6 +++---
 lib/librte_kni/Makefile           |  5 +++--
 lib/librte_pdump/Makefile         |  2 ++
 lib/librte_pipeline/Makefile      |  4 +++-
 lib/librte_reorder/Makefile       |  1 +
 lib/librte_vhost/Makefile         |  1 +
 mk/rte.lib.mk                     | 22 ++--------------------
 20 files changed, 45 insertions(+), 31 deletions(-)

-- 
2.7.0

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

* [dpdk-dev] [PATCH v2 1/7] mk: remove traces of combined library
  2016-06-26 16:41 ` [dpdk-dev] [PATCH v2 0/7] fix dependencies Thomas Monjalon
@ 2016-06-26 16:41   ` Thomas Monjalon
  2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 2/7] mk: fix external library link Thomas Monjalon
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 21+ messages in thread
From: Thomas Monjalon @ 2016-06-26 16:41 UTC (permalink / raw)
  To: Panu Matilainen; +Cc: dev

Fixes: 948fd64befc3 ("mk: replace the combined library with a linker script")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 mk/rte.lib.mk | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index 1ff403f..d2523ee 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -102,24 +102,6 @@ O_TO_S_DO = @set -e; \
 	$(O_TO_S) && \
 	echo $(O_TO_S_CMD) > $(call exe2cmd,$(@))
 
-ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
-O_TO_C = $(AR) crus $(LIB_ONE) $(OBJS-y)
-O_TO_C_STR = $(subst ','\'',$(O_TO_C)) #'# fix syntax highlight
-O_TO_C_DISP = $(if $(V),"$(O_TO_C_STR)","  AR_C $(@)")
-O_TO_C_DO = @set -e; \
-	$(lib_dir) \
-	$(copy_obj)
-else
-O_TO_C = $(LD) -shared $(OBJS-y) -o $(LIB_ONE)
-O_TO_C_STR = $(subst ','\'',$(O_TO_C)) #'# fix syntax highlight
-O_TO_C_DISP = $(if $(V),"$(O_TO_C_STR)","  LD_C $(@)")
-O_TO_C_DO = @set -e; \
-	$(lib_dir) \
-	$(copy_obj)
-endif
-
-copy_obj = cp -f $(OBJS-y) $(RTE_OUTPUT)/build/lib;
-lib_dir = [ -d $(RTE_OUTPUT)/lib ] || mkdir -p $(RTE_OUTPUT)/lib;
 -include .$(LIB).cmd
 
 #
-- 
2.7.0

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

* [dpdk-dev] [PATCH v2 2/7] mk: fix external library link
  2016-06-26 16:41 ` [dpdk-dev] [PATCH v2 0/7] fix dependencies Thomas Monjalon
  2016-06-26 16:41   ` [dpdk-dev] [PATCH v2 1/7] mk: remove traces of combined library Thomas Monjalon
@ 2016-06-26 16:42   ` Thomas Monjalon
  2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 3/7] pipeline: fix truncated dependency list Thomas Monjalon
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 21+ messages in thread
From: Thomas Monjalon @ 2016-06-26 16:42 UTC (permalink / raw)
  To: Panu Matilainen; +Cc: dev

When building an external library with rte.extlib.mk, the internal
libraries were not found because the linker search path was the
external library install directory (RTE_OUTPUT/lib).
It is fixed by searching in the internal library install directory
(RTE_SDK_BIN/lib).
When building an internal library, RTE_SDK_BIN = RTE_OUTPUT.

Fixes: c6417ce61f83 ("mk: add build-time library directory to linker path")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 mk/rte.lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index d2523ee..924dfb5 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -93,7 +93,7 @@ O_TO_A_DO = @set -e; \
 	$(O_TO_A) && \
 	echo $(O_TO_A_CMD) > $(call exe2cmd,$(@))
 
-O_TO_S = $(LD) -L$(RTE_OUTPUT)/lib $(_CPU_LDFLAGS) $(EXTRA_LDFLAGS) \
+O_TO_S = $(LD) -L$(RTE_SDK_BIN)/lib $(_CPU_LDFLAGS) $(EXTRA_LDFLAGS) \
 	  -shared $(OBJS-y) $(LDLIBS) -Wl,-soname,$(LIB) -o $(LIB)
 O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight
 O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)","  LD $(@)")
-- 
2.7.0

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

* [dpdk-dev] [PATCH v2 3/7] pipeline: fix truncated dependency list
  2016-06-26 16:41 ` [dpdk-dev] [PATCH v2 0/7] fix dependencies Thomas Monjalon
  2016-06-26 16:41   ` [dpdk-dev] [PATCH v2 1/7] mk: remove traces of combined library Thomas Monjalon
  2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 2/7] mk: fix external library link Thomas Monjalon
@ 2016-06-26 16:42   ` Thomas Monjalon
  2016-06-27  9:20     ` Dumitrescu, Cristian
  2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 4/7] mk: fix internal dependencies Thomas Monjalon
                     ` (4 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Thomas Monjalon @ 2016-06-26 16:42 UTC (permalink / raw)
  To: Panu Matilainen; +Cc: dev

From: Panu Matilainen <pmatilai@redhat.com>

In other libraries, dependency list is always appended to, but
in commit 6cbf4f75e059 it with an assignment. This causes the
librte_eal dependency added in commit 6cbf4f75e059 to get discarded,
resulting in missing dependency on librte_eal.

Fixes: 6cbf4f75e059 ("mk: fix missing internal dependencies")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
---
 lib/librte_pipeline/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
index 95387aa..a8f3128 100644
--- a/lib/librte_pipeline/Makefile
+++ b/lib/librte_pipeline/Makefile
@@ -53,7 +53,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_PIPELINE)-include += rte_pipeline.h
 
 # this lib depends upon:
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_eal
-DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_table
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port
 
 include $(RTE_SDK)/mk/rte.lib.mk
-- 
2.7.0

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

* [dpdk-dev] [PATCH v2 4/7] mk: fix internal dependencies
  2016-06-26 16:41 ` [dpdk-dev] [PATCH v2 0/7] fix dependencies Thomas Monjalon
                     ` (2 preceding siblings ...)
  2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 3/7] pipeline: fix truncated dependency list Thomas Monjalon
@ 2016-06-26 16:42   ` Thomas Monjalon
  2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 5/7] mk: fix external dependencies of crypto drivers Thomas Monjalon
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 21+ messages in thread
From: Thomas Monjalon @ 2016-06-26 16:42 UTC (permalink / raw)
  To: Panu Matilainen; +Cc: dev

Some libraries were missing their dependency on eal, mbuf, mempool,
ring and kvargs.
It is revealed by the linker option "-z defs".

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 drivers/crypto/aesni_gcm/Makefile | 2 ++
 drivers/crypto/aesni_mb/Makefile  | 2 ++
 drivers/crypto/kasumi/Makefile    | 2 ++
 drivers/crypto/null/Makefile      | 3 ++-
 drivers/crypto/qat/Makefile       | 1 +
 drivers/crypto/snow3g/Makefile    | 2 ++
 drivers/net/af_packet/Makefile    | 1 +
 drivers/net/null/Makefile         | 1 +
 drivers/net/pcap/Makefile         | 1 +
 drivers/net/szedata2/Makefile     | 2 ++
 drivers/net/vhost/Makefile        | 1 +
 drivers/net/virtio/Makefile       | 1 +
 examples/ethtool/lib/Makefile     | 4 ++++
 lib/librte_ip_frag/Makefile       | 6 +++---
 lib/librte_kni/Makefile           | 5 +++--
 lib/librte_pdump/Makefile         | 1 +
 lib/librte_pipeline/Makefile      | 2 ++
 lib/librte_reorder/Makefile       | 1 +
 lib/librte_vhost/Makefile         | 1 +
 19 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/drivers/crypto/aesni_gcm/Makefile b/drivers/crypto/aesni_gcm/Makefile
index 3c70ee8..ab5d2ed 100644
--- a/drivers/crypto/aesni_gcm/Makefile
+++ b/drivers/crypto/aesni_gcm/Makefile
@@ -64,6 +64,8 @@ SYMLINK-y-include +=
 # library dependencies
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += lib/librte_eal
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += lib/librte_mempool
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += lib/librte_ring
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += lib/librte_cryptodev
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/crypto/aesni_mb/Makefile b/drivers/crypto/aesni_mb/Makefile
index ec65291..348a8bd 100644
--- a/drivers/crypto/aesni_mb/Makefile
+++ b/drivers/crypto/aesni_mb/Makefile
@@ -60,6 +60,8 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd_ops.c
 # library dependencies
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += lib/librte_eal
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += lib/librte_mempool
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += lib/librte_ring
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += lib/librte_cryptodev
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/crypto/kasumi/Makefile b/drivers/crypto/kasumi/Makefile
index 5b82be4..72b1ca4 100644
--- a/drivers/crypto/kasumi/Makefile
+++ b/drivers/crypto/kasumi/Makefile
@@ -61,6 +61,8 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += rte_kasumi_pmd_ops.c
 # library dependencies
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += lib/librte_eal
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += lib/librte_mempool
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += lib/librte_ring
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += lib/librte_cryptodev
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/crypto/null/Makefile b/drivers/crypto/null/Makefile
index 35db8b1..c143929 100644
--- a/drivers/crypto/null/Makefile
+++ b/drivers/crypto/null/Makefile
@@ -54,7 +54,8 @@ SYMLINK-y-include +=
 # library dependencies
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += lib/librte_eal
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += lib/librte_mbuf
-DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += lib/librte_cryptodev
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += lib/librte_mempool
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += lib/librte_ring
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += lib/librte_cryptodev
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/crypto/qat/Makefile b/drivers/crypto/qat/Makefile
index ee72a61..20a70d4 100644
--- a/drivers/crypto/qat/Makefile
+++ b/drivers/crypto/qat/Makefile
@@ -59,6 +59,7 @@ EXPORT_MAP := rte_pmd_qat_version.map
 # library dependencies
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += lib/librte_eal
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += lib/librte_mempool
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += lib/librte_cryptodev
 
 
diff --git a/drivers/crypto/snow3g/Makefile b/drivers/crypto/snow3g/Makefile
index fb64059..582907f 100644
--- a/drivers/crypto/snow3g/Makefile
+++ b/drivers/crypto/snow3g/Makefile
@@ -61,6 +61,8 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += rte_snow3g_pmd_ops.c
 # library dependencies
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += lib/librte_eal
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += lib/librte_mempool
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += lib/librte_ring
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += lib/librte_cryptodev
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/net/af_packet/Makefile b/drivers/net/af_packet/Makefile
index c6de1c6..e14d6d0 100644
--- a/drivers/net/af_packet/Makefile
+++ b/drivers/net/af_packet/Makefile
@@ -53,6 +53,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += rte_eth_af_packet.c
 # this lib depends upon:
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_eal
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_mempool
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_ether
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_kvargs
 
diff --git a/drivers/net/null/Makefile b/drivers/net/null/Makefile
index 2d115de..0c909c6 100644
--- a/drivers/net/null/Makefile
+++ b/drivers/net/null/Makefile
@@ -56,6 +56,7 @@ SYMLINK-y-include += rte_eth_null.h
 # this lib depends upon:
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += lib/librte_eal
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += lib/librte_mempool
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += lib/librte_ether
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += lib/librte_kvargs
 
diff --git a/drivers/net/pcap/Makefile b/drivers/net/pcap/Makefile
index b2071e8..89ac402 100644
--- a/drivers/net/pcap/Makefile
+++ b/drivers/net/pcap/Makefile
@@ -58,6 +58,7 @@ SYMLINK-y-include +=
 # this lib depends upon:
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += lib/librte_eal
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += lib/librte_mempool
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += lib/librte_ether
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += lib/librte_kvargs
 
diff --git a/drivers/net/szedata2/Makefile b/drivers/net/szedata2/Makefile
index ee4986c..4a7b14c 100644
--- a/drivers/net/szedata2/Makefile
+++ b/drivers/net/szedata2/Makefile
@@ -55,7 +55,9 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += rte_eth_szedata2.c
 SYMLINK-y-include +=
 
 # this lib depends upon:
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += lib/librte_eal
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += lib/librte_mempool
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += lib/librte_ether
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += lib/librte_kvargs
 
diff --git a/drivers/net/vhost/Makefile b/drivers/net/vhost/Makefile
index d3d3d05..050c5aa 100644
--- a/drivers/net/vhost/Makefile
+++ b/drivers/net/vhost/Makefile
@@ -58,6 +58,7 @@ SYMLINK-y-include += rte_eth_vhost.h
 # this lib depends upon:
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_VHOST) += lib/librte_eal
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_VHOST) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_VHOST) += lib/librte_mempool
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_VHOST) += lib/librte_ether
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_VHOST) += lib/librte_kvargs
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_VHOST) += lib/librte_vhost
diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile
index 43de46c..3020b68 100644
--- a/drivers/net/virtio/Makefile
+++ b/drivers/net/virtio/Makefile
@@ -65,5 +65,6 @@ endif
 DEPDIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += lib/librte_eal lib/librte_ether
 DEPDIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += lib/librte_mempool lib/librte_mbuf
 DEPDIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += lib/librte_net
+DEPDIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += lib/librte_kvargs
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/examples/ethtool/lib/Makefile b/examples/ethtool/lib/Makefile
index d7ee955..5b4991e 100644
--- a/examples/ethtool/lib/Makefile
+++ b/examples/ethtool/lib/Makefile
@@ -54,4 +54,8 @@ SRCS-y := rte_ethtool.c
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 
+# internal dependencies
+DEPDIRS-y += lib/librte_eal
+DEPDIRS-y += lib/librte_ether
+
 include $(RTE_SDK)/mk/rte.extlib.mk
diff --git a/lib/librte_ip_frag/Makefile b/lib/librte_ip_frag/Makefile
index a375222..e97dfbd 100644
--- a/lib/librte_ip_frag/Makefile
+++ b/lib/librte_ip_frag/Makefile
@@ -52,9 +52,9 @@ SRCS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += ip_frag_internal.c
 # install this header file
 SYMLINK-$(CONFIG_RTE_LIBRTE_IP_FRAG)-include += rte_ip_frag.h
 
-
-# this library depends on rte_ether
 DEPDIRS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += lib/librte_eal
-DEPDIRS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += lib/librte_mempool lib/librte_ether
+DEPDIRS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += lib/librte_ether
+DEPDIRS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += lib/librte_mempool
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_kni/Makefile b/lib/librte_kni/Makefile
index 1398164..0947446 100644
--- a/lib/librte_kni/Makefile
+++ b/lib/librte_kni/Makefile
@@ -46,8 +46,9 @@ SRCS-$(CONFIG_RTE_LIBRTE_KNI) := rte_kni.c
 # install includes
 SYMLINK-$(CONFIG_RTE_LIBRTE_KNI)-include := rte_kni.h
 
-# this lib needs eal
-DEPDIRS-$(CONFIG_RTE_LIBRTE_KNI) += lib/librte_eal lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_KNI) += lib/librte_eal
+DEPDIRS-$(CONFIG_RTE_LIBRTE_KNI) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_KNI) += lib/librte_mempool
 DEPDIRS-$(CONFIG_RTE_LIBRTE_KNI) += lib/librte_ether
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_pdump/Makefile b/lib/librte_pdump/Makefile
index af81a28..14cd53e 100644
--- a/lib/librte_pdump/Makefile
+++ b/lib/librte_pdump/Makefile
@@ -49,6 +49,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_PDUMP)-include := rte_pdump.h
 
 # this lib depends upon:
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += lib/librte_mempool
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += lib/librte_eal
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += lib/librte_ether
 
diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile
index a8f3128..05d64ff 100644
--- a/lib/librte_pipeline/Makefile
+++ b/lib/librte_pipeline/Makefile
@@ -53,6 +53,8 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_PIPELINE)-include += rte_pipeline.h
 
 # this lib depends upon:
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_eal
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_mempool
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
 DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port
 
diff --git a/lib/librte_reorder/Makefile b/lib/librte_reorder/Makefile
index 0c01de1..0d111aa 100644
--- a/lib/librte_reorder/Makefile
+++ b/lib/librte_reorder/Makefile
@@ -49,6 +49,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_REORDER)-include := rte_reorder.h
 
 # this lib depends upon:
 DEPDIRS-$(CONFIG_RTE_LIBRTE_REORDER) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_REORDER) += lib/librte_mempool
 DEPDIRS-$(CONFIG_RTE_LIBRTE_REORDER) += lib/librte_eal
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
index 7ef8d34..538adb0 100644
--- a/lib/librte_vhost/Makefile
+++ b/lib/librte_vhost/Makefile
@@ -66,6 +66,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_virtio_net.h
 DEPDIRS-$(CONFIG_RTE_LIBRTE_VHOST) += lib/librte_eal
 DEPDIRS-$(CONFIG_RTE_LIBRTE_VHOST) += lib/librte_ether
 DEPDIRS-$(CONFIG_RTE_LIBRTE_VHOST) += lib/librte_mbuf
+DEPDIRS-$(CONFIG_RTE_LIBRTE_VHOST) += lib/librte_mempool
 DEPDIRS-$(CONFIG_RTE_LIBRTE_VHOST) += lib/librte_net
 
 include $(RTE_SDK)/mk/rte.lib.mk
-- 
2.7.0

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

* [dpdk-dev] [PATCH v2 5/7] mk: fix external dependencies of crypto drivers
  2016-06-26 16:41 ` [dpdk-dev] [PATCH v2 0/7] fix dependencies Thomas Monjalon
                     ` (3 preceding siblings ...)
  2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 4/7] mk: fix internal dependencies Thomas Monjalon
@ 2016-06-26 16:42   ` Thomas Monjalon
  2016-06-27  8:48     ` Panu Matilainen
  2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 6/7] pdump: fix missing dependency on libpthread Thomas Monjalon
                     ` (2 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Thomas Monjalon @ 2016-06-26 16:42 UTC (permalink / raw)
  To: Panu Matilainen; +Cc: dev

When linking drivers as shared libraries, the dependencies need
to be marked as DT_NEEDED entries.

The crypto dependencies (libsso and libIPSec) are static libraries.
To make them linked in the shared PMDs, the code must relocatable:
    - libIPSec_MB.a must be built with -fPIC
    - libsso_kasumi.a must be built with KASUMI_CFLAGS=-DKASUMI_C

Fixes: 924e84f87306 ("aesni_mb: add driver for multi buffer based crypto")
Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto operations")
Fixes: 3aafc423cf4d ("snow3g: add driver for SNOW 3G library")
Fixes: 2773c86d061a ("crypto/kasumi: add driver for KASUMI library")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 drivers/crypto/aesni_gcm/Makefile | 3 ++-
 drivers/crypto/aesni_mb/Makefile  | 3 ++-
 drivers/crypto/kasumi/Makefile    | 3 ++-
 drivers/crypto/snow3g/Makefile    | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/aesni_gcm/Makefile b/drivers/crypto/aesni_gcm/Makefile
index ab5d2ed..5898cae 100644
--- a/drivers/crypto/aesni_gcm/Makefile
+++ b/drivers/crypto/aesni_gcm/Makefile
@@ -49,9 +49,10 @@ LIBABIVER := 1
 # versioning export map
 EXPORT_MAP := rte_pmd_aesni_gcm_version.map
 
-# external library include paths
+# external library dependencies
 CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)
 CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)/include
+LDLIBS += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
 LDLIBS += -lcrypto
 
 # library source files
diff --git a/drivers/crypto/aesni_mb/Makefile b/drivers/crypto/aesni_mb/Makefile
index 348a8bd..d3994cc 100644
--- a/drivers/crypto/aesni_mb/Makefile
+++ b/drivers/crypto/aesni_mb/Makefile
@@ -49,9 +49,10 @@ LIBABIVER := 1
 # versioning export map
 EXPORT_MAP := rte_pmd_aesni_version.map
 
-# external library include paths
+# external library dependencies
 CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)
 CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)/include
+LDLIBS += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
 
 # library source files
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c
diff --git a/drivers/crypto/kasumi/Makefile b/drivers/crypto/kasumi/Makefile
index 72b1ca4..9fb0be8 100644
--- a/drivers/crypto/kasumi/Makefile
+++ b/drivers/crypto/kasumi/Makefile
@@ -49,10 +49,11 @@ LIBABIVER := 1
 # versioning export map
 EXPORT_MAP := rte_pmd_kasumi_version.map
 
-# external library include paths
+# external library dependencies
 CFLAGS += -I$(LIBSSO_KASUMI_PATH)
 CFLAGS += -I$(LIBSSO_KASUMI_PATH)/include
 CFLAGS += -I$(LIBSSO_KASUMI_PATH)/build
+LDLIBS += -L$(LIBSSO_KASUMI_PATH)/build -lsso_kasumi
 
 # library source files
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += rte_kasumi_pmd.c
diff --git a/drivers/crypto/snow3g/Makefile b/drivers/crypto/snow3g/Makefile
index 582907f..bea6760 100644
--- a/drivers/crypto/snow3g/Makefile
+++ b/drivers/crypto/snow3g/Makefile
@@ -49,10 +49,11 @@ LIBABIVER := 1
 # versioning export map
 EXPORT_MAP := rte_pmd_snow3g_version.map
 
-# external library include paths
+# external library dependencies
 CFLAGS += -I$(LIBSSO_SNOW3G_PATH)
 CFLAGS += -I$(LIBSSO_SNOW3G_PATH)/include
 CFLAGS += -I$(LIBSSO_SNOW3G_PATH)/build
+LDLIBS += -L$(LIBSSO_SNOW3G_PATH)/build -lsso_snow3g
 
 # library source files
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += rte_snow3g_pmd.c
-- 
2.7.0

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

* [dpdk-dev] [PATCH v2 6/7] pdump: fix missing dependency on libpthread
  2016-06-26 16:41 ` [dpdk-dev] [PATCH v2 0/7] fix dependencies Thomas Monjalon
                     ` (4 preceding siblings ...)
  2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 5/7] mk: fix external dependencies of crypto drivers Thomas Monjalon
@ 2016-06-26 16:42   ` Thomas Monjalon
  2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 7/7] mk: check shared library dependencies Thomas Monjalon
  2016-06-27 15:15   ` [dpdk-dev] [PATCH v2 0/7] fix dependencies Thomas Monjalon
  7 siblings, 0 replies; 21+ messages in thread
From: Thomas Monjalon @ 2016-06-26 16:42 UTC (permalink / raw)
  To: Panu Matilainen; +Cc: dev

From: Panu Matilainen <pmatilai@redhat.com>

Fixes: 278f945402c5 ("pdump: add new library for packet capture")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
---
 lib/librte_pdump/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_pdump/Makefile b/lib/librte_pdump/Makefile
index 14cd53e..166441a 100644
--- a/lib/librte_pdump/Makefile
+++ b/lib/librte_pdump/Makefile
@@ -36,6 +36,7 @@ LIB = librte_pdump.a
 
 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
 CFLAGS += -D_GNU_SOURCE
+LDLIBS += -lpthread
 
 EXPORT_MAP := rte_pdump_version.map
 
-- 
2.7.0

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

* [dpdk-dev] [PATCH v2 7/7] mk: check shared library dependencies
  2016-06-26 16:41 ` [dpdk-dev] [PATCH v2 0/7] fix dependencies Thomas Monjalon
                     ` (5 preceding siblings ...)
  2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 6/7] pdump: fix missing dependency on libpthread Thomas Monjalon
@ 2016-06-26 16:42   ` Thomas Monjalon
  2016-06-27 15:15   ` [dpdk-dev] [PATCH v2 0/7] fix dependencies Thomas Monjalon
  7 siblings, 0 replies; 21+ messages in thread
From: Thomas Monjalon @ 2016-06-26 16:42 UTC (permalink / raw)
  To: Panu Matilainen; +Cc: dev

From: Panu Matilainen <pmatilai@redhat.com>

Require all symbols used by a DSO to be resolvable via LDLIBS at
build-time. Previously it was possible to build a library with
incomplete dependencies which could then fail at run-time.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
---
 mk/rte.lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index 924dfb5..0187ae8 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -94,7 +94,7 @@ O_TO_A_DO = @set -e; \
 	echo $(O_TO_A_CMD) > $(call exe2cmd,$(@))
 
 O_TO_S = $(LD) -L$(RTE_SDK_BIN)/lib $(_CPU_LDFLAGS) $(EXTRA_LDFLAGS) \
-	  -shared $(OBJS-y) $(LDLIBS) -Wl,-soname,$(LIB) -o $(LIB)
+	  -shared $(OBJS-y) -z defs $(LDLIBS) -Wl,-soname,$(LIB) -o $(LIB)
 O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight
 O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)","  LD $(@)")
 O_TO_S_DO = @set -e; \
-- 
2.7.0

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

* Re: [dpdk-dev] [PATCH v2 5/7] mk: fix external dependencies of crypto drivers
  2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 5/7] mk: fix external dependencies of crypto drivers Thomas Monjalon
@ 2016-06-27  8:48     ` Panu Matilainen
  0 siblings, 0 replies; 21+ messages in thread
From: Panu Matilainen @ 2016-06-27  8:48 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On 06/26/2016 07:42 PM, Thomas Monjalon wrote:
> When linking drivers as shared libraries, the dependencies need
> to be marked as DT_NEEDED entries.
>
> The crypto dependencies (libsso and libIPSec) are static libraries.
> To make them linked in the shared PMDs, the code must relocatable:
>     - libIPSec_MB.a must be built with -fPIC
>     - libsso_kasumi.a must be built with KASUMI_CFLAGS=-DKASUMI_C
>
> Fixes: 924e84f87306 ("aesni_mb: add driver for multi buffer based crypto")
> Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto operations")
> Fixes: 3aafc423cf4d ("snow3g: add driver for SNOW 3G library")
> Fixes: 2773c86d061a ("crypto/kasumi: add driver for KASUMI library")
>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  drivers/crypto/aesni_gcm/Makefile | 3 ++-
>  drivers/crypto/aesni_mb/Makefile  | 3 ++-
>  drivers/crypto/kasumi/Makefile    | 3 ++-
>  drivers/crypto/snow3g/Makefile    | 3 ++-
>  4 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/crypto/aesni_gcm/Makefile b/drivers/crypto/aesni_gcm/Makefile
> index ab5d2ed..5898cae 100644
> --- a/drivers/crypto/aesni_gcm/Makefile
> +++ b/drivers/crypto/aesni_gcm/Makefile
> @@ -49,9 +49,10 @@ LIBABIVER := 1
>  # versioning export map
>  EXPORT_MAP := rte_pmd_aesni_gcm_version.map
>
> -# external library include paths
> +# external library dependencies
>  CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)
>  CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)/include
> +LDLIBS += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
>  LDLIBS += -lcrypto
>
>  # library source files
> diff --git a/drivers/crypto/aesni_mb/Makefile b/drivers/crypto/aesni_mb/Makefile
> index 348a8bd..d3994cc 100644
> --- a/drivers/crypto/aesni_mb/Makefile
> +++ b/drivers/crypto/aesni_mb/Makefile
> @@ -49,9 +49,10 @@ LIBABIVER := 1
>  # versioning export map
>  EXPORT_MAP := rte_pmd_aesni_version.map
>
> -# external library include paths
> +# external library dependencies
>  CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)
>  CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)/include
> +LDLIBS += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
>
>  # library source files
>  SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c
> diff --git a/drivers/crypto/kasumi/Makefile b/drivers/crypto/kasumi/Makefile
> index 72b1ca4..9fb0be8 100644
> --- a/drivers/crypto/kasumi/Makefile
> +++ b/drivers/crypto/kasumi/Makefile
> @@ -49,10 +49,11 @@ LIBABIVER := 1
>  # versioning export map
>  EXPORT_MAP := rte_pmd_kasumi_version.map
>
> -# external library include paths
> +# external library dependencies
>  CFLAGS += -I$(LIBSSO_KASUMI_PATH)
>  CFLAGS += -I$(LIBSSO_KASUMI_PATH)/include
>  CFLAGS += -I$(LIBSSO_KASUMI_PATH)/build
> +LDLIBS += -L$(LIBSSO_KASUMI_PATH)/build -lsso_kasumi
>
>  # library source files
>  SRCS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += rte_kasumi_pmd.c
> diff --git a/drivers/crypto/snow3g/Makefile b/drivers/crypto/snow3g/Makefile
> index 582907f..bea6760 100644
> --- a/drivers/crypto/snow3g/Makefile
> +++ b/drivers/crypto/snow3g/Makefile
> @@ -49,10 +49,11 @@ LIBABIVER := 1
>  # versioning export map
>  EXPORT_MAP := rte_pmd_snow3g_version.map
>
> -# external library include paths
> +# external library dependencies
>  CFLAGS += -I$(LIBSSO_SNOW3G_PATH)
>  CFLAGS += -I$(LIBSSO_SNOW3G_PATH)/include
>  CFLAGS += -I$(LIBSSO_SNOW3G_PATH)/build
> +LDLIBS += -L$(LIBSSO_SNOW3G_PATH)/build -lsso_snow3g
>
>  # library source files
>  SRCS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += rte_snow3g_pmd.c
>

LDLIBS should only contain the actual libraries, everything else 
including -L <path> should go to LDFLAGS. The rule is not honored in 
dpdk at all currently and nothing depends on that, so it doesn't really 
matter. Just thought to mention it since this adds several new instances 
of mixed usage.

	- Panu -

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

* Re: [dpdk-dev] [PATCH v2 3/7] pipeline: fix truncated dependency list
  2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 3/7] pipeline: fix truncated dependency list Thomas Monjalon
@ 2016-06-27  9:20     ` Dumitrescu, Cristian
  2016-06-27  9:27       ` Thomas Monjalon
  0 siblings, 1 reply; 21+ messages in thread
From: Dumitrescu, Cristian @ 2016-06-27  9:20 UTC (permalink / raw)
  To: Thomas Monjalon, Panu Matilainen; +Cc: dev, Singh, Jasvinder



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Sunday, June 26, 2016 5:42 PM
> To: Panu Matilainen <pmatilai@redhat.com>
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v2 3/7] pipeline: fix truncated dependency list
> 
> From: Panu Matilainen <pmatilai@redhat.com>
> 
> In other libraries, dependency list is always appended to, but
> in commit 6cbf4f75e059 it with an assignment. This causes the
> librte_eal dependency added in commit 6cbf4f75e059 to get discarded,
> resulting in missing dependency on librte_eal.
> 

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>


Hi Thomas,

As discussed in some other email thread, it would also make sense to replace the ':=' operator with '+=' operator in Makefile of rte_port and rte_table as well, do you want us to send a separate patch for this?

Thanks,
Cristian

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

* Re: [dpdk-dev] [PATCH v2 3/7] pipeline: fix truncated dependency list
  2016-06-27  9:20     ` Dumitrescu, Cristian
@ 2016-06-27  9:27       ` Thomas Monjalon
  0 siblings, 0 replies; 21+ messages in thread
From: Thomas Monjalon @ 2016-06-27  9:27 UTC (permalink / raw)
  To: Dumitrescu, Cristian; +Cc: Panu Matilainen, dev, Singh, Jasvinder

2016-06-27 09:20, Dumitrescu, Cristian:
> As discussed in some other email thread, it would also make sense to replace the ':=' operator with '+=' operator in Makefile of rte_port and rte_table as well, do you want us to send a separate patch for this?

It's a cosmetic change.
Yes you can send a patch.

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

* Re: [dpdk-dev] [PATCH v2 0/7] fix dependencies
  2016-06-26 16:41 ` [dpdk-dev] [PATCH v2 0/7] fix dependencies Thomas Monjalon
                     ` (6 preceding siblings ...)
  2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 7/7] mk: check shared library dependencies Thomas Monjalon
@ 2016-06-27 15:15   ` Thomas Monjalon
  7 siblings, 0 replies; 21+ messages in thread
From: Thomas Monjalon @ 2016-06-27 15:15 UTC (permalink / raw)
  To: Panu Matilainen; +Cc: dev

> Panu Matilainen (3):
>   pipeline: fix truncated dependency list
>   pdump: fix missing dependency on libpthread
>   mk: check shared library dependencies
> 
> Thomas Monjalon (4):
>   mk: remove traces of combined library
>   mk: fix external library link
>   mk: fix internal dependencies
>   mk: fix external dependencies of crypto drivers

Applied

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

end of thread, other threads:[~2016-06-27 15:15 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-21  8:11 [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation Panu Matilainen
2016-06-21  8:11 ` [dpdk-dev] [PATCH 2/3] pdump: fix missing dependency on libpthread Panu Matilainen
2016-06-21  8:11 ` [dpdk-dev] [PATCH 3/3] mk: fail build on incomplete shared library dependencies Panu Matilainen
2016-06-21 10:01 ` [dpdk-dev] [PATCH 1/3] mk: fix librte_pipeline dependency list truncation Dumitrescu, Cristian
2016-06-21 10:25   ` Panu Matilainen
2016-06-21 10:31     ` Bruce Richardson
2016-06-21 10:44       ` Panu Matilainen
2016-06-21 10:58         ` Dumitrescu, Cristian
2016-06-21 11:53           ` Panu Matilainen
2016-06-26 16:41 ` [dpdk-dev] [PATCH v2 0/7] fix dependencies Thomas Monjalon
2016-06-26 16:41   ` [dpdk-dev] [PATCH v2 1/7] mk: remove traces of combined library Thomas Monjalon
2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 2/7] mk: fix external library link Thomas Monjalon
2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 3/7] pipeline: fix truncated dependency list Thomas Monjalon
2016-06-27  9:20     ` Dumitrescu, Cristian
2016-06-27  9:27       ` Thomas Monjalon
2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 4/7] mk: fix internal dependencies Thomas Monjalon
2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 5/7] mk: fix external dependencies of crypto drivers Thomas Monjalon
2016-06-27  8:48     ` Panu Matilainen
2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 6/7] pdump: fix missing dependency on libpthread Thomas Monjalon
2016-06-26 16:42   ` [dpdk-dev] [PATCH v2 7/7] mk: check shared library dependencies Thomas Monjalon
2016-06-27 15:15   ` [dpdk-dev] [PATCH v2 0/7] fix dependencies Thomas Monjalon

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