From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 47520428D3; Wed, 5 Apr 2023 14:40:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D552841153; Wed, 5 Apr 2023 14:40:25 +0200 (CEST) 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 7DB4C41133 for ; Wed, 5 Apr 2023 14:40:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680698423; 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=l7VyHMqM2E5kI54ba3UGkt/tgukymMH8CklmS9+fDWQ=; b=PqdKLCqNcAlLDZnUDS/Vp6ZkLRmMcZf8yAxRzsYKs0fAAgmZv47IsTGyurO9ASsUaB9F5h jpEWAvps0pPgEouIiriUNaXaT4NJfCj0cK9GynO/8+fv5FKoHkwJuEkG+m/V7NcrjP2X5z 2gJtkHVC0+9G1jzb0JU0MRjYtiSJvus= 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-73-IWVoqrlDOuGcWEr5fpzYWQ-1; Wed, 05 Apr 2023 08:40:22 -0400 X-MC-Unique: IWVoqrlDOuGcWEr5fpzYWQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5F1C288B7A2; Wed, 5 Apr 2023 12:40:22 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.193.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2440400F4F; Wed, 5 Apr 2023 12:40:21 +0000 (UTC) From: Eelco Chaudron To: maxime.coquelin@redhat.com, chenbo.xia@intel.com Cc: dev@dpdk.org Subject: [PATCH v2 0/3] vhost: add device op to offload the interrupt kick Date: Wed, 5 Apr 2023 14:40:09 +0200 Message-Id: <168069838578.833254.4856666346839028593.stgit@ebuild.local> User-Agent: StGit/1.5 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 adds an operation callback which gets called every time the library wants to call eventfd_write(). This eventfd_write() call could result in a system call, which could potentially block the PMD thread. The callback function can decide whether it's ok to handle the eventfd_write() now or have the newly introduced function, rte_vhost_notify_guest(), called at a later time. This can be used by 3rd party applications, like OVS, to avoid system calls being called as part of the PMD threads. v2: - Used vhost_virtqueue->index to find index for operation. - Aligned function name to VDUSE RFC patchset. - Added error and offload statistics counter. - Mark new API as experimental. - Change the virtual queue spin lock to read/write spin lock. - Made shared counters atomic. - Add versioned rte_vhost_driver_callback_register() for ABI compliance. Eelco Chaudron (3): vhost: Change vhost_virtqueue access lock to a read/write one. vhost: make the guest_notifications statistic counter atomic. vhost: add device op to offload the interrupt kick lib/eal/include/generic/rte_rwlock.h | 17 +++++ lib/vhost/meson.build | 2 + lib/vhost/rte_vhost.h | 23 ++++++- lib/vhost/socket.c | 72 ++++++++++++++++++++-- lib/vhost/version.map | 9 +++ lib/vhost/vhost.c | 92 +++++++++++++++++++++------- lib/vhost/vhost.h | 70 ++++++++++++++------- lib/vhost/vhost_user.c | 14 ++--- lib/vhost/virtio_net.c | 90 +++++++++++++-------------- 9 files changed, 288 insertions(+), 101 deletions(-)