From patchwork Tue May 10 20:17:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 111000 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 6903EA0093; Tue, 10 May 2022 22:17:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77D534281D; Tue, 10 May 2022 22:17:29 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 88646410EE for ; Tue, 10 May 2022 22:17:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652213847; 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=Qbavx+jl+FKqsVb+TlhJt68knE0kd7iLL8Z5IUujP7c=; b=Oic7KOpr/YP8NZpg/3GUohPSpLS5TWN3ORELAGB9jxIJ5wVXWzlC0923SqruEH1lZqrTzD 1vHWAzyeeWfl4rRuAQN91X0S6xuo7gJ2fPf7oOO/0uJ+tKORe+kCOZTR0wtyALy3Ey4h0b /q56LWIJc7oCfdkJiIATybNf0r6MRQY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-102-7xy2xNSqOZ2NksGzZGPuNQ-1; Tue, 10 May 2022 16:17:24 -0400 X-MC-Unique: 7xy2xNSqOZ2NksGzZGPuNQ-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 C5630805F46; Tue, 10 May 2022 20:17:23 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB70A40CF8E7; Tue, 10 May 2022 20:17:22 +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 0/5] vhost: introduce per-virtqueue stats API Date: Tue, 10 May 2022 22:17:15 +0200 Message-Id: <20220510201720.1262368-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 introduces the new API and generic statistics. Patch 2 makes use of this API in Vhost PMD. The 3 last patches introduce more specific counters (syscalls in DP, IOTLB cache hits and misses, inflight submitted and completed for vhost async). Changes in v3: ============== - Remove patch1, already applied - Fix memory leaks in error path (Chenbo) - Fix various typos (Chenbo) - Removed unused IOTLB counter (Chenbo) - Add generic packets stats in async enqueue path - Add Vhost async specific counters Changes in v2: ============= - Rebased on top of v22.03 - Add documentation Maxime Coquelin (5): 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 vhost: add statistics for in-flight packets 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 | 4 +- lib/vhost/vhost.c | 125 +++++++++- lib/vhost/vhost.h | 27 ++- lib/vhost/virtio_net.c | 61 +++++ 8 files changed, 460 insertions(+), 232 deletions(-) Reviewed-by: Maxime Coquelin