From patchwork Thu Jun 18 00:42:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 71701 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4EADFA04A5; Thu, 18 Jun 2020 02:42:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E95FB4C90; Thu, 18 Jun 2020 02:42:33 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 1D8692BF4 for ; Thu, 18 Jun 2020 02:42:32 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id C4D875C00B6; Wed, 17 Jun 2020 20:42:31 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 17 Jun 2020 20:42:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=m3J4iFzPRc4eW 4Ed00qgBCx1AgThiGb9XS+tGeLUbZA=; b=EZp0wzl06VbIbPNGD0RZOa4M2QYH2 o2nWgyvzYl8XhgBFowJBmwpgL0G0FusUVFuIOvojx8SkL/7ZDckFtraTq/BaMSco DESdGyVE9HgmwkPPyswHaW2o2rTEona9+FY/TP+ITET/ZE2HvN15NJmTH0CO0pdK mZfEWLATO6WtAXlE2Cvv7mBQhdB4fiSGazEQwrKGDNRw41XvrwAKvGyweT/P4Yqx lddDA27xtfkqKbTeg4wJ6fyotfP8RFUhlUOEMeiS843llmnNiCCy3LUd1QH/xWSO ZA4dtEvbW0SQhxBgtdgMirN1cpLiYOPKyZKgXI45LbknZ0DN9Afhk/FTQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=m3J4iFzPRc4eW4Ed00qgBCx1AgThiGb9XS+tGeLUbZA=; b=kMRbP+eD xsGwJTehRu6axp/hhIMe6EVfmm0TLjjOAK0VlJTg2qtVjgC5SJTdr8jkJY6JCoF4 xghjFpvL/rEhdPZrfLZC8eyBRqqwouo7Bpit6/y3sYKxAKffJCf9XZ3b9AMn8hED Quchl6NNb1UyWhdAV/4n7xWJdn0LyFae6QXw3nz8hYQG4fae1x6LHzb9BEeQD/Hh tRYUEbjhmekbDBo4xg9IzgCuTNwPFZtTk1MOvLcCm0M5ZOJcnciwNdYOg1pyTK4+ YF2gUZBEJ6HXjZAMDVEPFVn+CbOEQz8WoH6ga56m2zqluJ8jvMfdD3DPgR5KoEXA BmxSCgjvoPHFZw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejfedgfeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg uedthedtgeevnecukfhppeejjedrvddthedrudegvddruddtgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (104.142.205.77.rev.sfr.net [77.205.142.104]) by mail.messagingengine.com (Postfix) with ESMTPA id 1C6783061856; Wed, 17 Jun 2020 20:42:29 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, bruce.richardson@intel.com, John McNamara , Marko Kovacevic Date: Thu, 18 Jun 2020 02:42:15 +0200 Message-Id: <20200618004218.3730743-2-thomas@monjalon.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200618004218.3730743-1-thomas@monjalon.net> References: <20200618004218.3730743-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 1/4] doc: remove outdated guidelines for library addition X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" There was a doc about how to extend DPDK by adding a library. It could have been useful but was never updated, so it is lacking a lot of explanations about doxygen, meson, versioning, maintainership, etc. Anyway such guidelines should fit in the contributors guide. Better to completely remove this obsolete document. Signed-off-by: Thomas Monjalon Acked-by: Bruce Richardson --- doc/guides/prog_guide/extend_dpdk.rst | 109 -------------------------- 1 file changed, 109 deletions(-) delete mode 100644 doc/guides/prog_guide/extend_dpdk.rst diff --git a/doc/guides/prog_guide/extend_dpdk.rst b/doc/guides/prog_guide/extend_dpdk.rst deleted file mode 100644 index a3b3d300b0..0000000000 --- a/doc/guides/prog_guide/extend_dpdk.rst +++ /dev/null @@ -1,109 +0,0 @@ -.. SPDX-License-Identifier: BSD-3-Clause - Copyright(c) 2010-2014 Intel Corporation. - -Extending the DPDK -========================= - -This chapter describes how a developer can extend the DPDK to provide a new library, -a new target, or support a new target. - -Example: Adding a New Library libfoo ------------------------------------- - -To add a new library to the DPDK, proceed as follows: - -#. Add a new configuration option: - - .. code-block:: bash - - for f in config/\*; do \ - echo CONFIG_RTE_LIBFOO=y >> $f; done - -#. Create a new directory with sources: - - .. code-block:: console - - mkdir ${RTE_SDK}/lib/libfoo - touch ${RTE_SDK}/lib/libfoo/foo.c - touch ${RTE_SDK}/lib/libfoo/foo.h - -#. Add a foo() function in libfoo. - - Definition is in foo.c: - - .. code-block:: c - - void foo(void) - { - } - - Declaration is in foo.h: - - .. code-block:: c - - extern void foo(void); - - -#. Update lib/Makefile: - - .. code-block:: console - - vi ${RTE_SDK}/lib/Makefile - # add: - # DIRS-$(CONFIG_RTE_LIBFOO) += libfoo - -#. Create a new Makefile for this library, for example, derived from mempool Makefile: - - .. code-block:: console - - cp ${RTE_SDK}/lib/librte_mempool/Makefile ${RTE_SDK}/lib/libfoo/ - - vi ${RTE_SDK}/lib/libfoo/Makefile - # replace: - # librte_mempool -> libfoo - # rte_mempool -> foo - - -#. Update mk/DPDK.app.mk, and add -lfoo in LDLIBS variable when the option is enabled. - This will automatically add this flag when linking a DPDK application. - - -#. Build the DPDK with the new library (we only show a specific target here): - - .. code-block:: console - - cd ${RTE_SDK} - make config T=x86_64-native-linux-gcc - make - - -#. Check that the library is installed: - - .. code-block:: console - - ls build/lib - ls build/include - -Example: Using libfoo in the Test Application -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The test application is used to validate all functionality of the DPDK. -Once you have added a library, a new test case should be added in the test application. - -* A new test_foo.c file should be added, that includes foo.h and calls the foo() function from test_foo(). - When the test passes, the test_foo() function should return 0. - -* Makefile, test.h and commands.c must be updated also, to handle the new test case. - -* Test report generation: autotest.py is a script that is used to generate the test report that is available in the - ${RTE_SDK}/doc/rst/test_report/autotests directory. This script must be updated also. - If libfoo is in a new test family, the links in ${RTE_SDK}/doc/rst/test_report/test_report.rst must be updated. - -* Build the DPDK with the updated test application (we only show a specific target here): - - - .. code-block:: console - - cd ${RTE_SDK} - make config T=x86_64-native-linux-gcc - make From patchwork Thu Jun 18 00:42:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 71702 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0BE7AA04A5; Thu, 18 Jun 2020 02:42:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B9CFF5323; Thu, 18 Jun 2020 02:42:44 +0200 (CEST) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id 0F98231FC for ; Thu, 18 Jun 2020 02:42:43 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id 7A7F8580254; Wed, 17 Jun 2020 20:42:42 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 17 Jun 2020 20:42:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=LEficwacjjrxW YCJ//bG73tPgK2cAz3xnm15AsvDcHU=; b=nVqiefloWZPa8y61uCS8az/3P42Sn G4ebg8TpuTZxF8Aq346R82pzPEqvW/gsdhzrhPBHRhYFY2KdZuYzjdOTNmEmwZdp 7KJ/kxnffbfd4+h77LzG3b1HPf9MHbC0JmMAjWNq3N1nVNwkMoKhCDbv/r1lJHR0 MA6s8/rgpkFw9CNKF86yQliTfe2z8dCBhb/UYFSEuJLEGN8pWGTDg33hHZPByHUh UAYMleI45xozdHf0k27XxxyMgLWR4fh05C6F5pco/INi6AbgJcF1DDfceW+NcBZ1 cASkZjd7jO3bEpN6Q4KyfJfefHPf7Cic1QT6cjhSJku4kQO0mw0wOHRQg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=LEficwacjjrxWYCJ//bG73tPgK2cAz3xnm15AsvDcHU=; b=XmvHUxDf QtTPbPFht3GFA2qzcjplXSj0G+ht0Ohpe/EPuKZngCRhqkodG9pNbchhoB4SM5K3 /fKeTWdJe3PWy7BxwoqKODXnLlY0ILZKTJC1XPDM5p6BeqwycPuRHHrNkB3EIrkX RaAyMW8ZAHL6B3TuRlO7PQGT5ubJawKV/OWr4C354g4PGzi+Pv6xnG8JR8hTBigo Mooa2s7ea+XOR4+fvFpsibzlYUkJwSJECZTcg/cd/aoqaxYdIGjVpQo2t0aiElx8 mpCs+URBBDZzVbNhTGaHCYk0OFxTG95RVKdYtKR5Ln47NDhJDYfruI6GKjCrlc6G H+mmu0o4zWI9lg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejfedgfeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg uedthedtgeevnecukfhppeejjedrvddthedrudegvddruddtgeenucevlhhushhtvghruf hiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (104.142.205.77.rev.sfr.net [77.205.142.104]) by mail.messagingengine.com (Postfix) with ESMTPA id 1CFDE30614FA; Wed, 17 Jun 2020 20:42:38 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, bruce.richardson@intel.com, Nicolas Chautru , John McNamara , Marko Kovacevic , Jay Zhou , Ajit Khaparde , Somnath Kotur , Wenzhuo Lu , Beilei Xing , Bernard Iremonger Date: Thu, 18 Jun 2020 02:42:16 +0200 Message-Id: <20200618004218.3730743-3-thomas@monjalon.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200618004218.3730743-1-thomas@monjalon.net> References: <20200618004218.3730743-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 2/4] doc: remove build instructions where unneeded X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The build should be described only in few places, in order to maintain up-to-date, accurate and detailed instructions. This change is removing some of the unneeded repetitions. Signed-off-by: Thomas Monjalon Acked-by: Ajit Khaparde Acked-by: Jay Zhou Acked-by: Bruce Richardson --- doc/guides/bbdevs/fpga_5gnr_fec.rst | 7 +-- doc/guides/bbdevs/fpga_lte_fec.rst | 7 +-- doc/guides/cryptodevs/virtio.rst | 9 +--- .../virtio_user_for_container_networking.rst | 6 --- .../linux_gsg/nic_perf_intel_platform.rst | 8 +--- doc/guides/nics/bnxt.rst | 30 +++---------- doc/guides/nics/build_and_test.rst | 43 +++---------------- doc/guides/testpmd_app_ug/build_app.rst | 26 ----------- 8 files changed, 15 insertions(+), 121 deletions(-) diff --git a/doc/guides/bbdevs/fpga_5gnr_fec.rst b/doc/guides/bbdevs/fpga_5gnr_fec.rst index 19bba3661f..d5dcd3d765 100644 --- a/doc/guides/bbdevs/fpga_5gnr_fec.rst +++ b/doc/guides/bbdevs/fpga_5gnr_fec.rst @@ -54,12 +54,7 @@ Installation Section 3 of the DPDK manual provides instuctions on installing and compiling DPDK. The default set of bbdev compile flags may be found in config/common_base, where for example the flag to build the FPGA 5GNR FEC device, ``CONFIG_RTE_LIBRTE_PMD_BBDEV_FPGA_5GNR_FEC``, -is already set. It is assumed DPDK has been compiled using for instance: - -.. code-block:: console - - make install T=x86_64-native-linuxapp-gcc - +is already set. DPDK requires hugepages to be configured as detailed in section 2 of the DPDK manual. The bbdev test application has been tested with a configuration 40 x 1GB hugepages. The diff --git a/doc/guides/bbdevs/fpga_lte_fec.rst b/doc/guides/bbdevs/fpga_lte_fec.rst index 206b6f4f9b..191e89fcef 100644 --- a/doc/guides/bbdevs/fpga_lte_fec.rst +++ b/doc/guides/bbdevs/fpga_lte_fec.rst @@ -53,12 +53,7 @@ Installation Section 3 of the DPDK manual provides instuctions on installing and compiling DPDK. The default set of bbdev compile flags may be found in config/common_base, where for example the flag to build the FPGA LTE FEC device, ``CONFIG_RTE_LIBRTE_PMD_BBDEV_FPGA_LTE_FEC``, is already -set. It is assumed DPDK has been compiled using for instance: - -.. code-block:: console - - make install T=x86_64-native-linuxapp-gcc - +set. DPDK requires hugepages to be configured as detailed in section 2 of the DPDK manual. The bbdev test application has been tested with a configuration 40 x 1GB hugepages. The diff --git a/doc/guides/cryptodevs/virtio.rst b/doc/guides/cryptodevs/virtio.rst index 1496ec9208..2c46bda866 100644 --- a/doc/guides/cryptodevs/virtio.rst +++ b/doc/guides/cryptodevs/virtio.rst @@ -73,14 +73,7 @@ number of the virtio-crypto device: echo -n 0000:00:04.0 > /sys/bus/pci/drivers/virtio-pci/unbind echo "1af4 1054" > /sys/bus/pci/drivers/uio_pci_generic/new_id -Finally the front-end virtio crypto PMD driver can be installed: - -.. code-block:: console - - cd to the top-level DPDK directory - sed -i 's,\(CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO\)=n,\1=y,' config/common_base - make config T=x86_64-native-linux-gcc - make install T=x86_64-native-linux-gcc +Finally the front-end virtio crypto PMD driver can be installed. Tests ----- diff --git a/doc/guides/howto/virtio_user_for_container_networking.rst b/doc/guides/howto/virtio_user_for_container_networking.rst index f31d918bcd..412b29664b 100644 --- a/doc/guides/howto/virtio_user_for_container_networking.rst +++ b/doc/guides/howto/virtio_user_for_container_networking.rst @@ -56,12 +56,6 @@ Sample Usage Here we use Docker as container engine. It also applies to LXC, Rocket with some minor changes. -#. Compile DPDK. - - .. code-block:: console - - make install RTE_SDK=`pwd` T=x86_64-native-linux-gcc - #. Write a Dockerfile like below. .. code-block:: console diff --git a/doc/guides/linux_gsg/nic_perf_intel_platform.rst b/doc/guides/linux_gsg/nic_perf_intel_platform.rst index 1dabbce244..08be5d58b9 100644 --- a/doc/guides/linux_gsg/nic_perf_intel_platform.rst +++ b/doc/guides/linux_gsg/nic_perf_intel_platform.rst @@ -124,17 +124,11 @@ The following are some recommendations on GRUB boot settings: Configurations before running DPDK ---------------------------------- -1. Build the DPDK target and reserve huge pages. +1. Reserve huge pages. See the earlier section on :ref:`linux_gsg_hugepages` for more details. - The following shell commands may help with building and configuration: - .. code-block:: console - # Build DPDK target. - cd dpdk_folder - make install T=x86_64-native-linux-gcc -j - # Get the hugepage size. awk '/Hugepagesize/ {print $2}' /proc/meminfo diff --git a/doc/guides/nics/bnxt.rst b/doc/guides/nics/bnxt.rst index ed650187e0..a53cdad21d 100644 --- a/doc/guides/nics/bnxt.rst +++ b/doc/guides/nics/bnxt.rst @@ -56,33 +56,15 @@ The BNXT PMD supports operating with: * Linux igb_uio * BSD nic_uio -Compiling BNXT PMD ------------------- - -To compile the BNXT PMD: - -.. code-block:: console - - make config T=x86_64-native-linux-gcc && make // for x86-64 - make config T=x86_32-native-linux-gcc && make // for x86-32 - make config T=armv8a-linux-gcc && make // for ARMv8 - -Bind the device to one of the kernel modules listed above - -.. code-block:: console - - ./dpdk-devbind.py -b vfio-pci|igb_uio|uio_pci_generic bus_id:device_id.function_id - -Load an application (e.g. testpmd) with a default configuration (e.g. a single -TX /RX queue): - -.. code-block:: console - - ./testpmd -c 0xF -n 4 -- -i --portmask=0x1 --nb-cores=2 - Running BNXT PMD ---------------- +Bind the device to one of the kernel modules listed above + +.. code-block:: console + + ./dpdk-devbind.py -b vfio-pci|igb_uio|uio_pci_generic bus_id:device_id.function_id + The BNXT PMD can run on PF or VF. PCI-SIG Single Root I/O Virtualization (SR-IOV) involves the direct assignment diff --git a/doc/guides/nics/build_and_test.rst b/doc/guides/nics/build_and_test.rst index f99e019ff3..3138c0f880 100644 --- a/doc/guides/nics/build_and_test.rst +++ b/doc/guides/nics/build_and_test.rst @@ -19,45 +19,12 @@ information on how to build and run testpmd. Driver Compilation ------------------ -To compile a PMD for a platform, run make with appropriate target as shown below. -Use "make" command in Linux and "gmake" in FreeBSD. This will also build testpmd. +To compile a PMD for a platform, build DPDK +as described in the "Getting Started Guide" for your platform. +This will also build testpmd. -To check available targets: - -.. code-block:: console - - cd - make showconfigs - -Example output: - -.. code-block:: console - - arm-armv7a-linux-gcc - arm64-armv8a-linux-gcc - arm64-dpaa-linux-gcc - arm64-thunderx-linux-gcc - arm64-xgene1-linux-gcc - i686-native-linux-gcc - i686-native-linux-icc - ppc_64-power8-linux-gcc - x86_64-native-freebsd-clang - x86_64-native-freebsd-gcc - x86_64-native-linux-clang - x86_64-native-linux-gcc - x86_64-native-linux-icc - x86_x32-native-linux-gcc - -To compile a PMD for Linux x86_64 gcc target, run the following "make" command: - -.. code-block:: console - - make install T=x86_64-native-linux-gcc - -Use ARM (ThunderX, DPAA, X-Gene) or PowerPC target for respective platform. - -For more information, refer to the :ref:`Getting Started Guide for Linux ` -or :ref:`Getting Started Guide for FreeBSD ` depending on your platform. +Detailed instructions are available +in the :doc:`meson build guide <../prog_guide/build-sdk-meson>`. Running testpmd in Linux ------------------------ diff --git a/doc/guides/testpmd_app_ug/build_app.rst b/doc/guides/testpmd_app_ug/build_app.rst index d1ca9f3d19..4d08db75b5 100644 --- a/doc/guides/testpmd_app_ug/build_app.rst +++ b/doc/guides/testpmd_app_ug/build_app.rst @@ -6,29 +6,3 @@ Compiling the Application The ``testpmd`` application is compiled as part of the main compilation of the DPDK libraries and tools. Refer to the DPDK Getting Started Guides for details. -The basic compilation steps are: - -#. Set the required environmental variables and go to the source directory: - - .. code-block:: console - - export RTE_SDK=/path/to/rte_sdk - cd $RTE_SDK - -#. Set the compilation target. For example: - - .. code-block:: console - - export RTE_TARGET=x86_64-native-linux-gcc - -#. Build the application: - - .. code-block:: console - - make install T=$RTE_TARGET - - The compiled application will be located at: - - .. code-block:: console - - $RTE_SDK/$RTE_TARGET/app/testpmd From patchwork Thu Jun 18 00:42:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 71703 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3FC97A04A5; Thu, 18 Jun 2020 02:42:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 068F814581; Thu, 18 Jun 2020 02:42:49 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 2D42314581; Thu, 18 Jun 2020 02:42:47 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id BDA425C00CF; Wed, 17 Jun 2020 20:42:46 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 17 Jun 2020 20:42:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm1; bh= OzWp3CRrFGqsGsN6RnqCQqA/VNkBLeNfoYyO/BCFbco=; b=hXXHxiETTsL+DVbH FuMbbsgdrQ0McXlCqCs6XqVvMfTSs0oHr1CojEvrdKTX2ZjAukY1TydsvR63bN1V Ylcwjn3YB9vHnd5hc/fscveo/tq+GsBs886ho7O+TtLsqzZwpsIgwqdjMTL0dIyZ 3Iymozmyd+T4sWzJFvjAB2CcA0U53Yp2zhV4hLLTyn0LClcb3x1Ye688Z41TDoft XNX7fAPtgbN89ku/b4nZM8yXdmPj59g4x5ekkJk1/qXpjDBzRIiarfkob861kPqJ cmDSSCimDPFQR63IYozDAUKIAg6/zQtVr8uzuAvho+7+q22O6PUCNNXhOK1v+uHh Lk54kA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=OzWp3CRrFGqsGsN6RnqCQqA/VNkBLeNfoYyO/BCFb co=; b=OrPr+/XzcH3veWmmGSxSNbglCSqUtgUg7GEgFViVtQo2/TKvhw/7zh3bi ChwxAp/Z/L2/jKoozO/lrunt5gQeRWHiXwVdIxctqChSB2GUKyl40re1ivg+pxP1 rIAAG1bVvk2NuYUKk5y/51/C9qBFpQU+ipDPEYl5/AtoCanjyjYWQnKGZlofsb17 5M9CgzlgoOIo5AL6dC+kZqem2UGR4iFBBSHaQdHN3tO4TUoIV0KfarLMat1oDcCC r/Hkmb5gW0jyEvEJAISIyVVjQ9OelgIYg9xuyKfs1+ltRu2uLcwXV95z7TRGt6EW 14I6daUOHg3/5YbxCRXdceL5FOrTw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejfedgfeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeevuddtveeuveejkeevheehveffueegjedukeffledtleekieef geduhedvgeejhfenucfkphepjeejrddvtdehrddugedvrddutdegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.monjalon.net (104.142.205.77.rev.sfr.net [77.205.142.104]) by mail.messagingengine.com (Postfix) with ESMTPA id 1035B3061856; Wed, 17 Jun 2020 20:42:44 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, bruce.richardson@intel.com, stable@dpdk.org, John McNamara , Marko Kovacevic Date: Thu, 18 Jun 2020 02:42:17 +0200 Message-Id: <20200618004218.3730743-4-thomas@monjalon.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200618004218.3730743-1-thomas@monjalon.net> References: <20200618004218.3730743-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 3/4] doc: update build instructions in the Linux guide X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Before removing the "make" build system completely, the Linux guide instructions are made more concise and accurate. Some detailed explanations are also available in doc/guides/prog_guide/dev_kit_root_make_help.rst This is the swan song for makefile system, in order to have accurate information backported in LTS. Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon --- doc/guides/linux_gsg/build_dpdk.rst | 66 ++++++++--------------------- 1 file changed, 18 insertions(+), 48 deletions(-) diff --git a/doc/guides/linux_gsg/build_dpdk.rst b/doc/guides/linux_gsg/build_dpdk.rst index 4aeb4697d9..c536e354ef 100644 --- a/doc/guides/linux_gsg/build_dpdk.rst +++ b/doc/guides/linux_gsg/build_dpdk.rst @@ -167,60 +167,32 @@ Installation of DPDK Target Environment using Make is therefore recommended that DPDK installation is done using meson and ninja as described above. -The format of a DPDK target is:: +Get a native target environment automatically:: - ARCH-MACHINE-EXECENV-TOOLCHAIN - -where: - -* ``ARCH`` can be: ``i686``, ``x86_64``, ``ppc_64``, ``arm64`` - -* ``MACHINE`` can be: ``native``, ``power8``, ``armv8a`` - -* ``EXECENV`` can be: ``linux``, ``freebsd`` - -* ``TOOLCHAIN`` can be: ``gcc``, ``icc`` - -The targets to be installed depend on the 32-bit and/or 64-bit packages and compilers installed on the host. -Available targets can be found in the DPDK/config directory. -The defconfig\_ prefix should not be used. + make defconfig O=mybuild .. note:: - Configuration files are provided with the ``RTE_MACHINE`` optimization level set. Within the configuration files, the ``RTE_MACHINE`` configuration value is set to native, which means that the compiled software is tuned for the platform on which it is built. - For more information on this setting, and its possible values, see the *DPDK Programmers Guide*. -When using the IntelĀ® C++ Compiler (icc), one of the following commands should be invoked for 64-bit or 32-bit use respectively. -Notice that the shell scripts update the ``$PATH`` variable and therefore should not be performed in the same session. -Also, verify the compiler's installation directory since the path may be different: +Or get a specific target environment:: -.. code-block:: console + make config T=x86_64-native-linux-gcc O=mybuild - source /opt/intel/bin/iccvars.sh intel64 - source /opt/intel/bin/iccvars.sh ia32 +The format of a DPDK target is "ARCH-MACHINE-EXECENV-TOOLCHAIN". +Available targets can be found with:: -To install and make targets, use the ``make install T=`` command in the top-level DPDK directory. + make help -For example, to compile a 64-bit target using icc, run: +Customize the target configuration in the generated ``.config`` file. +Example for enabling the pcap PMD:: -.. code-block:: console + sed -ri 's,(PMD_PCAP=).*,\1y,' mybuild/.config - make install T=x86_64-native-linux-icc +Compile the target:: -To compile a 32-bit build using gcc, the make command should be: - -.. code-block:: console - - make install T=i686-native-linux-gcc - -To prepare a target without building it, for example, if the configuration changes need to be made before compilation, -use the ``make config T=`` command: - -.. code-block:: console - - make config T=x86_64-native-linux-gcc + make -j4 O=mybuild .. warning:: @@ -229,15 +201,13 @@ use the ``make config T=`` command: If the DPDK is not being built on the target machine, the ``RTE_KERNELDIR`` environment variable should be used to point the compilation at a copy of the kernel version to be used on the target machine. -Once the target environment is created, the user may move to the target environment directory and continue to make code changes and re-compile. -The user may also make modifications to the compile-time DPDK configuration by editing the .config file in the build directory. -(This is a build-local copy of the defconfig file from the top- level config directory). +Install the target in a separate directory:: -.. code-block:: console + make install O=mybuild DESTDIR=myinstall prefix= - cd x86_64-native-linux-gcc - vi .config - make +The environment is ready to build a DPDK application:: + + RTE_SDK=$(pwd)/myinstall/share/dpdk RTE_TARGET=x86_64-native-linux-gcc make -C myapp In addition, the make clean command can be used to remove any existing compiled files for a subsequent full, clean rebuild of the code. @@ -245,5 +215,5 @@ Browsing the Installed DPDK Environment Target ---------------------------------------------- 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 applications are built under the app directory, which may be used for testing. A kmod directory is also present that contains kernel modules which may be loaded if needed. From patchwork Thu Jun 18 00:42:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 71704 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6C99BA04A5; Thu, 18 Jun 2020 02:43:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 80D821B75C; Thu, 18 Jun 2020 02:42:51 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 816201B75C for ; Thu, 18 Jun 2020 02:42:50 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 365415C0049; Wed, 17 Jun 2020 20:42:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 17 Jun 2020 20:42:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=iwvnSHhSCKR5w Q9Ap082evOr2ZF4WsPImbjLoP550oM=; b=nvqY8hixT1FEpT5ooEWJkwcx17Iua 2uAActY/xGxJSjYNP37e5q77En/FkVpQDgx4ZJu0t3u+u4XvGTToq7utScocfzrS aJd3lQ+xGKaErsZIE0GYvzAmx65MK2xf7aDpY67Fp5T241Adju3rf71QEJy5GnOi ssHRds+7r6FA/qlOZFW9anpJe/XPCRGlr8SkkQf+tmQk7OXpg69+wgSw6iAEs7NV aFC5W/2Qp84lTortqHRTPYtuSM9ccO+r7Hsu5XNUntsxJd4p/e+DuQ9gkGLKPr7O kSW1lu3cucow6Peoz8bYvUawNYfTTq94w9BdINtLh8wPExeuKJ4BqGK8Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=iwvnSHhSCKR5wQ9Ap082evOr2ZF4WsPImbjLoP550oM=; b=kXgTkbNX lwFvkEm7C7g2BM0Hbji7feSANXxOcLAMSatd77ZeGw7E+nD13o4LSKW/MqF1ZpXo alNM/ab/qGdcU5vvVvUk3q8IKE1NmSxumF81SDazQmJvnS69FwbgQ6Ic9YjMNKUK GufeGNf+OeAKTXudm0UTz2ZDdi6lfFASDZ5+sHYBg2a7jOSIbfuzOLOdxgPCHfbk 3lLExcyFgINF1tiKf3X3/CSE9tZlJkovjwzEytmNGrMx97xcgjfiA0rpkDcqiHlO V7mce5s4VTVRX+GIduat6tsRa8RqAMO5FkR0+1oE5dIo0KzHkOiMc6klc9YEMUEL IqpWFaatwxh4Yw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejfedgfeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeelleeuvddtheefteeuhe euffevudegjedtkeefueekjeeuhfelkefhheeikefhleenucffohhmrghinhepughpughk rdhorhhgpdhsughktghonhhfihhgrdhmkhdpshgukhhrohhothdrmhhkpdhsughksghuih hlugdrmhhknecukfhppeejjedrvddthedrudegvddruddtgeenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghloh hnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (104.142.205.77.rev.sfr.net [77.205.142.104]) by mail.messagingengine.com (Postfix) with ESMTPA id 278F43061856; Wed, 17 Jun 2020 20:42:48 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, bruce.richardson@intel.com Date: Thu, 18 Jun 2020 02:42:18 +0200 Message-Id: <20200618004218.3730743-5-thomas@monjalon.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200618004218.3730743-1-thomas@monjalon.net> References: <20200618004218.3730743-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 4/4] mk: add a paused deprecation warning before each build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" DPDK 20.05 had some deprecation notes after "make config" and after the build. For DPDK 20.08, the config note is replaced with a warning before the config and before the build. After the warning, there is a pause which can be skipped with the variable MAKE_PAUSE. This deprecation process was discussed in the Technical Board: http://mails.dpdk.org/archives/dev/2020-April/162839.html Signed-off-by: Thomas Monjalon Acked-by: Bruce Richardson --- mk/rte.sdkconfig.mk | 5 ----- mk/rte.sdkroot.mk | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk index 2ea85e4643..f538649f22 100644 --- a/mk/rte.sdkconfig.mk +++ b/mk/rte.sdkconfig.mk @@ -62,11 +62,6 @@ else config: $(RTE_OUTPUT)/include/rte_config.h $(RTE_OUTPUT)/Makefile @echo "Configuration done using" \ $(patsubst defconfig_%,%,$(notdir $(RTE_CONFIG_TEMPLATE))) - @echo "==== NOTE ====" - @echo "It is recommended to build DPDK using 'meson' and 'ninja'" - @echo "See https://doc.dpdk.org/guides/linux_gsg/build_dpdk.html for instructions" - @echo "Building DPDK with 'make' will be deprecated in a future release" - @echo "==============" endif $(RTE_OUTPUT): diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk index 4043a9d4e8..d3b9cdd048 100644 --- a/mk/rte.sdkroot.mk +++ b/mk/rte.sdkroot.mk @@ -60,7 +60,22 @@ export ROOTDIRS-y ROOTDIRS- ROOTDIRS-n .PHONY: default test-build default test-build: all +.PHONY: warning +warning: + @echo + @echo "=========================== WARNING ============================" + @echo "It is recommended to build DPDK using 'meson' and 'ninja'" + @echo "See https://doc.dpdk.org/guides/linux_gsg/build_dpdk.html" + @echo "Building DPDK with 'make' will be deprecated in a future release" + @echo "================================================================" + @echo + @test "$(MAKE_PAUSE)" = n || ( \ + echo "This deprecation warning can be passed by adding MAKE_PAUSE=n"; \ + echo "to 'make' command line or as an exported environment variable."; \ + echo "Press enter to continue..."; read) + .PHONY: config defconfig showconfigs showversion showversionum +config: warning config defconfig showconfigs showversion showversionum: $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk $@ @@ -96,4 +111,5 @@ examples examples_clean: # all other build targets %: $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk checkconfig + $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkroot.mk warning $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkbuild.mk $@