DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] pmdinfogen: allow using stdin and stdout
Date: Fri, 26 Jan 2018 09:19:18 +0000	[thread overview]
Message-ID: <20180126091917.GA552@bricha3-MOBL3.ger.corp.intel.com> (raw)
In-Reply-To: <20180125213040.GB12245@neilslaptop.think-freely.org>

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

  reply	other threads:[~2018-01-26  9:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25 11:12 Bruce Richardson
2018-01-25 21:30 ` Neil Horman
2018-01-26  9:19   ` Bruce Richardson [this message]
2018-01-29 19:49   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180126091917.GA552@bricha3-MOBL3.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=nhorman@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).