From patchwork Thu Jun 16 09:44:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ding, Xuan" X-Patchwork-Id: 112882 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 1E6ADA00BE; Thu, 16 Jun 2022 11:47:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 056C94281E; Thu, 16 Jun 2022 11:47:40 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 5B6414003C for ; Thu, 16 Jun 2022 11:47:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655372858; x=1686908858; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=a9huVJfvM3a1XyH8aIjlm0nc1k+EqxtP7NqK05gjeOE=; b=Eg8MWNM1QeXHF+2kTwWieQ5F7CqwGsAPfVfV0AqPiaPIgw+wAE04ZnvN Xf2HlGbB9nvDs9bv4kotx1PH1OQGrMP+UKZyk2dliCc4e23T+xwxzbAZs 6nN/stZDuhmgGM9mTX2BBaubtL9qCtEu46X622Jb5oik3pmr5LCys4tay d14xp448iS4b3YAimAgpFbnOe3MUloFWwYXcpzEgsixCF/HRCjIBpL/1q Wsh8zGYB09m8dSbXIlTexlEzSr0cPZC2Js6GgrwW7N2ptEenwSTSAPG8M rkyN+Ct7Vfm3SvH9V8fEpGJtuy2yja2QvjUz962PibyHAeYOZ4en4ctmj g==; X-IronPort-AV: E=McAfee;i="6400,9594,10379"; a="276786985" X-IronPort-AV: E=Sophos;i="5.91,304,1647327600"; d="scan'208";a="276786985" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2022 02:47:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,304,1647327600"; d="scan'208";a="674952049" Received: from npg-dpdk-xuan-cbdma.sh.intel.com ([10.67.110.228]) by FMSMGA003.fm.intel.com with ESMTP; 16 Jun 2022 02:47:35 -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 Subject: [PATCH v2] vhost: fix missing statistics update Date: Thu, 16 Jun 2022 09:44:32 +0000 Message-Id: <20220616094432.108148-1-xuan.ding@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220616093609.106130-1-xuan.ding@intel.com> References: <20220616093609.106130-1-xuan.ding@intel.com> 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") Signed-off-by: Xuan Ding Tested-by: Wei Ling Reviewed-by: David Marchand --- v2: * Since this issue was introduced and fixed in same release, no need to add cc stable. --- 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))