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 30821A050E for ; 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 113F240691; Wed, 27 Apr 2022 00:45:29 +0200 (CEST) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id 5A88F40691 for ; Wed, 27 Apr 2022 00:45:28 +0200 (CEST) Received: by mail-pj1-f53.google.com with SMTP id d23-20020a17090a115700b001d2bde6c234so2636956pje.1 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=DEDuVydUzcCgCNyHczX7/yzd0KFcZOAjQCUlRwyI4fA8RoIYH84Xu2MOUET3LYaoqf foY77zL4vNpKGBiZNTGbHTKIQlDndmcC4bgNIv7pMRtM1NuiPw6+tX/o+RDvciKhlF2n /+MuZaP9IczDCOaWPQRXg3TncMnd25ZvFvre4vNL7g0KTA+4OLupCBozdH87klHlXgjK btjNbKJ1cqttuA1ttax/sS56LAA/u9Aej1FdQX8wIZwuxJkXqPRBrVxyzPseggzgmRh9 wzvWAH5piF5IhqUHiI8s9NMfxGhXEbAxDcpZHb8ydWk1HtRjOisPpTxtXV/XWiVutPkY JMKA== X-Gm-Message-State: AOAM530Dqe8tRKPmK3MwZEHIDYHYkODFGK9vhwrNPA3V8/8e+v48sdpD TFyHUrlm+/fGbAoogWfzS5NqzQ== 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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.