From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 3/3] ACL: remove subtree_id calculations at build stage Date: Tue, 02 Jun 2015 22:56:40 +0200 Message-ID: <9555737.ZoAvHCuAuV@xps13> References: <1432316931-18406-1-git-send-email-konstantin.ananyev@intel.com> <1432316931-18406-4-git-send-email-konstantin.ananyev@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Konstantin Ananyev Return-path: Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 4DDCC5693 for ; Tue, 2 Jun 2015 22:57:30 +0200 (CEST) Received: by wgez8 with SMTP id z8so150127747wge.0 for ; Tue, 02 Jun 2015 13:57:30 -0700 (PDT) In-Reply-To: <1432316931-18406-4-git-send-email-konstantin.ananyev@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2015-05-22 18:48, Konstantin Ananyev: > As now subtree_id is not used acl_merge_trie() any more, > there is no point to calculate and maintain that information. > > Signed-off-by: Konstantin Ananyev There is an error with GCC 5.1: lib/librte_acl/acl_bld.c:1324:22: error: array subscript is above array bounds [-Werror=array-bounds] end->mrt->results[m] = rule->f->data.userdata; ^ lib/librte_acl/acl_bld.c:1327:22: error: array subscript is above array bounds [-Werror=array-bounds] end->mrt->results[m] = 0; ^ This kind of patch fixes it: - for (m = 0; m < context->cfg.num_categories; m++) { + for (m = 0; m < RTE_MIN(context->cfg.num_categories, RTE_DIM(end->mrt->results)); m++) {