pmdinfogen: add buildtools and pmdinfogen utility
authorNeil Horman <nhorman@tuxdriver.com>
Fri, 17 Jun 2016 18:46:20 +0000 (14:46 -0400)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 6 Jul 2016 20:34:39 +0000 (22:34 +0200)
commit98b0fdb0ffc6b8fe70bef16d218b97f7a6c283bd
tree2b963a440a4ee700c794a445b2188ef9b19758ff
parent26622cbe1b91727f55dfb017c4df6f533407b3c6
pmdinfogen: add buildtools and pmdinfogen utility

pmdinfogen is a tool used to parse object files and build json strings for
use in later determining hardware support in a dso or application binary.
pmdinfo looks for the non-exported symbol names this_pmd_name<n> and
this_pmd_tbl<n> (where n is a integer counter).  It records the name of
each of these tuples, using the later to find the symbolic name of the
pci_table for physical devices that the object supports.  With this
information, it outputs a C file with a single line of the form:

static char *<pmd_name>_driver_info[] __attribute__((used)) = " \
PMD_DRIVER_INFO=<json string>";

Where <pmd_name> is the arbitrary name of the pmd, and <json_string> is the
json encoded string that hold relevant pmd information, including the pmd
name, type and optional array of pci device/vendor ids that the driver
supports.

This c file is suitable for compiling to object code, then relocatably
linking into the parent file from which the C was generated.  This creates
an entry in the string table of the object that can inform a later tool
about hardware support.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Remy Horton <remy.horton@intel.com>
GNUmakefile
buildtools/Makefile [new file with mode: 0644]
buildtools/pmdinfogen/Makefile [new file with mode: 0644]
buildtools/pmdinfogen/pmdinfogen.c [new file with mode: 0644]
buildtools/pmdinfogen/pmdinfogen.h [new file with mode: 0644]
mk/rte.hostapp.mk
mk/rte.sdkbuild.mk
mk/rte.sdkinstall.mk