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 9A3E145F2F; Tue, 24 Dec 2024 16:50:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 369F14029D; Tue, 24 Dec 2024 16:50:08 +0100 (CET) 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 4E73E40263 for ; Tue, 24 Dec 2024 16:50:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1735055405; 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=gJJ4r+TlesnnnQ9q3yl+Jquc3AxuwkdBCKkdYU1NtYQ=; b=bYyed8hLuLpEqZOqHm9SyQ5xyhuiyKcbfS5jFMLVfAvdHFuk+GRz8zwDurK7PPFwK7r84u Z+/JMAb6XCaOAX+xfgV0582OEnUOPccrZNJguyadkGeMBBtTafKXGo7Q1BKF1nehf1YIC3 d1pt08sU5gGwoe0DdMwmGyy0cAhxJsk= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-656-s7ZDqhgAMByz3504Er_Mcg-1; Tue, 24 Dec 2024 10:50:04 -0500 X-MC-Unique: s7ZDqhgAMByz3504Er_Mcg-1 X-Mimecast-MFC-AGG-ID: s7ZDqhgAMByz3504Er_Mcg Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 47D781955F10; Tue, 24 Dec 2024 15:50:03 +0000 (UTC) Received: from max-p1.redhat.com (unknown [10.39.208.4]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 493871956086; Tue, 24 Dec 2024 15:50:00 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, david.marchand@redhat.com, chenbox@nvidia.com Cc: Maxime Coquelin Subject: [RFC 0/3] Vhost: fix FD entries cleanup Date: Tue, 24 Dec 2024 16:49:55 +0100 Message-ID: <20241224154958.146852-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 1a0axgmI_O5BZatpyrtD1dggla59TqWW8UsANHl3mSQ_1735055403 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 The vhost FD manager provides a way for the read/write callbacks to request removal of their associated FD from the epoll FD set. Problem is that it is missing a cleanup callback, so the read/write callback requesting the removal have to perform cleanups before the FD is removed from the FD set. It includes closing the FD before it is removed from the epoll FD set. This series introduces a new cleanup callback which, if implemented, is closed right after the FD is removed from FD set. Maxime Coquelin (3): vhost: add cleanup callback to FD entries vhost: fix vhost-user socket cleanup order vhost: improve VDUSE reconnect handler cleanup lib/vhost/fd_man.c | 16 ++++++++++++---- lib/vhost/fd_man.h | 3 ++- lib/vhost/socket.c | 46 ++++++++++++++++++++++++++-------------------- lib/vhost/vduse.c | 16 +++++++++++----- 4 files changed, 51 insertions(+), 30 deletions(-) -- 2.47.1