From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Rastislav_=C4=8Cernay?= Subject: Re: [PATCH v3] net/nfb: new netcope driver Date: Mon, 4 Mar 2019 16:15:40 +0100 Message-ID: References: <1551185824-5501-2-git-send-email-cernay@netcope.com> <1551451054-111249-1-git-send-email-cernay@netcope.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: dev , "Yigit, Ferruh" To: David Marchand Return-path: Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by dpdk.org (Postfix) with ESMTP id E7CEB4C88 for ; Mon, 4 Mar 2019 14:13:08 +0100 (CET) Received: by mail-lj1-f174.google.com with SMTP id z20so4260984ljj.10 for ; Mon, 04 Mar 2019 05:13:08 -0800 (PST) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" >>>How about looping on min(nb_tx, RTE_ETHDEV_QUEUE_STAT_CNTRS) ? This would lead to incomplete tx_total (and other total) stats. Maybe I could just add commentary, why it is written like this and leave it be? On Mon, Mar 4, 2019 at 1:48 PM David Marchand wrote: > On Mon, Mar 4, 2019 at 1:35 PM David Marchand > wrote: > >> >> >> On Mon, Mar 4, 2019 at 1:30 PM Rastislav =C4=8Cernay >> wrote: >> >>> >>> What is the point of adding when i >=3D RTE_ETHDEV_QUEUE_STAT_CNTRS= ? >>> >>> struct rte_eth_stats { >>> ... >>> uint64_t q_opackets[RTE_ETHDEV_QUEUE_STAT_CNTRS] >>> ... >>> } >>> >>> As there can be more queues (nb_tx) then RTE_ETHDEV_QUEUE_STAT_CNTRS >>> (16) and struct rte_eth_stats eth_stats is allocated statically, >>> there is need to check so it does not write garbage somewhere. >>> >> >> How about looping on min(nb_tx, RTE_ETHDEV_QUEUE_STAT_CNTRS) ? >> > > Or add the tx_queue[i].tx_xxx; to the associated global stats and only > fills q_xxx depending on the check. > > > -- > David Marchand >