From patchwork Thu Jun 25 21:43:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 72217 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 EDB84A0519; Thu, 25 Jun 2020 23:44:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F20182B96; Thu, 25 Jun 2020 23:43:58 +0200 (CEST) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id AADE125B3 for ; Thu, 25 Jun 2020 23:43:55 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 4C321391; Thu, 25 Jun 2020 17:43:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 25 Jun 2020 17:43:54 -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=ySQBgBR9FIZUb YROkl+rqPkB3Q/FMY5tpmdz9xIs5Iw=; b=QoUiQXTLovmiGo44nfJsHQnPpxenK uJE0geIzvMFEHiw5d8V6vtlV48OBb/jnUzc7LydPkhn3kGmQa4XHx7p5D0ua8XK+ AhBzxkpIaiZGKM/IjR9MK6UFhxxpxKtS8v2bsBAJjXAxmTfzCQCxxcAiAih5BvpB EkfQuvxslxjffkXEVPmttSWnRvWDrQAF7dkyd20yl9zr9vwI4oYRLUnhF342ozzu g106CUTzjb072Z4gXvJPM1Bjwe4AJs2ECvwH41si3/q2FZBDpm1ZbSYV+7kFEaKQ 0MlLOhGwGstWr4j8q8CCx2/IkOqHyqiBKbWxgROnNlbF4L731a0art9RQ== 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=ySQBgBR9FIZUbYROkl+rqPkB3Q/FMY5tpmdz9xIs5Iw=; b=rO/USJqp laGRJ1Yq8yKhYNHGgXi6492nnPrseFIsC8XdkzodN7Zbootoibk67VXPSHHplxi3 qostHcPa/vSvpkMQMGPe3COYdPt8XNkt4leiqcKU/QeA+cLhBL78Fp26IhRf57Un EvGdXfhqlFtGgFpZV/whIlfH3hXqJTvk5zrvXRXVzw4/x5YNLhM2EZm4LOHanF/a 6SqavGq3RO+KjjumHmQ4ZxXaFYd4Ppl1gX8bgmD7FNdSfGdiImuhPstsEs7V7eCK tySUD9wCGmOJ3e+4shKkTmE/sU4u8E8dAAKFQq22IMh1H2UQTBzzWaifDYoxWRWc fM9S+uOQPjO9fw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeltddgtdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg uedthedtgeevnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 0C7B4328005D; Thu, 25 Jun 2020 17:43:52 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, bruce.richardson@intel.com, John McNamara , Marko Kovacevic Date: Thu, 25 Jun 2020 23:43:35 +0200 Message-Id: <20200625214338.1838457-2-thomas@monjalon.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200625214338.1838457-1-thomas@monjalon.net> References: <20200618004218.3730743-1-thomas@monjalon.net> <20200625214338.1838457-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 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 --- v2: update index --- doc/guides/prog_guide/extend_dpdk.rst | 109 -------------------------- doc/guides/prog_guide/index.rst | 1 - 2 files changed, 110 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 diff --git a/doc/guides/prog_guide/index.rst b/doc/guides/prog_guide/index.rst index 6f63f300af..8838ffb9ae 100644 --- a/doc/guides/prog_guide/index.rst +++ b/doc/guides/prog_guide/index.rst @@ -65,7 +65,6 @@ Programmer's Guide dev_kit_root_make_help build-sdk-meson meson_ut - extend_dpdk build_app ext_app_lib_make_help perf_opt_guidelines From patchwork Thu Jun 25 21:43:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 72218 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 95058A0350; Thu, 25 Jun 2020 23:44:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 559F8AAD5; Thu, 25 Jun 2020 23:44:02 +0200 (CEST) Received: from wnew1-smtp.messagingengine.com (wnew1-smtp.messagingengine.com [64.147.123.26]) by dpdk.org (Postfix) with ESMTP id 62B775F69 for ; Thu, 25 Jun 2020 23:44:00 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.west.internal (Postfix) with ESMTP id 973497F3; Thu, 25 Jun 2020 17:43:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 25 Jun 2020 17:43:59 -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=/Tq4TPEWgG3QJ uJl8K27uiT6k/T3NI9VTDQn70Y2vo4=; b=f2SqN+RT2GG1LLjCiY2ThRMzQ6AFG GZTdMFPN2G3zh1/voVLLj40LCtNTVVCXXk2W1fIrSk1HWRydMpzrKkmnCFMbL26j J/8gLW5nzHjEWTiKQzsK8jVcgM8dGOLsaV9KsZjoZ5giy4U8kQG2daz5aee/139N h5f/O2nLpLU4uItLknV6dZVBmesFLbVFnnXKspRxFadBzsQsdeAC9PRT7ZTkDdLC aokPEHbe9+YIr70Kxosntl0hEUhq+Vpn2cQoLPuQVLL2wmWPRHb8EEUVo698gdPT ZevPLwo6rh3sCikr5FZZcQ4q5K2aBElT+pl7N7ezjwsncjswJoxkeC3sQ== 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=/Tq4TPEWgG3QJuJl8K27uiT6k/T3NI9VTDQn70Y2vo4=; b=CpOEbTOo wBx/YYuVhrwLYfmjxFyfC6RjdCaI07YAc6zaqkanl4P81VhTXwwSJPqZngEkSpFM xP0L1XsTXXMb4pMTh4NNJ4te2RFDh/cfuvHUfySBPuYAwAKyojRggN6CvwoOqQoc 3KTXFGpDmRI1GK8NI63V71Pswoc0Y3uVPVWfGUniETzyQ4zntMtBcKTRgpgv5Aky 9QOZ+PNDQTc6S53yfpppQBMQbOx1syus9GW15QlGe8reqL/iHNbaE6sxcwjfJC9u PuUu9Cp4cnMvquNiOEUwjSSjF5gnqXLjRptGRimFYNkrIxDaekjsDTZhPiGOLm2z uly3fMAy8UdVrQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeltddgtdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg uedthedtgeevnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 2AC82328005E; Thu, 25 Jun 2020 17:43:56 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, bruce.richardson@intel.com, Ajit Khaparde , Jay Zhou , Nicolas Chautru , John McNamara , Marko Kovacevic , Somnath Kotur , Wenzhuo Lu , Beilei Xing , Bernard Iremonger Date: Thu, 25 Jun 2020 23:43:36 +0200 Message-Id: <20200625214338.1838457-3-thomas@monjalon.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200625214338.1838457-1-thomas@monjalon.net> References: <20200618004218.3730743-1-thomas@monjalon.net> <20200625214338.1838457-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 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 --- v2: fix unrelated (but close) typo in bbdev guides --- doc/guides/bbdevs/fpga_5gnr_fec.rst | 9 +--- doc/guides/bbdevs/fpga_lte_fec.rst | 9 +--- 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, 17 insertions(+), 123 deletions(-) diff --git a/doc/guides/bbdevs/fpga_5gnr_fec.rst b/doc/guides/bbdevs/fpga_5gnr_fec.rst index 19bba3661f..6760391e8c 100644 --- a/doc/guides/bbdevs/fpga_5gnr_fec.rst +++ b/doc/guides/bbdevs/fpga_5gnr_fec.rst @@ -51,15 +51,10 @@ FPGA 5GNR FEC does not support the following: Installation ------------ -Section 3 of the DPDK manual provides instuctions on installing and compiling DPDK. The +Section 3 of the DPDK manual provides instructions 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..fdc8a76981 100644 --- a/doc/guides/bbdevs/fpga_lte_fec.rst +++ b/doc/guides/bbdevs/fpga_lte_fec.rst @@ -50,15 +50,10 @@ FPGA LTE FEC does not support the following: Installation -------------- -Section 3 of the DPDK manual provides instuctions on installing and compiling DPDK. The +Section 3 of the DPDK manual provides instructions 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 25 21:43:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 72219 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 55F73A0350; Thu, 25 Jun 2020 23:44:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D31DB1B75C; Thu, 25 Jun 2020 23:44:04 +0200 (CEST) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id 7DCD5AAB7; Thu, 25 Jun 2020 23:44:01 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 642585DB; Thu, 25 Jun 2020 17:44:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 25 Jun 2020 17:44:00 -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=Gxs4V3HPm3qcu3S1 HaFIgIKjCw+jX6jHNBuVX9xbJ9v2TbKVcS4XxrjIOqifQDAXPmeQqJIIR54h5OjN is2/Wo0UEye/ed5jkDBZBE35ICp6s6FWTa8xhnYHYXurKdcpBQ8mI17Lx0Dqe6ca ziWQLjXv1zqDOABo88YDYQIMaIfkF3CRUMDjQ+pSnqnMk51OPY/3ZmB00cjf4aEl 4AkNkw65omIeGm7XBeJ7vbNpv55+wFgkiC7/o0VF/Ph39ANx/+l37B+lW5fCu4wz SaRTvjoiDa8WH5skyRObEqzOHrLabHhTAG0dH9ksT803xOxVNkDeP/lsvn0xdlRP gzGmGg== 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=XA4xkpRhQw9uyUnGQ1RP6B9IsuS2UWJd4sbtsvzG8iRcxurPtwY9TpF8V Z9Fa/lK9UFmj6H9YpZKlVRYA6d5bgEsCztjR6gvwo/Naq6nra3dLJ4iw1EyVUg5g 2Bfhm2swVLn6uyU2w4tvOoWWPZ+o63ZhYGCMz3WxkKuBvncl4ePbJBlJBDeVzABa 6uGdaY3SypeZdkfT+EKoEPkq6yP8NsWRw4y2pJc+aYPGV0iHOlLaqMztnRLOD77A d4jzBmvxWvB7PTB9IZC6tOlCfCxxCYaxKela6P1k9Rj1bSuf1YxxauDoGacn1+3j gtC7GfI2Ah7x+o0FQzsXRyl1mYAjg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeltddgtdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeevuddtveeuveejkeevheehveffueegjedukeffledtleekieef geduhedvgeejhfenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1D264328005A; Thu, 25 Jun 2020 17:43:59 -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, 25 Jun 2020 23:43:37 +0200 Message-Id: <20200625214338.1838457-4-thomas@monjalon.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200625214338.1838457-1-thomas@monjalon.net> References: <20200618004218.3730743-1-thomas@monjalon.net> <20200625214338.1838457-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 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 Acked-by: Bruce Richardson --- 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 25 21:43:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 72220 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 711CAA0350; Thu, 25 Jun 2020 23:44:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B9B321BDAE; Thu, 25 Jun 2020 23:44:07 +0200 (CEST) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id 95CBC1B3BB for ; Thu, 25 Jun 2020 23:44:03 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id AB1C87F4; Thu, 25 Jun 2020 17:44:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 25 Jun 2020 17:44:02 -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=aWieujkoesWJ8 tCBMayup6393b3IVSUTAGeLsn6QSGk=; b=seHdNzwwlTI25bJzFTDdakvE58hfw 1FCj+LXlw2jgTssaJR7/josnWmujjNUXk8eDy9wBanXY32w1XeQVKay6njtEpTyS lCzSVHr8JloC3AQS3jNqoPb8/Tx4N6gZUQNR7y8M26PqvxsaxCVml0ngnMSZqyRH GCjDqO7diKkxAhNEcMYgwkfVKMW5jrYvPjGlWNgV55jS0V9i7WtEfnjGV7DPWTy2 7nL6wZLGR9Fsr47RHkVU3sSEL2uA6UH6S6WcKwN9LScLXhfcSUSHMc+f1G0HFZpa zN+e/coL0gXftKHnu/Ck/JFNoe73j1tV+hTrbrCytPcSkqVFuePa0ZsvA== 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=aWieujkoesWJ8tCBMayup6393b3IVSUTAGeLsn6QSGk=; b=VtJm6uUO 07Qg0YPWJ7+SYaYOZlPbriIr9XpMLyBVn/zaZitaWZyoV2uaf0yp5ZAsigS3VBAO ytVt+24D+X+H35iMzyeKrPJd+Tt7nIQrs7mo+NPRXK9WIFkRnciZfUvU02zH5W96 VQtl7Ll7mvG5UQRft8Sf/XW+LSqCKuqkzMMbovoJgFXMli1Bq5lbGeAizq8Xlp9E YgsOsum3rtlp6LK7yWT4lQIB/bTHlAwkJ56s2jrTFAJbDXHv+gNFf7Ualu8hyvPe UZVAY/tGcIhTKSegXDgb/BFvcTbcr+hgmvRgZXF4r4s5wSNmy7IQ/eGSf9XoaZat jADGaKp3e4aojQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeltddgtdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeelleeuvddtheefteeuhe euffevudegjedtkeefueekjeeuhfelkefhheeikefhleenucffohhmrghinhepughpughk rdhorhhgpdhsughktghonhhfihhgrdhmkhdpshgukhhrohhothdrmhhkpdhsughksghuih hlugdrmhhknecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghloh hnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id A006C328005E; Thu, 25 Jun 2020 17:44:01 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, bruce.richardson@intel.com Date: Thu, 25 Jun 2020 23:43:38 +0200 Message-Id: <20200625214338.1838457-5-thomas@monjalon.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200625214338.1838457-1-thomas@monjalon.net> References: <20200618004218.3730743-1-thomas@monjalon.net> <20200625214338.1838457-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 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 $@