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 F077D45A05; Mon, 23 Sep 2024 18:43:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E821402B7; Mon, 23 Sep 2024 18:43:45 +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 06C914027C for ; Mon, 23 Sep 2024 18:43:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727109823; 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: in-reply-to:in-reply-to:references:references; bh=K6NlXOZLIcsF0Oykel0c+bTd+SUtvo5P0CpmcDuCJNc=; b=L0KCs/ZUYJJNnrnCgvGn9pC4J7sAgK6XwOJbC/FyKolvr/9Um90Qi0Ruc+ibhGzcXf/5h+ BTAiTMhaLZbwWA3Z7/gk3KJ4fbS+QiEOiOWYRJYtLijdtBrYQ8QbCbZm6HbhcwGtH5lOsD 0w2SCXVX1KiCJ3stW2MhGmcqcBiFftw= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-lan4ZMipObGuw6qr6gDIEA-1; Mon, 23 Sep 2024 12:43:41 -0400 X-MC-Unique: lan4ZMipObGuw6qr6gDIEA-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-5367cae7614so3745221e87.3 for ; Mon, 23 Sep 2024 09:43:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727109819; x=1727714619; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K6NlXOZLIcsF0Oykel0c+bTd+SUtvo5P0CpmcDuCJNc=; b=Yna4tpXqJj4fs1UD1B+ZyZnIEmbifvBGJWSI+otENl5g+pgJ5RfURYRqY3z1wKnTqz 1k+4pagJw1J7hqlkfGVouChAulRvUg56XCtkPg9g3LIOl8jp6M3rUuf7IVcOQTMPbcHz p4spckBT7Q/vEvTMog+GEsEz5MUoTTmksVPU/d3CFQf5Vjys7h3Py9npG20YCPbdWrtv kz6c2iOWh2O8Se8MNYtBfB11G/e8A0VD9ueRx4iFwVOOExw51A+sSFpGlrSY/0rDuXUG f16WgeasLE0evJJrvJYVVB9HWfAc2KdN+kkbvZWGLQakFQRaU38uJVFX/ChfZRj6gzN2 nm6g== X-Gm-Message-State: AOJu0YzI0MYrdqKT1uowmUjDAPdvRllfZp9BX+w4isnOPdEYu7apCfS6 Pog1ZikkcQFimCyWb9a+A0gfZUr5hUM2YNIb2K6h5/bQRb3JA4mS5yLoBdKze6B59wfHeTsrlqI /J5qMTmZ6OhcJF+lM0so6zTJxJEGjkreJ7CrDdhMTzCcQDvbPMnQaeRfZAMZtlMCXZ0ol7x3bMX sHxRYi5WagMIOFM70= X-Received: by 2002:a05:6512:1304:b0:535:66bb:3303 with SMTP id 2adb3069b0e04-536ac2d67d7mr5356943e87.12.1727109819455; Mon, 23 Sep 2024 09:43:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHymCqnCChgCM5RiRGobBqaYLwgFMyK0EfHm68lON0M2IMZgxA3NHR/Hdpqtunl1X6tSlGnK5oWSurqMMl8LME= X-Received: by 2002:a05:6512:1304:b0:535:66bb:3303 with SMTP id 2adb3069b0e04-536ac2d67d7mr5356927e87.12.1727109818991; Mon, 23 Sep 2024 09:43:38 -0700 (PDT) MIME-Version: 1.0 References: <20240920150921.994434-1-maxime.coquelin@redhat.com> <20240920150921.994434-3-maxime.coquelin@redhat.com> In-Reply-To: <20240920150921.994434-3-maxime.coquelin@redhat.com> From: David Marchand Date: Mon, 23 Sep 2024 12:43:27 -0400 Message-ID: Subject: Re: [PATCH v2 2/2] vhost: add reconnection support to VDUSE To: Maxime Coquelin Cc: dev@dpdk.org, chenbox@nvidia.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Fri, Sep 20, 2024 at 11:09=E2=80=AFAM Maxime Coquelin wrote: > > This patch enables VDUSE reconnection support making use of > the newly introduced reconnection mechanism in Vhost > library. > > At DPDK VDUSE device creation time, there are two > possibilities: > 1. The Kernel VDUSE device does not exist: > a. A reconnection file named after the VUDSE device name VDUSE* > is created in VDUSE tmpfs. > b. The file is truncated to 'struct vhost_reconnect_data' > size, and mmapped. > c. Negotiated features, Virtio status... are saved for > sanity checks at reconnect time. > 2. The Kernel VDUSE device already exists: > a. Exit with failure if no reconnect file exists for > this device. > b. Open and mmap the reconnect file. > c. Perform sanity check to ensure features are compatible. > d. Restore virtqueues' available indexes at startup time. > > Then at runtime, the virtqueues' available index are logged by > the Vhost reconnection mechanism. > > At DPDK VDUSE device destruction time, there are two > possibilities: > 1. The Kernel VDUSE device destruction succeed, which succeeded* > means it is no more attached to the vDPA bus. The > reconnection file is unmapped and then removed. > 2. The Kernel VDUSE device destruction failed, meaning it > is no more attached to the vDPA bus. The reconnection > file is unmapped but not removed to make possible later > reconnection. > > Signed-off-by: Maxime Coquelin Reviewed-by: David Marchand --=20 David Marchand