Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp138819rdb; Tue, 5 Dec 2023 00:36:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEMkHg9uZA7UjPdgpyZ+9MkeCnJI/p4tBUcbQKMNTKgaKDtRNKAQzRAf5cKQ4ji7+qac1Yc X-Received: by 2002:a17:902:ee94:b0:1d0:6eae:8e7b with SMTP id a20-20020a170902ee9400b001d06eae8e7bmr1261329pld.20.1701765362604; Tue, 05 Dec 2023 00:36:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701765362; cv=none; d=google.com; s=arc-20160816; b=dM4whT7TyUNMEm3M59nVd5iX41J2Whmgn44s2Uig45N5m1fR/05WOgfNnPNGuS3Oye hLHkAxd+8kcDS+ndbmDKuA2ujKHHhhsiNaWRbSUR48iAroG4unim/cC0znF/F5iMxWiH hJHm4RZ1ST6qmjjK1wzkPmeeEFiwb2as57Nx0F/h7raYpeWTAubnfys6XbG3IW68w6zf aMAVYwgi9wknrtFmOat9zQSkpK3ronzngsy5u6hzdJPjpGUd7ZFL1c+vp5pTHZCeH1Y3 R0zCdcywAVFnscEIND/X0GDVYD8R6gsNGgtY23v58G88dtE3ExaHq09Oux5sUzN3DgCn Vy3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=EZGAiuD4c6EeeMuRKIfdrsmOYZT7el3aWkmdeOBjkLM=; fh=ARFoO5Pk7SniYIzyAg9Z8eUcw3AUCiaEHOgWusT66QQ=; b=TdRKFKVQjiDM7Y1eUHKK6/Nu+RsxzyM8Xo9HDD8BBtcjt9E231g4anqZQOdJoR0k/d zM37AGg5PxwjSB90QFrc1zsDvJZft8d2f5w/8sCqZpWpdyxQ51+rTkExnarKWHEit5r2 Y7skIuNgnsH/LfkASAdjxn8HUdLenQOa3e/OGvI0Hr0peOf6DMLRbeNQB79dUJy9PfCu CQFHQuoK8p03jFUsYIl1C2NfVPC2OAhumT5ykewSvI+K5Z91lrKfZfOUwOs+law9lFu4 2HJk25zKr4L7T5rD+3OZWc547X2lJLAN0MwBidznunaps5AW49vJhDoIwNDqddCs1jr7 6VyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QxixgYSj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id t15-20020a63460f000000b005b8f24e6526si9132017pga.234.2023.12.05.00.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 00:36:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QxixgYSj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 04344807C5C4; Tue, 5 Dec 2023 00:35:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344767AbjLEIey (ORCPT + 99 others); Tue, 5 Dec 2023 03:34:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231676AbjLEIex (ORCPT ); Tue, 5 Dec 2023 03:34:53 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ED0FD3 for ; Tue, 5 Dec 2023 00:34:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701765298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=EZGAiuD4c6EeeMuRKIfdrsmOYZT7el3aWkmdeOBjkLM=; b=QxixgYSjuN+wetjkXG/5uS2rNS+M5f51Goo4uZcGiVSQLppGhDPdu8O4eJuwzhM9oZ98tF B9qIeEFbNespDm1lpMrx/g8hPiKSFBVaPBmnChtEaMXjIUbKhLnYGeuA5HXXqO4sNy2gr7 AtxW9vA75zmrWaEIMdtl8f6duV8Dcj0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-458-COq0lAi_O-6de5qstJLj_Q-1; Tue, 05 Dec 2023 03:34:54 -0500 X-MC-Unique: COq0lAi_O-6de5qstJLj_Q-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 842B0101A52A; Tue, 5 Dec 2023 08:34:54 +0000 (UTC) Received: from server.redhat.com (unknown [10.72.112.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id B02082166B31; Tue, 5 Dec 2023 08:34:50 +0000 (UTC) From: Cindy Lu To: lulu@redhat.com, jasowang@redhat.com, mst@redhat.com, xieyongji@bytedance.com, linux-kernel@vger.kernel.org, maxime.coquelin@redhat.com Subject: [PATCH v3 0/7] vduse: Add support for reconnection Date: Tue, 5 Dec 2023 16:34:37 +0800 Message-Id: <20231205083444.3029239-1-lulu@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 05 Dec 2023 00:35:12 -0800 (PST) Here is the reconnect support in vduse, Kernel will allocate pages for reconnection. Userspace needs to use mmap to map the memory to userspace. The kernel and userspace will use these pages to synchronize the reconnect information. test passd in vduse+dpdk-testpmd change in V2 1. Address the comments from v1 2. Add the document for reconnect process change in V3 1. Move the vdpa_vq_state to the uAPI. vduse will use this to synchronize the vq info between the kernel and userspace app. 2. Add a new ioctl VDUSE_DEV_GET_CONFIG. userspace app use this to get config space 3. Rewrite the commit message. 4. Only save the address for the page address and remove the index. 5. remove the ioctl VDUSE_GET_RECONNECT_INFO, userspace app will use uAPI VDUSE_RECONNCT_MMAP_SIZE to mmap 6. Rewrite the document for the reconnect process to make it clearer. Signed-off-by: Cindy Lu Cindy Lu (7): vdpa: Move struct vdpa_vq_state to uAPI vduse: Add new uAPI for vduse reconnection vduse: Add new ioctl VDUSE_DEV_GET_CONFIG vduse: Add function to get/free the pages for reconnection vduse: Add file operation for mmap vduse: Update the vq_info in ioctl VDUSE_VQ_GET_INFO Documentation: Add reconnect process for VDUSE Documentation/userspace-api/vduse.rst | 30 +++++ drivers/vdpa/vdpa_user/vduse_dev.c | 184 +++++++++++++++++++++++++- include/linux/vdpa.h | 29 +--- include/uapi/linux/vdpa.h | 31 +++++ include/uapi/linux/vduse.h | 25 ++++ 5 files changed, 270 insertions(+), 29 deletions(-) -- 2.34.3