X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=blobdiff_plain;f=lib%2Flibrte_acl%2Facl_gen.c;h=b1f766bb301c5bc55a43404b294782536d8aaf00;hp=f65e39786abeb9af280ec88ca91170f2ee6848a6;hb=fdf20fa7bee9df9037116318a87080e1eb7e757e;hpb=be04c7072745e0471fc185c31c2a2df835ee4e06 diff --git a/lib/librte_acl/acl_gen.c b/lib/librte_acl/acl_gen.c index f65e39786a..b1f766bb30 100644 --- a/lib/librte_acl/acl_gen.c +++ b/lib/librte_acl/acl_gen.c @@ -415,12 +415,12 @@ rte_acl_gen(struct rte_acl_ctx *ctx, struct rte_acl_trie *trie, node_bld_trie, num_tries, match_num); /* Allocate runtime memory (align to cache boundary) */ - total_size = RTE_ALIGN(data_index_sz, CACHE_LINE_SIZE) + + total_size = RTE_ALIGN(data_index_sz, RTE_CACHE_LINE_SIZE) + indices.match_index * sizeof(uint64_t) + (match_num + 2) * sizeof(struct rte_acl_match_results) + XMM_SIZE; - mem = rte_zmalloc_socket(ctx->name, total_size, CACHE_LINE_SIZE, + mem = rte_zmalloc_socket(ctx->name, total_size, RTE_CACHE_LINE_SIZE, ctx->socket_id); if (mem == NULL) { RTE_LOG(ERR, ACL, @@ -432,7 +432,7 @@ rte_acl_gen(struct rte_acl_ctx *ctx, struct rte_acl_trie *trie, /* Fill the runtime structure */ match_index = indices.match_index; node_array = (uint64_t *)((uintptr_t)mem + - RTE_ALIGN(data_index_sz, CACHE_LINE_SIZE)); + RTE_ALIGN(data_index_sz, RTE_CACHE_LINE_SIZE)); /* * Setup the NOMATCH node (a SINGLE at the