From patchwork Thu Jun 16 09:36:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ding, Xuan" X-Patchwork-Id: 112881 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C1D69A00BE; Thu, 16 Jun 2022 11:39:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ADBE74281E; Thu, 16 Jun 2022 11:39:31 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 16FE24003C; Thu, 16 Jun 2022 11:39:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655372370; x=1686908370; h=from:to:cc:subject:date:message-id; bh=Lcx4uSRhJ2Fo2pvmt2f72f/w0l05ERmOfHeKU95WYjM=; b=e0Vz3AMeAS3qIKnoBlLaQMy4XUn6sbh8bUwUVzCO29eWXsbTCE658irL h2U6GsYBe8A7R9nI+UK3+cswccbbrrAsdxhoaGvdlgBBq3LPgLLDsvoZy 6TCiWqc8uaJDw5nkr/RCkvJ0L27znqa4HCcNbpDZjPqMedsIXxRhJjqEu d2cTpuZ71TwP6zNito59/nzs7qwSnxkbLJ9ixABJ9e3MRy20NvQSpWODB LPGW3g9A4rROPhiKDLlV8GFV3KwraSRFipOAWbX0SimuXxMJj6a4GDfBo zGAnUlHtkrGnPjhiRU+Dxb1wdP989OV7NmU1n5aff9eNeFH3exXNJLR/G A==; X-IronPort-AV: E=McAfee;i="6400,9594,10379"; a="340865518" X-IronPort-AV: E=Sophos;i="5.91,304,1647327600"; d="scan'208";a="340865518" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2022 02:39:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,304,1647327600"; d="scan'208";a="641464228" Received: from npg-dpdk-xuan-cbdma.sh.intel.com ([10.67.110.228]) by fmsmga008.fm.intel.com with ESMTP; 16 Jun 2022 02:39:19 -0700 From: xuan.ding@intel.com To: maxime.coquelin@redhat.com, chenbo.xia@intel.com Cc: dev@dpdk.org, jiayu.hu@intel.com, wenwux.ma@intel.com, Xuan Ding , stable@dpdk.org Subject: [PATCH] vhost: fix missing statistics update Date: Thu, 16 Jun 2022 09:36:09 +0000 Message-Id: <20220616093609.106130-1-xuan.ding@intel.com> X-Mailer: git-send-email 2.17.1 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 From: Xuan Ding This patch adds missing per-virtqueue statistics in async dequeue path. Fixes: 84d5204310d7("vhost: support async dequeue for split ring") Cc: stable@dpdk.org Signed-off-by: Xuan Ding --- lib/vhost/virtio_net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index 68a26eb17d..a5e510c51e 100644 --- a/lib/vhost/virtio_net.c +++ b/lib/vhost/virtio_net.c @@ -3538,6 +3538,7 @@ rte_vhost_async_try_dequeue_burst(int vid, uint16_t queue_id, * learning table will get updated first. */ pkts[0] = rarp_mbuf; + vhost_queue_stats_update(dev, vq, pkts, 1); pkts++; count -= 1; } @@ -3562,6 +3563,7 @@ rte_vhost_async_try_dequeue_burst(int vid, uint16_t queue_id, count, dma_id, vchan_id); *nr_inflight = vq->async->pkts_inflight_n; + vhost_queue_stats_update(dev, vq, pkts, count); out: if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))