DPDK patches and discussions
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: Konstantin Ananyev <konstantin.ananyev@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] librte_acl make it build/work for 'default' target
Date: Wed, 6 Aug 2014 14:55:24 -0400	[thread overview]
Message-ID: <20140806185524.GB23133@hmsreliant.think-freely.org> (raw)
In-Reply-To: <1407347625-24646-1-git-send-email-konstantin.ananyev@intel.com>

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.

Neil

  reply	other threads:[~2014-08-06 18:53 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 [this message]
2014-08-07 16:13   ` Ananyev, Konstantin

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=20140806185524.GB23133@hmsreliant.think-freely.org \
    --to=nhorman@tuxdriver.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.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).