Skip to contentSkip to conversation

rte_bus_pci: remove unneeded library dependency.

PATCH Applied Seth Howell 3 participants 4 messages Oct 11, 2019 – Oct 25, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rte_bus_pci: remove unneeded library dependency.

The makefile in drivers/bus/pci specified rte_ethdev as a dependency for the library. However there are no actual symbols from librte_ethdev used in librte_bus_pci.

Including librte_ethdev as a dependency only becomes a problem in some niche cases like when attempting to build the rte_bus_pci library as a shared object without building the rte_ethdev library.

I specifically ran into this when trying to build the DPDK included as an SPDK submodule on a FreeBSD machine. I figure that since there are no real dependencies between the two, we should enable building librte_bus_pci without librte_ethdev.

---
 drivers/bus/pci/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/pci/Makefile +1 -1
index 68c1f3fde..45d12427a 100644
@@ -25,7 +25,7 @@ CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
-LDLIBS += -lrte_ethdev -lrte_pci -lrte_kvargs
+LDLIBS += -lrte_pci -lrte_kvargs
 
 include $(RTE_SDK)/drivers/bus/pci/$(SYSTEM)/Makefile
 SRCS-$(CONFIG_RTE_LIBRTE_PCI_BUS) := $(addprefix $(SYSTEM)/,$(SRCS))
Signature · 1 line
2.17.2
#1 lore raw
Quoted 33 lines · Seth Howell

The makefile in drivers/bus/pci specified rte_ethdev as a dependency for the library. However there are no actual symbols from librte_ethdev used in librte_bus_pci.

Including librte_ethdev as a dependency only becomes a problem in some niche cases like when attempting to build the rte_bus_pci library as a shared object without building the rte_ethdev library.

I specifically ran into this when trying to build the DPDK included as an SPDK submodule on a FreeBSD machine. I figure that since there are no real dependencies between the two, we should enable building librte_bus_pci without librte_ethdev.

---
 drivers/bus/pci/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/pci/Makefile +1 -2
index 68c1f3fde..45d12427a 100644
@@ -25,7 +25,7 @@ CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
-LDLIBS += -lrte_ethdev -lrte_pci -lrte_kvargs
+LDLIBS += -lrte_pci -lrte_kvargs
 
 include $(RTE_SDK)/drivers/bus/pci/$(SYSTEM)/Makefile
 SRCS-$(CONFIG_RTE_LIBRTE_PCI_BUS) := $(addprefix $(SYSTEM)/,$(SRCS))
--
Quoted 2 lines

2.17.2

At a first glance, this patch seems valid, Gaëtan, could you have a look ? Could be worth a Fixes:.

Thanks.

--
David Marchand

Acked-by
#2 lore raw
Quoted 40 lines · David Marchand
Quoted 33 lines · Seth Howell

The makefile in drivers/bus/pci specified rte_ethdev as a dependency for the library. However there are no actual symbols from librte_ethdev used in librte_bus_pci.

Including librte_ethdev as a dependency only becomes a problem in some niche cases like when attempting to build the rte_bus_pci library as a shared object without building the rte_ethdev library.

I specifically ran into this when trying to build the DPDK included as an SPDK submodule on a FreeBSD machine. I figure that since there are no real dependencies between the two, we should enable building librte_bus_pci without librte_ethdev.

---
 drivers/bus/pci/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/pci/Makefile +1 -2
index 68c1f3fde..45d12427a 100644
@@ -25,7 +25,7 @@ CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
-LDLIBS += -lrte_ethdev -lrte_pci -lrte_kvargs
+LDLIBS += -lrte_pci -lrte_kvargs
 
 include $(RTE_SDK)/drivers/bus/pci/$(SYSTEM)/Makefile
 SRCS-$(CONFIG_RTE_LIBRTE_PCI_BUS) := $(addprefix $(SYSTEM)/,$(SRCS))
--
Quoted 2 lines

2.17.2

At a first glance, this patch seems valid, Gaëtan, could you have a look ? Could be worth a Fixes:.

Quoted 6 lines

Thanks.

--
David Marchand

Hi,

Yes this is fine.
I've checked, when this Makefile was introduced first in v17.11, this dependency was not needed either. This means the Fixes: can go back to c752998b5.

Signature · 2 lines
Gaëtan Rivet
6WIND
#3 lore raw
Quoted 7 lines · Gaëtan Rivet
Quoted 6 lines · David Marchand
Quoted 5 lines · Seth Howell

The makefile in drivers/bus/pci specified rte_ethdev as a dependency for the library. However there are no actual symbols from librte_ethdev used in librte_bus_pci.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Including librte_ethdev as a dependency only becomes a problem in some niche cases like when attempting to build the rte_bus_pci library as a shared object without building the rte_ethdev library.

I specifically ran into this when trying to build the DPDK included as an SPDK submodule on a FreeBSD machine. I figure that since there are no real dependencies between the two, we should enable building librte_bus_pci without librte_ethdev.

Fixes c752998b5e2e ("pci: introduce library and driver")
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

Yes this is fine.
I've checked, when this Makefile was introduced first in v17.11, this dependency was not needed either. This means the Fixes: can go back to c752998b5.

Applied, thanks.

--
David Marchand