From patchwork Thu Mar 24 12:46:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 108838 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 8FF98A04FF; Thu, 24 Mar 2022 13:46:47 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 661B94281F; Thu, 24 Mar 2022 13:46:47 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 31C04410FC for ; Thu, 24 Mar 2022 13:46:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648126005; 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; bh=Db7R6170c1sAN5aoMZiYsNri/NMJevyKeQ61AP9sysc=; b=W6ix4H4LSqsIMDe1LA+8AJUfSF9vqpuCxnoXp91FFx/UXS6bM+dWhqWRMNHKB+D+giD3SJ yu3NJLQV390Nn75guyQm1/wwCz28N+XTH1Z/RsJ9zalCPb4pJbyH+yH0P9lvZjbSZVGkvj iHiHjhgcjwNk7f676S04c2s7ja8jJ0Q= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-61-R0iLpXSXM3CeRLxUpe2KlA-1; Thu, 24 Mar 2022 08:46:44 -0400 X-MC-Unique: R0iLpXSXM3CeRLxUpe2KlA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0DD543811F34; Thu, 24 Mar 2022 12:46:44 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 088CA400F728; Thu, 24 Mar 2022 12:46:42 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, chenbo.xia@intel.com, david.marchand@redhat.com, i.maximets@ovn.org Cc: Maxime Coquelin Subject: [PATCH v2 0/5] vhost: introduce per-virtqueue stats API Date: Thu, 24 Mar 2022 13:46:33 +0100 Message-Id: <20220324124638.32672-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 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 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 This series introduces a new Vhost API that provides per-virtqueue statistics to the application. It will be generally useful, but initial motivation for this series was to be able to get to get virtqueues stats when Virtio RSS feature will be supported in Vhost library. First patch is a fix that should be considered even if the series does not make it in v22.03. Second patch introduces the new API and generic statistics. Patch 3 makes use of this API in Vhost PMD. The two last patches introduce more specific counters (syscalls in DP, IOTLB cache hits and misses). I understand we are late in the v22.03 release cycle, and so the series may be postponned to next release even though it does not introduces much risks of regressions. At least patch 1 has to be considered for this release. Changes in v2: ============= - Rebased on top of v22.03 - Add documentation Maxime Coquelin (5): vhost: fix missing virtqueue lock protection vhost: add per-virtqueue statistics support net/vhost: move to Vhost library stats API vhost: add statistics for guest notifications vhost: add statistics for IOTLB doc/guides/prog_guide/vhost_lib.rst | 24 ++ drivers/net/vhost/rte_eth_vhost.c | 348 ++++++++++------------------ lib/vhost/rte_vhost.h | 99 ++++++++ lib/vhost/socket.c | 4 +- lib/vhost/version.map | 5 + lib/vhost/vhost.c | 124 +++++++++- lib/vhost/vhost.h | 26 ++- lib/vhost/virtio_net.c | 53 +++++ 8 files changed, 450 insertions(+), 233 deletions(-)