From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <cernay@netcope.com>
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 <dev@dpdk.org>; Mon,  4 Mar 2019 14:13:08 +0100 (CET)
Received: by mail-lj1-f174.google.com with SMTP id z20so4260984ljj.10
 for <dev@dpdk.org>; Mon, 04 Mar 2019 05:13:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netcope.com; s=google;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=9YjMbI6Km58/pB09d1Mz7LSsUvSbmgYz6mjdbkfe2IM=;
 b=G5CmaWH6u9Ud3SC4rC7pPuf7cMVtOC5J8DDhtygo3mEidJb4OQ9wz6CbCPKlw5QfMv
 CFgfIViUZ/Ryb+OldlBAOe3C7dWZlQNSRUVN2xNrDu/C7DIRvvhRmCUcwzfJvCTIMRGa
 DiHWQ9RxQqIqMjnIxT/rIzIDHHX//fWD+luV37sfYq+G6Sr2sG6gc6cme4LUj7kfY4AK
 sVREFOR8kbqF0P2obyxqvQOzO4XGmp9ymtb7ABWPYbG8qE9+mEJQaY1TCWDN3LCaJ1/r
 8c4lYbYO709IXeFEgKuokGy+A1GaEXfGyEP6UBIQv6E+Trcooo7Im1BMrKzbCwp6pFaz
 JqhQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=9YjMbI6Km58/pB09d1Mz7LSsUvSbmgYz6mjdbkfe2IM=;
 b=LfniFavhEuI8oN0/mqSKo5TCKkKYWGQ0nX/aTvmSbJCFlieLJIJ/dS218b4Tehf2bT
 BqnIUoCkvXzsaJL9X/5xpgeGWbFAjWgQhIsQemOMPZcImIs6gZIWVzzFodSXMx6WfGaL
 txxGbhW7Ey9wQJxvqBnIebqxAKuXOO3UjfhgTjpZDHrV/cNziJYZOuNNhLxy/o/tMpaX
 PTkv0jS+4rAQtwTTiAWbvtlD8UyGgUTXzGi3DhlukMmM6s3aMpBGNcs3RyPVaLWfH145
 ke0KZqzjV78fNGf8jGa0is6ANYxMUXxTqiUyzDO/TmA2itgimOm6Ip4z5cJwZkPHcrkm
 il0g==
X-Gm-Message-State: APjAAAX8sgbBKtDu2mUQbdExJPHDNZMeq9MhJTNKW0jXFzdnWHd1krfw
 KVwI5GMIFoWtE7DWHPHlYx09NEkCatfdcezmg8c3vQ==
X-Google-Smtp-Source: APXvYqygLMYYXU85jjn3G84IWE2gRg9LCmipTbPMH6wkn3uBovdcF3qSn/Tn/581K9lDFHjhDtd0F7UDta7AW5h/Uxo=
X-Received: by 2002:a2e:124e:: with SMTP id t75mr10788318lje.23.1551705188296; 
 Mon, 04 Mar 2019 05:13:08 -0800 (PST)
MIME-Version: 1.0
References: <1551185824-5501-2-git-send-email-cernay@netcope.com>
 <1551451054-111249-1-git-send-email-cernay@netcope.com>
 <CAJFAV8yD8dzps6vu7Twp54SvPF9wqd9vgWR9FAzJBhTLdAhWCw@mail.gmail.com>
 <CAGS_BL=z7dHo0fTgaXC0w8rppF9k28kYmSQLDuAMVMK99nZw1A@mail.gmail.com>
 <CAJFAV8xrMgTj1BrJO9QPQ3xwJUcsR91q0vPktJNpJVkV1=ULHg@mail.gmail.com>
 <CAJFAV8yDxNqFbdk+NaS42VXvrAJorSJm2mm4OVtC3j2Oe5Ka=Q@mail.gmail.com>
In-Reply-To: <CAJFAV8yDxNqFbdk+NaS42VXvrAJorSJm2mm4OVtC3j2Oe5Ka=Q@mail.gmail.com>
From: =?UTF-8?Q?Rastislav_=C4=8Cernay?= <cernay@netcope.com>
Date: Mon, 4 Mar 2019 16:15:40 +0100
Message-ID: <CAGS_BLmef8Sb6XspxQDvu95Odk=+yHXELyfaQeg8pE6JvVAHMg@mail.gmail.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, "Yigit, Ferruh" <ferruh.yigit@intel.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.15
Subject: Re: [dpdk-dev] [PATCH v3] net/nfb: new netcope driver
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Mar 2019 13:13:09 -0000

>>>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 <david.marchand@redhat.com>
wrote:

> On Mon, Mar 4, 2019 at 1:35 PM David Marchand <david.marchand@redhat.com>
> wrote:
>
>>
>>
>> On Mon, Mar 4, 2019 at 1:30 PM Rastislav =C4=8Cernay <cernay@netcope.com=
>
>> 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
>