[dpdk-dev] [PATCH] pmdinfogen: allow using stdin and stdout

Thomas Monjalon thomas at monjalon.net
Mon Jan 29 20:49:39 CET 2018


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 <bruce.richardson at 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 at tuxdriver.com>

Applied, thanks



More information about the dev mailing list