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 D8BB2A050E; Wed, 27 Apr 2022 00:45:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 310AD41109; Wed, 27 Apr 2022 00:45:29 +0200 (CEST) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id 646DD40E78 for ; Wed, 27 Apr 2022 00:45:28 +0200 (CEST) Received: by mail-pj1-f46.google.com with SMTP id w5-20020a17090aaf8500b001d74c754128so3487005pjq.0 for ; Tue, 26 Apr 2022 15:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DakM9elF0trxJmG9vE9hc79/0bNmfThBzIAjHL9UNjs=; b=R47WjPTOJtsNG4wHNbg2LWF8I4Hq+eN3Hrqf6kJ5Lh3Ub0mwQMSUX+R/Bd48bAsXWN lS1GMgEx/Z74GYt1GK8AflovvcqU3C5fPDPQhMo+3Jk4PfijdJZUeoobDhRspn2LLbsf CE5VR0esekaRV//Gi2i0koGKJPS3bmbiSUJsG3vDg86yIwN6XJnQwNUUJ9VmDfEhhi7H wHlmwbIVB2BA4l6c6V0Ud8su/GoZH4FpUrVxea42ledCZvm7Q3jeaIT7ZBcsXtXGoudx SumcnaP/u03DESXyBjhBST1cME4j5oiHpTw1QnU9xoMQufIwRRrdsHf/B3P2zoCaSpuT fqeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DakM9elF0trxJmG9vE9hc79/0bNmfThBzIAjHL9UNjs=; b=MpX1sAaVkd62nm1GGpOitoybMWfwAgF7F0jRiAy3O7DlKAX16+yYOPPeaNgm+mY/82 SeZkcah2aK3lbbA2K7T55XvMhNVaOTeHBOKyayuga2CwaDibXgZTarCJDn6ylTRSQU8d uZMfW7XK6edvZEsbxj542gBJCzkhGyOUsdlptmFGQnZmJmoX1pDhS/5ZaUgpOwF9YR6N RsSSnW5amJzXF+Dxvdh1/9a3OFhcUplBwqYhlnuDJJMQ9aMHk/z7OxAxpi79W7mUh+jz ZgxNSGml7DEG6LU1eC/35KZFX7e4QrkWIe19FV3KCteRqU69znA2nvqd6UEjWuJH57MX AYVA== X-Gm-Message-State: AOAM5300vNYhbfLAEMvTftP4fgMETxEXktq5845irEcK844QVZ8tHnSX GVwbyVDzH7UZrqqLD752/u+TVw== X-Google-Smtp-Source: ABdhPJzIAZ9WF17ZAfm+EuVEoc+UQJGmUwMV5yBWsR+2nZW9aDkU4mXrtLGjG/Mwi8BEFc5LMfeBQQ== X-Received: by 2002:a17:90b:3805:b0:1d9:46cb:549b with SMTP id mq5-20020a17090b380500b001d946cb549bmr19763825pjb.19.1651013127445; Tue, 26 Apr 2022 15:45:27 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id s4-20020a634504000000b003ab71e53956sm5257807pga.61.2022.04.26.15.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 15:45:26 -0700 (PDT) Date: Tue, 26 Apr 2022 15:45:24 -0700 From: Stephen Hemminger To: Ferruh Yigit Cc: , , Stephen Hemminger , Long Li , Subject: Re: [Patch v2] net/netvsc: report correct stats values Message-ID: <20220426154524.49502217@hermes.local> In-Reply-To: <7f51e773-6ded-b736-fb02-5e3b391353b9@xilinx.com> References: <1648143948-17821-1-git-send-email-longli@linuxonhyperv.com> <7f51e773-6ded-b736-fb02-5e3b391353b9@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Tue, 26 Apr 2022 22:56:14 +0100 Ferruh Yigit wrote: > > if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) { > > - stats->q_opackets[i] = txq->stats.packets; > > - stats->q_obytes[i] = txq->stats.bytes; > > + stats->q_opackets[i] += txq->stats.packets; > > + stats->q_obytes[i] += txq->stats.bytes; > > This is per queue stats, 'stats->q_opackets[i]', in next iteration of > the loop, 'i' will be increased and 'txq' will be updated, so as far as > I can see the above change has no affect. Agree, that is why it was just assignment originally.