From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QqhlvgvX; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 61E685A061C for ; Fri, 17 Jan 2025 14:31:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737120701; 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=cRp19Ahb+SYGfJFHGW2dNulFMnNOMvyKV51cwqDrmS0=; b=QqhlvgvXmOp9M8KMjAw8/E4h+ZBnUPuP3GBrPT7/6D/0nISrARGmqtsN2WmaVmZZab/e7e qVHjpLmYf5qjUns1L6LxlXcSW+X+0h4qN2b2ExSpaFlJEkdLd+9f6esx51MJYy4znhY/hv 7LTUW13sOiGao3WN6Wy8NzUmBKXA9Yo= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-66-hDaiOegJN-6K0lTt8ZAqcg-1; Fri, 17 Jan 2025 08:31:39 -0500 X-MC-Unique: hDaiOegJN-6K0lTt8ZAqcg-1 X-Mimecast-MFC-AGG-ID: hDaiOegJN-6K0lTt8ZAqcg Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4361b090d23so10658405e9.0 for ; Fri, 17 Jan 2025 05:31:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737120698; x=1737725498; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=cRp19Ahb+SYGfJFHGW2dNulFMnNOMvyKV51cwqDrmS0=; b=hT3dcLlAkIOeS7YxrPvU85E7rM9aU9uGhbIYbCwNYdSPeGICDAEuDZ82+Iqzo9dJT2 X98a5bEFfOinfgeobrnnlPU1mkDkz46sDuZiZGNVkO7Dqmmd663dyUnjVTfOR5Qaz2oF txrwt98mp0lxAOw1k0TpYEvTcLN5Ah9yYh2+hO7lFpGL+Zz6k6Ba+x7DPHGdBbLRqE/I MLgX104Da1DBq03tvyVBeutSUK2oC5YaHMxn9duK6JsBQA+CWzXXCPVOZgN+3Fo9670H lSL3QMdL9ki9/+Rhu9uNcbs/sRYVqxnkudyk49Q9yH0yjx0EGfYfkqZVOJJmead6/Kbp 8F9A== X-Gm-Message-State: AOJu0YzaTmb/AkpTeehdmeUdxEqJ1BFkIGAyW3hgz82RdEGF7rw7UmyQ j7b7wo39eFGZu1r26zTnxdd888n8rukX7goyMTfG3NbKylRQHD3Urhs6feOXqoCPMiDKeMxNes3 eNipcWP6DBvQamGkhBwIkgJZnXrvQWO3eOs/Vob6ZPqAe4AGpdBXQi76z1fjM9/0WI5M0ZAL4JH b/IFSdrJy0Aw65FRY2kba6+xYuwLyxed75 X-Gm-Gg: ASbGncsaRAXULlFA7xgYvPwjAVE23ofvGaqcb+RgNlQMHx590h8iRynlFT4Q1LnQEuJ bkr+Sz3RLEhVnUWt74UIMHo2sMk5AiB2Z2GgzjxJbZ/2o3b6THDk5PlHS9qvF8onO5aW7sqJ9P5 GOA3c4lkVKgnbYRzvf+nFVhalaARF0Fn7ewQKLL2CmcNVC+5OKRPFLoSjAcLjsfx/7YEgAoXqiI SCguKsOOWYNx52xK0H8ANPMGZXJnCSRKXLWb2skrKCYDcy3c2W/E1/8B5EvFJeAGlgP5SdjDYhQ m11xiE5pvw== X-Received: by 2002:a05:600c:1386:b0:434:f2f4:4c07 with SMTP id 5b1f17b1804b1-438913de07cmr27884785e9.15.1737120697660; Fri, 17 Jan 2025 05:31:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHglYQolggRSRwsJFgWAx4XvvrgZff3frfzlEOWrHmfR1ESFHRmPJGyCQpjDIP/OrHYpYzshg== X-Received: by 2002:a05:600c:1386:b0:434:f2f4:4c07 with SMTP id 5b1f17b1804b1-438913de07cmr27884445e9.15.1737120697183; Fri, 17 Jan 2025 05:31:37 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4389041f61bsm33526175e9.17.2025.01.17.05.31.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:31:36 -0800 (PST) Date: Fri, 17 Jan 2025 14:31:32 +0100 From: Stefano Brivio To: Laurent Vivier Subject: Re: [PATCH 0/9] vhost-user: Migration support Message-ID: <20250117143132.1e8b7c77@elisabeth> In-Reply-To: <20250117134445.5b341bdd@elisabeth> References: <20241219111400.2352110-1-lvivier@redhat.com> <329e349d-f86c-479b-97ee-61397aa28c60@redhat.com> <20250117134445.5b341bdd@elisabeth> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: XUyq8ONZErOwrsrNtp0rMSCsEdSk0yavLWOgpRznmRw_1737120698 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: 5QGIA5CHZ2L6HKNLV72INZQX7VO5D5Z6 X-Message-ID-Hash: 5QGIA5CHZ2L6HKNLV72INZQX7VO5D5Z6 X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, 17 Jan 2025 13:44:45 +0100 Stefano Brivio wrote: > On Fri, 17 Jan 2025 13:13:36 +0100 > Laurent Vivier wrote: > > > On 19/12/2024 12:13, Laurent Vivier wrote: > > > This series allows a QEMU guest to be migrated while it is connected > > > to Passt using vhost-user interface. > > > > > > There are two parts: > > > > > > - first part enables the migration of QEMU without transferring the > > > internal state of Passt. All connections are lost. > > > > > > This is done by implementing VHOST_USER_SET_LOG_FD and > > > VHOST_USER_SET_LOG_BASE commands (and enabling > > > VHOST_USER_PROTOCOL_F_LOG_SHMFD feature) > > > > > > "vhost-user: add VHOST_USER_SET_LOG_FD command" > > > "vhost-user: add VHOST_USER_SET_LOG_BASE command" > > > "vhost-user: Report to front-end we support VHOST_USER_PROTOCOL_F_LOG_SHMFD" > > > > > > - second part allows source Passt instance to send its internal > > > state using QEMU migration channel to destination Passt instance. > > > > > > This is done implementing VHOST_USER_SET_DEVICE_STATE_FD and > > > VHOST_USER_CHECK_DEVICE_STATE (and enabling > > > VHOST_USER_PROTOCOL_F_DEVICE_STATE feature). > > > > > > "vhost-user: add VHOST_USER_CHECK_DEVICE_STATE command" > > > "vhost-user: add VHOST_USER_SET_DEVICE_STATE_FD command" > > > "vhost-user: Report to front-end we support VHOST_USER_PROTOCOL_F_DEVICE_STATE" > > > > > > For now, it only implements the function needed to transfer the > > > state but no state is transferred. > > > > > > VHOST_USER_PROTOCOL_F_DEVICE_STATE is implemented in QEMU > > > only for vhost-user-fs, to be able to use it with virtio-net > > > I have proposed a patch upstream: > > > > > > https://patchew.org/QEMU/20241218143453.1573185-1-lvivier@redhat.com/ > > > > > > Laurent Vivier (9): > > > virtio: Use const pointer for vu_dev > > > vhost-user: update protocol features and commands list > > > vhost-user: add VHOST_USER_SET_LOG_FD command > > > vhost-user: Pass vu_dev to more virtio functions > > > vhost-user: add VHOST_USER_SET_LOG_BASE command > > > vhost-user: Report to front-end we support > > > VHOST_USER_PROTOCOL_F_LOG_SHMFD > > > vhost-user: add VHOST_USER_CHECK_DEVICE_STATE command > > > vhost-user: add VHOST_USER_SET_DEVICE_STATE_FD command > > > vhost-user: Report to front-end we support > > > VHOST_USER_PROTOCOL_F_DEVICE_STATE > > > > > > epoll_type.h | 2 + > > > passt.c | 4 + > > > util.h | 3 + > > > vhost_user.c | 251 ++++++++++++++++++++++++++++++++++++++++++++++++++- > > > vhost_user.h | 50 +++++++++- > > > virtio.c | 116 +++++++++++++++++++++--- > > > virtio.h | 32 +++++-- > > > vu_common.c | 59 +++++++++++- > > > vu_common.h | 3 +- > > > 9 files changed, 484 insertions(+), 36 deletions(-) > > > > > > > Another point: > > > > vhost-user can ask backend (passt) to send a notification at the end of the migration on > > the destination side to the network to update the network topology. Do we need this? > > > > This is VHOST_USER_SEND_RARP: > > "Ask vhost user back-end to broadcast a fake RARP to notify the migration is terminated > > for guest that does not support GUEST_ANNOUNCE. > > > > Only legal if feature bit VHOST_USER_F_PROTOCOL_FEATURES is present in > > VHOST_USER_GET_FEATURES and protocol feature bit VHOST_USER_PROTOCOL_F_RARP is present in > > VHOST_USER_GET_PROTOCOL_FEATURES. The first 6 bytes of the payload contain the mac address > > of the guest to allow the vhost user back-end to construct and broadcast the fake RARP." > > This isn't really clear :( ...what does "fake RARP" even mean? RARP is > a protocol, and an obsolete one, despite: > > https://en.wikipedia.org/wiki/Reverse_Address_Resolution_Protocol#Modern_Day_Uses > > Anyway, it comes from 3e866365e1eb ("vhost user: add rarp sending after > live migration for legacy guest"). > > I have no idea what "legacy" means here, but I'm under the impression that > somebody just needed a way to notify the guest of the finished migration > (nothing related to networking) and, correct me if I'm wrong, the French > word for "fake" is rather similar to the one for "dummy". > > So my understanding of it is that they would just send a dummy packet, > and a RARP broadcast would be a good candidate because it's otherwise > unused, but wouldn't raise any firewall alert. > > Or maybe "legacy" has something to do with VMware vSphere, and there was > some guest previously running on VMware vSphere that needs a RARP packet > to "proceed" with something after the migration. This: https://lore.kernel.org/qemu-devel/1433943783-20125-1-git-send-email-thibaut.collet@6wind.com/ and the discussions here: https://lore.kernel.org/qemu-devel/1433943783-20125-3-git-send-email-thibaut.collet@6wind.com/#r https://mails.dpdk.org/archives/dev/2016-February/033520.html have some hints, but if it's for OVN: https://opendev.org/openstack/neutron/commit/e16ab24cd8c418deb7af9ed4dff24f36be39231a ...it's not used anymore? Still, I wouldn't care at the moment. -- Stefano