DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] librte_acl make it build/work for 'default' target
Date: Thu, 7 Aug 2014 16:13:44 +0000	[thread overview]
Message-ID: <2601191342CEEE43887BDE71AB97725821352032@IRSMSX105.ger.corp.intel.com> (raw)
In-Reply-To: <20140806185524.GB23133@hmsreliant.think-freely.org>



> -----Original Message-----
> From: Neil Horman [mailto:nhorman@tuxdriver.com]
> Sent: Wednesday, August 06, 2014 7:55 PM
> To: Ananyev, Konstantin
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] librte_acl make it build/work for 'default' target
> 
> On Wed, Aug 06, 2014 at 06:53:45PM +0100, Konstantin Ananyev wrote:
> > Make ACL library to build/work on 'default' architecture:
> > - make rte_acl_classify_scalar really scalar
> >  (make sure it wouldn't use sse4 instrincts through resolve_priority()).
> > - Provide two versions of rte_acl_classify code path:
> >   rte_acl_classify_sse() - could be build and used only on systems with sse4.2
> >   and upper, return -ENOTSUP on lower arch.
> >   rte_acl_classify_scalar() - a slower version, but could be build and used
> >   on all systems.
> > - rte_acl_classify() - becomes just a macro pointing to one of the functions
> >   mentioned abovei (highest avaialbe version at build time).
> > - keep code common for both version code.
> >
> > Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> > ---
> >  lib/librte_acl/acl_bld.c           |   5 +-
> >  lib/librte_acl/acl_match_check.def |  92 +++++
> >  lib/librte_acl/acl_run.c           | 692 ++++---------------------------------
> >  lib/librte_acl/acl_run_sse.h       | 629 +++++++++++++++++++++++++++++++++
> >  lib/librte_acl/rte_acl.h           |  12 +-
> >  5 files changed, 806 insertions(+), 624 deletions(-)
> >  create mode 100644 lib/librte_acl/acl_match_check.def
> >  create mode 100644 lib/librte_acl/acl_run_sse.h
> >
> This is still compile time selected.  You've gone to all the trouble to separate
> the scalar and sse vector paths.  Why not make it run time selectable based on
> cpu testing?  Just because its built for the default machine doesn't mean it
> will run on the default machine.  We may as well take advantage of the faster
> paths when we're able.
> 

Yes, it is possible to make selection at run-time...
Though I suppose it might add some overhead (extra call (or jump), etc.). 
But ok, I'll see what I can do.
Konstantin

      reply	other threads:[~2014-08-07 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 17:53 Konstantin Ananyev
2014-08-06 18:55 ` Neil Horman
2014-08-07 16:13   ` Ananyev, Konstantin [this message]

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=2601191342CEEE43887BDE71AB97725821352032@IRSMSX105.ger.corp.intel.com \
    --to=konstantin.ananyev@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).