From 980ed498eb1dd0dc671e6796cbc9d3138250d0d9 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Fri, 15 May 2015 16:56:46 +0100 Subject: [PATCH] drivers: create new directory Add a new top-level "drivers" directory to which all PMDs will be moved for easier maintenance of both lib folder and drivers themselves. This new directory is a dependency of all the apps in the app folder, so the makefiles for each app are updated. To the new top-level directory add a "net" subdirectory to classify more specifically our existing PMDs as ethernet drivers Signed-off-by: Bruce Richardson Acked-by: John McNamara [Thomas: fix dependencies and merge several patches] Acked-by: Thomas Monjalon --- GNUmakefile | 4 ++-- app/test-pipeline/Makefile | 4 ++-- app/test-pmd/Makefile | 4 ++-- app/test/Makefile | 4 ++-- doc/guides/linux_gsg/build_dpdk.rst | 8 ++++--- doc/guides/prog_guide/source_org.rst | 12 ++++++++++ drivers/Makefile | 36 ++++++++++++++++++++++++++++ drivers/net/Makefile | 36 ++++++++++++++++++++++++++++ 8 files changed, 97 insertions(+), 11 deletions(-) create mode 100644 drivers/Makefile create mode 100644 drivers/net/Makefile diff --git a/GNUmakefile b/GNUmakefile index d04c20b605..b59e4b6ee9 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,6 +1,6 @@ # BSD LICENSE # -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -40,6 +40,6 @@ export RTE_SDK # directory list # -ROOTDIRS-y := lib app +ROOTDIRS-y := lib drivers app include $(RTE_SDK)/mk/rte.sdkroot.mk diff --git a/app/test-pipeline/Makefile b/app/test-pipeline/Makefile index aa6df0cf46..4bab6dc6c4 100644 --- a/app/test-pipeline/Makefile +++ b/app/test-pipeline/Makefile @@ -1,6 +1,6 @@ # BSD LICENSE # -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -57,7 +57,7 @@ SRCS-y += pipeline_lpm_ipv6.c SRCS-$(CONFIG_RTE_LIBRTE_ACL) += pipeline_acl.c # this application needs libraries first -DEPDIRS-y += lib +DEPDIRS-y += lib drivers include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index dcf26f4cfa..72426f3149 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -1,6 +1,6 @@ # BSD LICENSE # -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -66,7 +66,7 @@ endif CFLAGS_cmdline.o := -D_GNU_SOURCE # this application needs libraries first -DEPDIRS-y += lib +DEPDIRS-y += lib drivers include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test/Makefile b/app/test/Makefile index 4aca77c98d..3c777bfabe 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -1,6 +1,6 @@ # BSD LICENSE # -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -159,7 +159,7 @@ endif endif # this application needs libraries first -DEPDIRS-y += lib +DEPDIRS-y += lib drivers # Link against shared libraries when needed ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y) diff --git a/doc/guides/linux_gsg/build_dpdk.rst b/doc/guides/linux_gsg/build_dpdk.rst index e3a0b464b0..2680e66c16 100644 --- a/doc/guides/linux_gsg/build_dpdk.rst +++ b/doc/guides/linux_gsg/build_dpdk.rst @@ -45,12 +45,14 @@ First, uncompress the archive and move to the uncompressed DPDK source directory user@host:~$ unzip DPDK-.zip user@host:~$ cd DPDK- user@host:~/DPDK-$ ls - app/ config/ examples/ lib/ LICENSE.GPL LICENSE.LGPL Makefile mk/ scripts/ tools/ + app/ config/ drivers/ examples/ lib/ LICENSE.GPL LICENSE.LGPL Makefile mk/ scripts/ tools/ The DPDK is composed of several directories: * lib: Source code of DPDK libraries +* drivers: Source code of DPDK poll-mode drivers + * app: Source code of DPDK applications (automatic tests) * examples: Source code of DPDK application examples @@ -153,9 +155,9 @@ In addition, the make clean command can be used to remove any existing compiled Browsing the Installed DPDK Environment Target ---------------------------------------------- -Once a target is created it contains all libraries and header files for the DPDK environment that are required to build customer applications. +Once a target is created it contains all libraries, including poll-mode drivers, and header files for the DPDK environment that are required to build customer applications. In addition, the test and testpmd applications are built under the build/app directory, which may be used for testing. -A kmod directory is also present that contains kernel modules which may be loaded if needed: +A kmod directory is also present that contains kernel modules which may be loaded if needed. .. code-block:: console diff --git a/doc/guides/prog_guide/source_org.rst b/doc/guides/prog_guide/source_org.rst index 1bce0b83ef..269a0bc59b 100644 --- a/doc/guides/prog_guide/source_org.rst +++ b/doc/guides/prog_guide/source_org.rst @@ -95,6 +95,18 @@ The lib directory contains:: +-- librte_sched # QoS scheduler and dropper library +-- librte_timer # timer library +Drivers +------- + +Drivers are special libraries which provide poll-mode driver implementations for +devices - either hardware devices or pseudo/virtual devices. They are contained +in the "drivers" subdirectory, classified by type, and each compiles to a +library with the format "librte_pmd_X.a" where "X" is the driver name. + +The drivers directory has a net subdirectory which contains:: + + drivers/net + Applications ------------ diff --git a/drivers/Makefile b/drivers/Makefile new file mode 100644 index 0000000000..b60eb5e70a --- /dev/null +++ b/drivers/Makefile @@ -0,0 +1,36 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +DIRS-y += net + +include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/net/Makefile b/drivers/net/Makefile new file mode 100644 index 0000000000..600a55a36c --- /dev/null +++ b/drivers/net/Makefile @@ -0,0 +1,36 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + + +include $(RTE_SDK)/mk/rte.sharelib.mk +include $(RTE_SDK)/mk/rte.subdir.mk -- 2.20.1