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 <bruce.richardson@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com> [Thomas: fix dependencies and merge several patches] Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit is contained in:
parent
641a81b274
commit
980ed498eb
@ -1,6 +1,6 @@
|
|||||||
# BSD LICENSE
|
# BSD LICENSE
|
||||||
#
|
#
|
||||||
# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
|
# Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -40,6 +40,6 @@ export RTE_SDK
|
|||||||
# directory list
|
# directory list
|
||||||
#
|
#
|
||||||
|
|
||||||
ROOTDIRS-y := lib app
|
ROOTDIRS-y := lib drivers app
|
||||||
|
|
||||||
include $(RTE_SDK)/mk/rte.sdkroot.mk
|
include $(RTE_SDK)/mk/rte.sdkroot.mk
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# BSD LICENSE
|
# BSD LICENSE
|
||||||
#
|
#
|
||||||
# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
|
# Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# 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
|
SRCS-$(CONFIG_RTE_LIBRTE_ACL) += pipeline_acl.c
|
||||||
|
|
||||||
# this application needs libraries first
|
# this application needs libraries first
|
||||||
DEPDIRS-y += lib
|
DEPDIRS-y += lib drivers
|
||||||
|
|
||||||
include $(RTE_SDK)/mk/rte.app.mk
|
include $(RTE_SDK)/mk/rte.app.mk
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# BSD LICENSE
|
# BSD LICENSE
|
||||||
#
|
#
|
||||||
# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
|
# Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -66,7 +66,7 @@ endif
|
|||||||
CFLAGS_cmdline.o := -D_GNU_SOURCE
|
CFLAGS_cmdline.o := -D_GNU_SOURCE
|
||||||
|
|
||||||
# this application needs libraries first
|
# this application needs libraries first
|
||||||
DEPDIRS-y += lib
|
DEPDIRS-y += lib drivers
|
||||||
|
|
||||||
include $(RTE_SDK)/mk/rte.app.mk
|
include $(RTE_SDK)/mk/rte.app.mk
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# BSD LICENSE
|
# BSD LICENSE
|
||||||
#
|
#
|
||||||
# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
|
# Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -159,7 +159,7 @@ endif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# this application needs libraries first
|
# this application needs libraries first
|
||||||
DEPDIRS-y += lib
|
DEPDIRS-y += lib drivers
|
||||||
|
|
||||||
# Link against shared libraries when needed
|
# Link against shared libraries when needed
|
||||||
ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
|
ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
|
||||||
|
@ -45,12 +45,14 @@ First, uncompress the archive and move to the uncompressed DPDK source directory
|
|||||||
user@host:~$ unzip DPDK-<version>.zip
|
user@host:~$ unzip DPDK-<version>.zip
|
||||||
user@host:~$ cd DPDK-<version>
|
user@host:~$ cd DPDK-<version>
|
||||||
user@host:~/DPDK-<version>$ ls
|
user@host:~/DPDK-<version>$ 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:
|
The DPDK is composed of several directories:
|
||||||
|
|
||||||
* lib: Source code of DPDK libraries
|
* lib: Source code of DPDK libraries
|
||||||
|
|
||||||
|
* drivers: Source code of DPDK poll-mode drivers
|
||||||
|
|
||||||
* app: Source code of DPDK applications (automatic tests)
|
* app: Source code of DPDK applications (automatic tests)
|
||||||
|
|
||||||
* examples: Source code of DPDK application examples
|
* 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
|
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.
|
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
|
.. code-block:: console
|
||||||
|
|
||||||
|
@ -95,6 +95,18 @@ The lib directory contains::
|
|||||||
+-- librte_sched # QoS scheduler and dropper library
|
+-- librte_sched # QoS scheduler and dropper library
|
||||||
+-- librte_timer # timer 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
|
Applications
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
36
drivers/Makefile
Normal file
36
drivers/Makefile
Normal file
@ -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
|
36
drivers/net/Makefile
Normal file
36
drivers/net/Makefile
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user