From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id EF22A1B41E for ; Fri, 26 Jan 2018 10:19:22 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jan 2018 01:19:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,415,1511856000"; d="scan'208";a="198822199" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.77]) by fmsmga005.fm.intel.com with SMTP; 26 Jan 2018 01:19:19 -0800 Received: by (sSMTP sendmail emulation); Fri, 26 Jan 2018 09:19:19 +0000 Date: Fri, 26 Jan 2018 09:19:18 +0000 From: Bruce Richardson To: Neil Horman Cc: dev@dpdk.org Message-ID: <20180126091917.GA552@bricha3-MOBL3.ger.corp.intel.com> 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-Disposition: inline In-Reply-To: <20180125213040.GB12245@neilslaptop.think-freely.org> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.1 (2017-09-22) Subject: Re: [dpdk-dev] [PATCH] pmdinfogen: allow using stdin and stdout X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2018 09:19:23 -0000 On Thu, Jan 25, 2018 at 04:30:40PM -0500, Neil Horman wrote: > 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 > Yes, it's a good idea for future implementation. It would also allow multiple .o files to be streamed together, since pmdinfogen could recognise the end of one elf file and the start of another. That would remove the need for the loop in the example above, since we could just pipe the "ar p" output of the whole archive straight to pmdinfogen. Not something for this release though. :-) Thanks, /Bruce > Either way, this is a worthwhile feature to have > Acked-by: Neil Horman >