From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH v2] ethdev: check number of queues less than RTE_ETHDEV_QUEUE_STAT_CNTRS Date: Mon, 5 Dec 2016 13:53:54 +0100 Message-ID: <20161205135354.4aaa789b@platinum> References: <1479722378-23959-1-git-send-email-alejandro.lucero@netronome.com> <1480006746.31853.14.camel@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Bert van Leeuwen , thomas.monjalon@6wind.com To: Alejandro Lucero , dev@dpdk.org Return-path: Received: from mail-wj0-f178.google.com (mail-wj0-f178.google.com [209.85.210.178]) by dpdk.org (Postfix) with ESMTP id 2C7D52C07 for ; Mon, 5 Dec 2016 13:53:57 +0100 (CET) Received: by mail-wj0-f178.google.com with SMTP id tg4so34024989wjb.1 for ; Mon, 05 Dec 2016 04:53:57 -0800 (PST) In-Reply-To: <1480006746.31853.14.camel@6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 24 Nov 2016 17:59:06 +0100, Olivier Matz wrote: > Hi, > > On Mon, 2016-11-21 at 09:59 +0000, Alejandro Lucero wrote: > > From: Bert van Leeuwen > > > > Arrays inside rte_eth_stats have size=RTE_ETHDEV_QUEUE_STAT_CNTRS. > > Some devices report more queues than that and this code blindly uses > > the reported number of queues by the device to fill those arrays up. > > This patch fixes the problem using MIN between the reported number > > of queues and RTE_ETHDEV_QUEUE_STAT_CNTRS. > > > > Signed-off-by: Alejandro Lucero > > > > Reviewed-by: Olivier Matz Fixes: ce757f5c9a4d ("ethdev: new method to retrieve extended statistics")