From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 14777A0032; Sat, 26 Nov 2022 04:16:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A5E0F40156; Sat, 26 Nov 2022 04:16:12 +0100 (CET) Received: from mail-ua1-f49.google.com (mail-ua1-f49.google.com [209.85.222.49]) by mails.dpdk.org (Postfix) with ESMTP id 0CAD940150 for ; Sat, 26 Nov 2022 04:16:12 +0100 (CET) Received: by mail-ua1-f49.google.com with SMTP id a19so2118165uan.2 for ; Fri, 25 Nov 2022 19:16:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kvCoemgKCHhmqgRAyz+4W2fRKlbUjbXzN1gYrOx0cg4=; b=bpoDNcG35mK4RWXK/CGQ//+x5UDxd0E/sLIhk0uFRs5bAIGWPlPoGEvl+Err9EcMER aVdAD/XZ8udYN/fdqVkyeHvgqYys9vYfw0J7xn+wMu6YHMWOO4p8rkZQ2HqHbtWsA1YD wf4L2MxgcB6PXCGOD+TH2eERm4THSe+VFx1YVWluPPy+suer728pPvi1rIDCjat/PGdw r4UMYdIm9xGmtYHuSIc2OHv0I4r3HztXPqYWYpJ2BYEzeq0P2Ct/WAnkNV1CADZF8FxP 7No5PadFUY2Mae8DpxKaqCdCz0uFZTkJYHY+f2CfCX1P3M1QFXASsquf0lSEE/AutRk+ /2TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kvCoemgKCHhmqgRAyz+4W2fRKlbUjbXzN1gYrOx0cg4=; b=YWP9qmvnM4REeQr0AzxNk6/qwmGvuVl4X44bAy4t/sgXxZeOMShSiw4aIakGZsEZmp JecTRucTY30qSBhoqtbIQMoPDx3HfQAT94FppKcPyXPHkynqYgWEXG+DMh5nfBBqTtS6 o5Cl98Cv34PmfenKthzOddvWxicEHsq6uVBLNYvgZEjThB2veumM4RrdjLuPwy8i3oNk vjw0sKqPg4ICI32E/jddCs6W74eKPiqIyx9aR3KyaDtrtaw961sLc5xIVjRQchJ4W2Wr 9nWcfT5iodgiz+ca/2cPbAoUnJRB1mKbQOQYawNKipGcS34gJ+RpsFK/1DxiPY00AYnc yHSw== X-Gm-Message-State: ANoB5pltbdDyRkabhAxVGjUY6svTWNXIIbjPGlz8DoiUDYPCT5+Ke42A 1DqWpqsQT4xJMugQ/nYnzzmnXUe9+Ko3Og0BWoGwuQ== X-Google-Smtp-Source: AA0mqf6gUb1SXlaichLVJzQ16sYDJGErvGu8Vhb+9X0ZgaxWXoSZuEhza3gmxE12BkkFZgHhK6xR6NcnijYyJ+bdnOs= X-Received: by 2002:ab0:3143:0:b0:418:b1e1:5633 with SMTP id e3-20020ab03143000000b00418b1e15633mr22407496uam.39.1669432571269; Fri, 25 Nov 2022 19:16:11 -0800 (PST) MIME-Version: 1.0 References: <20221124073335.3985214-1-junfeng.guo@intel.com> <20221124085926.46430390@hermes.local> <12af66b4-0715-a0f0-a401-664632189e80@amd.com> In-Reply-To: <12af66b4-0715-a0f0-a401-664632189e80@amd.com> From: Rushil Gupta Date: Fri, 25 Nov 2022 19:16:00 -0800 Message-ID: Subject: Re: [PATCH] net/gve: add support for basic stats To: Ferruh Yigit Cc: Stephen Hemminger , Junfeng Guo , qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, dev@dpdk.org, jeroendb@google.com, jrkim@google.com, Xiaoyun Li Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Makes sense. On Thu, Nov 24, 2022 at 9:26 AM Ferruh Yigit wrote: > > On 11/24/2022 4:59 PM, Stephen Hemminger wrote: > > On Thu, 24 Nov 2022 15:33:35 +0800 > > Junfeng Guo wrote: > > > >> +static int > >> +gve_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) > >> +{ > >> + uint16_t i; > >> + > >> + for (i = 0; i < dev->data->nb_tx_queues; i++) { > >> + struct gve_tx_queue *txq = dev->data->tx_queues[i]; > >> + if (txq == NULL) > >> + continue; > >> + > >> + stats->opackets += txq->packets; > >> + stats->obytes += txq->bytes; > >> + stats->oerrors += txq->errors; > >> + } > >> + > >> + for (i = 0; i < dev->data->nb_rx_queues; i++) { > >> + struct gve_rx_queue *rxq = dev->data->rx_queues[i]; > >> + if (rxq == NULL) > >> + continue; > >> + > >> + stats->ipackets += rxq->packets; > >> + stats->ibytes += rxq->bytes; > >> + stats->ierrors += rxq->errors; > >> + stats->rx_nombuf += rxq->no_mbufs; > >> + } > >> + > >> + return 0; > >> +} > >> + > > > > The driver should be filling in the per-queue stats as well. > > q_ipackets, q_opackets, q_ibytes, q_obytes, q_errors > > > Hi Stephen, > > Queue stats moved to xstats, and there is a long term goal to move all > queue stats from basic stats to xstats for all PMDs, and remove interim > 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' flag. > > That is why request to new PMDs is to not introduce queue stats in basic > stats, but in xstats.