From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] pmdinfogen: allow using stdin and stdout Date: Mon, 29 Jan 2018 20:49:39 +0100 Message-ID: <2334903.1Cxcry8nHy@xps> References: <20180125111225.231897-1-bruce.richardson@intel.com> <20180125213040.GB12245@neilslaptop.think-freely.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Neil Horman To: Bruce Richardson Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 686D51B2D7 for ; Mon, 29 Jan 2018 20:50:26 +0100 (CET) In-Reply-To: <20180125213040.GB12245@neilslaptop.think-freely.org> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 25/01/2018 22:30, Neil Horman: > On Thu, Jan 25, 2018 at 11:12:25AM +0000, Bruce Richardson wrote: > > Rather than having to work off files all the time, allow stdin and stdout > > to be used as the source and destination for pmdinfogen. This will allow > > other possible usages from scripts, e.g. taking files from ar archive and > > building a single .pmd.c file from all the .o files in it. > > > > for f in `ar t librte_pmd_xyz.a` ; do > > ar p librte_pmd_xyz.a $f | pmdinfogen - - >> xyz_info.c > > done > > > > Signed-off-by: Bruce Richardson > I think this is a great idea. FWIW, I think the ELF header at the front of the > file should have something that tells you the overall disk file size in it. The > ELF header is pretty easy to parse and do some basic evaluation on, so you could > accelerate that read a bit, by breaking it down into a read of the size of the > header, followed by a parsing of it and a subsequent read of the overall size, > but that probably just nice to have > > Either way, this is a worthwhile feature to have > Acked-by: Neil Horman Applied, thanks