From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCHv4 5/5] pmdinfo.py: Add tool to query binaries for hw and other support information Date: Wed, 25 May 2016 19:22:39 +0200 Message-ID: <1484190.9fzbW2DJJe@xps13> References: <1463431287-4551-1-git-send-email-nhorman@tuxdriver.com> <1464118912-19658-1-git-send-email-nhorman@tuxdriver.com> <1464118912-19658-6-git-send-email-nhorman@tuxdriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Bruce Richardson , Stephen Hemminger , Panu Matilainen To: Neil Horman Return-path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 99BAB2BB5 for ; Wed, 25 May 2016 19:22:41 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id n129so193450278wmn.1 for ; Wed, 25 May 2016 10:22:41 -0700 (PDT) In-Reply-To: <1464118912-19658-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" 2016-05-24 15:41, Neil Horman: > 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. I don't know any DPDK app dynamically linked with a PMD (with DT_NEEDED). However it is a good idea to handle this case. But relying on the name assumption "librte_pmd" is really weak. > + $(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/tools/pmdinfo.py, \ > + $(DESTDIR)$(bindir)/pmdinfo) I think we must prefix the tool name with dpdk. What about dpdk-objinfo or dpdk-pmdinfo? > +from elftools.elf.elffile import ELFFile > +from elftools.elf.dynamic import DynamicSection, DynamicSegment > +from elftools.elf.enums import ENUM_D_TAG > +from elftools.elf.segments import InterpSegment > +from elftools.elf.sections import SymbolTableSection Should it be possible to implement pmdinfogen with this Python library? I'll probably comment on the pmdinfo script details later. Just knowing you did a tool is enough to assert that it is a good step :) Thanks