From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id AA661374E for ; Tue, 31 May 2016 15:59:15 +0200 (CEST) Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1b7kCK-0005MD-LX; Tue, 31 May 2016 09:59:13 -0400 From: Neil Horman To: dev@dpdk.org Cc: Neil Horman , Bruce Richardson , Thomas Monjalon , Stephen Hemminger , Panu Matilainen Date: Tue, 31 May 2016 09:57:48 -0400 Message-Id: <1464703068-2924-8-git-send-email-nhorman@tuxdriver.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464703068-2924-1-git-send-email-nhorman@tuxdriver.com> References: <1463431287-4551-1-git-send-email-nhorman@tuxdriver.com> <1464703068-2924-1-git-send-email-nhorman@tuxdriver.com> X-Spam-Score: -1.0 (-) X-Spam-Status: No Subject: [dpdk-dev] [PATCHv6 7/7] doc: Add prog_guide section documenting pmdinfo script X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2016 13:59:15 -0000 Information on pmdinfogen may be useful to 3rd party driver developers. Include documentation on what it does Signed-off-by: Neil Horman CC: Bruce Richardson CC: Thomas Monjalon CC: Stephen Hemminger CC: Panu Matilainen --- doc/guides/prog_guide/dev_kit_build_system.rst | 43 ++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst index 3e89eae..e5043dc 100644 --- a/doc/guides/prog_guide/dev_kit_build_system.rst +++ b/doc/guides/prog_guide/dev_kit_build_system.rst @@ -70,7 +70,7 @@ Each build directory contains include files, libraries, and applications: ... ~/DEV/DPDK$ ls i686-native-linuxapp-gcc - app build hostapp include kmod lib Makefile + app build buildtools include kmod lib Makefile ~/DEV/DPDK$ ls i686-native-linuxapp-gcc/app/ @@ -264,7 +264,7 @@ These Makefiles generate a binary application. * rte.extapp.mk: External application -* rte.hostapp.mk: Host application in the development kit framework +* rte.buildtools.mk: prerequisite tool to build dpdk Library ^^^^^^^ @@ -304,6 +304,45 @@ Misc * rte.subdir.mk: Build several directories in the development kit framework. +.. _Internally_Generated_Build_Tools + +Internally Generated Build Tools +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +buildtools/pmdinfogen + + +pmdinfogen scans an object (.o) file for various well known symbol names. These +well know symbol names are defined by various macros and used to export +important information about hardware support and usage for pmd files. for +instance the macro: + +.. code-block:: c + + PMD_REGISTER_DRIVER(drv, name) + + +Creates the following symbol: + +.. code-block:: c + + static char this_pmd_name0[] __attribute__((used)) = ""; + + +Which pmdinfogen scans for. Using this information other relevant bits of data +can be exported from the object file and used to produce a hardware support +description, that pmdinfogen then encodes into a json formatted string in the +following format: + +.. code-block:: C + + static char ="PMD_INFO_STRING=\"{'name' : '', ...}\""; + + +These strings can then be searched for by external tools to determine the +hardware support of a given library or application + + .. _Useful_Variables_Provided_by_the_Build_System: Useful Variables Provided by the Build System -- 2.5.5