From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
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 <dev@dpdk.org>; Tue,  2 Jun 2015 22:57:30 +0200 (CEST)
Received: by wgez8 with SMTP id z8so150127747wge.0
 for <dev@dpdk.org>; Tue, 02 Jun 2015 13:57:30 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:organization
 :user-agent:in-reply-to:references:mime-version
 :content-transfer-encoding:content-type;
 bh=d7PMoYj15G/mI5w2XlIfoXToJ+Y5i9kXA5h/tZbdXK0=;
 b=H4i78oR26VZsTJiGePiOp2O4uqE2rT4Beh8phznceL81SGjLbqxASowrNyh8o0HQ4J
 QCFnpprpgSlc2cC+wARW+Tzxp2p9dFxUX0NqgV2fYUTUe2MxSHOMkrcy015Pc3AdysMB
 NxWd4T+0jGVDMSVby0/B1JurjjA1Tx66ktm5rLlhCy/nQKBOkxZCEqC0/DOTVlDVAoYR
 CrhDqapOAD43W2Jvq8dyfSptkgTxdpMVgJ1khtb9mIyIuESqHEEmwAcJOxEayb+BWS4N
 cOhxFHYOFX4t8+bxCCAcQq3JT3Jwqi4OJfRWcMC+BVqlQpjvQKiCxiRqXNZI09fI2iHn
 UP+A==
X-Gm-Message-State: ALoCoQlX8xdd7qVn+eptgwzh91r4D2zdQ4+s5hJq8OC3rt6ynXkNS1nUYaQ/0Y+epJ+xcUk7goMm
X-Received: by 10.194.61.180 with SMTP id q20mr52506549wjr.80.1433278650220;
 Tue, 02 Jun 2015 13:57:30 -0700 (PDT)
Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136])
 by mx.google.com with ESMTPSA id fs9sm28591674wjc.34.2015.06.02.13.57.28
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 02 Jun 2015 13:57:29 -0700 (PDT)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Tue, 02 Jun 2015 22:56:40 +0200
Message-ID: <9555737.ZoAvHCuAuV@xps13>
Organization: 6WIND
User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; )
In-Reply-To: <1432316931-18406-4-git-send-email-konstantin.ananyev@intel.com>
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-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 3/3] ACL: remove subtree_id calculations at
	build stage
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Jun 2015 20:57:30 -0000

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 <konstantin.ananyev@intel.com>

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++) {