From mboxrd@z Thu Jan 1 00:00:00 1970 From: Panu Matilainen Subject: Re: [PATCHv3 5/5] pmdinfo.py: Add tool to query binaries for hw and other support information Date: Tue, 24 May 2016 11:34:25 +0300 Message-ID: <2c39649e-241c-e711-8e39-e5facf77ff90@redhat.com> References: <1463431287-4551-1-git-send-email-nhorman@tuxdriver.com> <1463765086-17349-1-git-send-email-nhorman@tuxdriver.com> <1463765086-17349-6-git-send-email-nhorman@tuxdriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Bruce Richardson , Thomas Monjalon , Stephen Hemminger To: Neil Horman , dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id CAEF45954 for ; Tue, 24 May 2016 10:34:29 +0200 (CEST) In-Reply-To: <1463765086-17349-6-git-send-email-nhorman@tuxdriver.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 05/20/2016 08:24 PM, Neil Horman wrote: > This tool searches for the primer sting PMD_DRIVER_INFO= in any ELF binary, > and, if found parses the remainder of the string as a json encoded string, > outputting the results in either a human readable or raw, script parseable > format > > Note that, in the case of dynamically linked applications, pmdinfo.py will scan > for implicitly linked PMDs by searching the specified binaries .dynamic section > for DT_NEEDED entries that contain the substring librte_pmd. The DT_RUNPATH, > LD_LIBRARY_PATH, /usr/lib and /lib are searched for these libraries, in that > order > > If a file is specified with no path, it is assumed to be a PMD DSO, and the > LD_LIBRARY_PATH, /usr/lib[64]/ and /lib[64] is searched for it > > Currently the tool can output data in 3 formats: > > a) raw, suitable for scripting, where the raw JSON strings are dumped out > b) table format (default) where hex pci ids are dumped in a table format > c) pretty, where a user supplied pci.ids file is used to print out vendor and > device strings > > Signed-off-by: Neil Horman > CC: Bruce Richardson > CC: Thomas Monjalon > CC: Stephen Hemminger > CC: Panu Matilainen > --- > tools/pmdinfo.py | 545 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 545 insertions(+) > create mode 100755 tools/pmdinfo.py Oh, one more thing: assuming there'll be a v4, please add something like this to make the tool available in $PATH: diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk index 68e56b6..5a6a699 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -126,6 +126,8 @@ install-runtime: $(Q)$(call rte_mkdir, $(DESTDIR)$(sbindir)) $(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/tools/dpdk_nic_bind.py, \ $(DESTDIR)$(sbindir)/dpdk_nic_bind) + $(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/tools/pmdinfo.py, \ + $(DESTDIR)$(bindir)/pmdinfo) install-kmod: ifneq ($(wildcard $O/kmod/*),) - Panu -