From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 2E48B58F3 for ; Sun, 25 Jan 2015 18:34:50 +0100 (CET) Received: from [2001:470:8:a08:215:ff:fecc:4872] (helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1YFR5B-0006XG-O3; Sun, 25 Jan 2015 12:34:47 -0500 Date: Sun, 25 Jan 2015 12:34:41 -0500 From: Neil Horman To: Konstantin Ananyev Message-ID: <20150125173441.GA19101@localhost.localdomain> References: <1421779267-18492-1-git-send-email-konstantin.ananyev@intel.com> <1421779267-18492-6-git-send-email-konstantin.ananyev@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1421779267-18492-6-git-send-email-konstantin.ananyev@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3 05/18] librte_acl: fix a bug at build phase that can cause matches beeing overwirtten. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 17:34:50 -0000 On Tue, Jan 20, 2015 at 06:40:54PM +0000, Konstantin Ananyev wrote: > Signed-off-by: Konstantin Ananyev > --- > lib/librte_acl/acl_bld.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_acl/acl_bld.c b/lib/librte_acl/acl_bld.c > index 8bf4a54..22f7934 100644 > --- a/lib/librte_acl/acl_bld.c > +++ b/lib/librte_acl/acl_bld.c > @@ -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. */ > -- > 1.8.5.3 > > Shouldn't you add to num_build_rules inside rte_acl_gen? That way other future users of the function don't have to remember to do so. Neil