From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Horman Subject: Re: [PATCH v3 05/18] librte_acl: fix a bug at build phase that can cause matches beeing overwirtten. Date: Mon, 26 Jan 2015 07:08:15 -0500 Message-ID: <20150126120815.GA31293@hmsreliant.think-freely.org> References: <1421779267-18492-1-git-send-email-konstantin.ananyev@intel.com> <1421779267-18492-6-git-send-email-konstantin.ananyev@intel.com> <20150125173441.GA19101@localhost.localdomain> <2601191342CEEE43887BDE71AB977258213DF62F@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev-VfR2kkLFssw@public.gmane.org" To: "Ananyev, Konstantin" Return-path: Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB977258213DF62F-pww93C2UFcwu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On Sun, Jan 25, 2015 at 10:40:23PM +0000, Ananyev, Konstantin wrote: > Hi Neil, > > > -----Original Message----- > > From: Neil Horman [mailto:nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org] > > Sent: Sunday, January 25, 2015 5:35 PM > > To: Ananyev, Konstantin > > Cc: dev-VfR2kkLFssw@public.gmane.org > > Subject: Re: [dpdk-dev] [PATCH v3 05/18] librte_acl: fix a bug at build phase that can cause matches beeing overwirtten. > > > > 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. > > In that patch, I just fix the bug to stop generate invalid tries for some corener cases. > In the later patch in that set, I did something similar to what you are suggesting here - > make rte_acl_gen() to allocate indexes for all match nodes too (as it already doing for all other nodes). > See [PATCH v3 07/18] librte_acl: build/gen phase - simplify the way match nodes are allocated. > Ok, thank you Neil > Konstantin > > > Neil > >