[dpdk-dev] [PATCHv5] librte_acl make it build/work for 'default' target
Neil Horman
nhorman at tuxdriver.com
Tue Sep 2 15:43:00 CEST 2014
On Mon, Sep 01, 2014 at 04:28:44PM +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.
> - keep common code shared between these two codepaths.
>
> v2 chages:
> run-time selection of most appropriate code-path for given ISA.
> By default the highest supprted one is selected.
> User can still override that selection by manually assigning new value to
> the global function pointer rte_acl_default_classify.
> rte_acl_classify() becomes a macro calling whatever rte_acl_default_classify
> points to.
>
> V3 Changes
> Updated classify pointer to be a function so as to better preserve ABI
> REmoved macro definitions for match check functions to make them static inline
>
> V4 Changes
> Rewrote classification selection mechanim to use a function table, so that we
> can just store the preferred alg in the rte_acl_ctx struct so that multiprocess
> access works. I understand that leaves us with an extra load instruction, but I
> think thats ok, because it also allows...
>
> Addition of a new function rte_acl_classify_alg. This function lets you
> specify an enum value to override the acl contexts default algorith when doing a
> classification. This allows an application to specify a classification
> algorithm without needing to pulicize each method. I know there was concern
> over keeping those methods public, but we don't have a static ABI at the moment,
> so this seems to me a reasonable thing to do, as it gives us less of an ABI
> surface to worry about.
>
> Fixed misc missed static declarations
> Removed acl_match_check.h and moved match_check function to acl_run.h
> typdeffed function pointer to match check.
>
> V5 Changes
> Updated examples/l3fwd-acl to comply with latest changes.
> Applied other code review comments (mostly style changes).
>
> Signed-off-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
Acked-by: Neil Horman <nhorman at tuxdriver.com>
Thanks Konstantin!
Neil
More information about the dev
mailing list