From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-f53.google.com (mail-ua1-f53.google.com [209.85.222.53]) by dpdk.org (Postfix) with ESMTP id 54B324C88 for ; Mon, 4 Mar 2019 13:48:43 +0100 (CET) Received: by mail-ua1-f53.google.com with SMTP id s15so4252574uap.6 for ; Mon, 04 Mar 2019 04:48:43 -0800 (PST) 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=JnOXlVVNQ81M5s5FSXPKnnMksIgtbOw4LlJ3gd/3Axs=; b=s03Oc1ZafCakQY12VnbIyao44oQjQwYGxitifh7/5maUuVejC313PprrlCjyy81ey3 14d0xcZL389fGpO4mHLQyfIoRvYD21MMY8ZATpL42kJmixzIHnajKxD7/k127C4HAl0o SWO81sMCxJ5JIb1zeVmItEzjlkGBUKyESB4lM6JknFlR61RMJdXed0MyPMiZGAtdxYH/ Bw3KtlZkDxUjA2MmLkELJTNfKFdkoOY+HDAKe/T7qhE91O/1uA6Kp3IhmjSKg4pV/arM mQMuM3Pp1I+JWJd31VLzIYVW0TkIhkM7sQAmIdzZFva6lgY5jqI/3AZMykAgI4Y+WhuP uKFg== X-Gm-Message-State: APjAAAU5L+fc7WHMOwYEnr/iFyRV4YHa/g9dHG+1R4dVQ4AMS7uH4mHJ R0MBMrqAXzDc9dCNrJHbOepQg8jBBew58VLf++kzeQ== X-Google-Smtp-Source: APXvYqyMFxdF3SEYm9DoygNlpZfa65gg1EfQHYDJbHARiUEP/nHPEDg5zU2pJr4Ib4qmi9lAEcywg5HWUpdkGLAxIYk= X-Received: by 2002:a67:c986:: with SMTP id y6mr9465421vsk.198.1551703722729; Mon, 04 Mar 2019 04:48:42 -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> In-Reply-To: From: David Marchand Date: Mon, 4 Mar 2019 13:48:31 +0100 Message-ID: To: =?UTF-8?Q?Rastislav_=C4=8Cernay?= Cc: dev , "Yigit, Ferruh" 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Mar 2019 12:48:43 -0000 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. --=20 David Marchand