From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 751D3A04DE for ; Fri, 23 Oct 2020 12:54:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ED222A953; Fri, 23 Oct 2020 12:54:27 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 0A242A949 for ; Fri, 23 Oct 2020 12:54:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603450464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HasmUvtnD1XdSWmuFkYcJED9SdQEtCPk/OUTM0k6Ttk=; b=FqOBzTHvJIShiP1rgLWK/fHwbALPqCrlBKFhoCeINs3CxneBDRwOysonRjKyp2WOWoexuX CWfWXe8H5tnRDNurIKC4N2d5CkMB65F3osBuwL2jL2aLjzDbtoQbWOo/wpG0/knP5WxWXj 7hXRNUPDDVl9oUWuihHjd/YzJUwqNLU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-550-EsrEfd3oOrC9CuQP6iTAag-1; Fri, 23 Oct 2020 06:54:18 -0400 X-MC-Unique: EsrEfd3oOrC9CuQP6iTAag-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 426A81009E28; Fri, 23 Oct 2020 10:54:16 +0000 (UTC) Received: from [10.36.110.30] (unknown [10.36.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AC8CF6EF41; Fri, 23 Oct 2020 10:54:14 +0000 (UTC) To: David Christensen , dev@dpdk.org, chenbo.xia@intel.com, zhihong.wang@intel.com Cc: stable@dpdk.org References: <20201006212316.409587-1-drc@linux.vnet.ibm.com> <20201015174937.127234-1-drc@linux.vnet.ibm.com> From: Maxime Coquelin Message-ID: Date: Fri, 23 Oct 2020 12:54:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201015174937.127234-1-drc@linux.vnet.ibm.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH v3] net/vhost: fix xstats wrong after clearing stats X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" On 10/15/20 7:49 PM, David Christensen wrote: > The PMD API allows stats and xstats values to be cleared separately. > This is a problem for the vhost PMD since some of the xstats values are > derived from existing stats values. For example: > > testpmd> show port xstats all > ... > tx_unicast_packets: 17562959 > ... > testpmd> clear port stats all > ... > show port xstats all > ... > tx_unicast_packets: 18446744073709551615 > ... > > Modify the driver so that stats and xstats values are stored, updated, > and cleared separately. > > Fixes: 4d6cf2ac93dc ("net/vhost: add extended statistics") > Cc: stable@dpdk.org > > Signed-off-by: David Christensen > --- > v3: > * Modified comment that unicast packets include unsent packets > * Change Cc: to stable@dpdk.org > v2: > * Removed newly unused vq loops > * Added "fixes" message > * Renamed vhost_count_multicast_broadcast to vhost_count_xcast_packets > > drivers/net/vhost/rte_eth_vhost.c | 76 +++++++++++++++---------------- > 1 file changed, 38 insertions(+), 38 deletions(-) > Reviewed-by: Maxime Coquelin Thanks, Maxime