acl: fix overwritten matches
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Tue, 20 Jan 2015 18:40:54 +0000 (18:40 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 28 Jan 2015 16:11:25 +0000 (17:11 +0100)
There was a bug at build phase that can cause matches beeing overwritten.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
lib/librte_acl/acl_bld.c

index 8bf4a54..22f7934 100644 (file)
@@ -1907,7 +1907,7 @@ rte_acl_build(struct rte_acl_ctx *ctx, const struct rte_acl_config *cfg)
                                bcx.num_tries, bcx.cfg.num_categories,
                                RTE_ACL_MAX_FIELDS * RTE_DIM(bcx.tries) *
                                sizeof(ctx->data_indexes[0]),
-                               bcx.num_build_rules);
+                               bcx.num_build_rules + 1);
                if (rc == 0) {
 
                        /* set data indexes. */