From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <nhorman@tuxdriver.com>
Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58])
 by dpdk.org (Postfix) with ESMTP id AA6E5A493
 for <dev@dpdk.org>; Thu, 25 Jan 2018 22:31:01 +0100 (CET)
Received: from [62.209.224.147] (helo=localhost)
 by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63)
 (envelope-from <nhorman@tuxdriver.com>)
 id 1eep6f-0005Sx-Op; Thu, 25 Jan 2018 16:30:59 -0500
Date: Thu, 25 Jan 2018 16:30:40 -0500
From: Neil Horman <nhorman@tuxdriver.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Message-ID: <20180125213040.GB12245@neilslaptop.think-freely.org>
References: <20180125111225.231897-1-bruce.richardson@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20180125111225.231897-1-bruce.richardson@intel.com>
User-Agent: Mutt/1.9.1 (2017-09-22)
X-Spam-Score: -2.9 (--)
X-Spam-Status: No
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 <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Jan 2018 21:31:01 -0000

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 <bruce.richardson@intel.com>
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 <nhorman@tuxdriver.com>