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 DDE8F41B9B; Wed, 1 Feb 2023 08:32:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7FC340A7A; Wed, 1 Feb 2023 08:32:31 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 502B64021F for ; Wed, 1 Feb 2023 08:32:31 +0100 (CET) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id A5AB15D; Wed, 1 Feb 2023 10:32:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru A5AB15D DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1675236750; bh=60I6WKt8FrKzzNGLe2VRoNp6Yk3Et/53LUdI0rzhjuk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=f2cASsTl6YnAWPQjucdZTDxsnH5+25lYGTGwx5jffyXS8RXmthp+n56jiUlYaO3zC arcbAWlre4fxqIIpjIi9U3q/CxczhVsypT1CsarvO+ly3xy2B2Kf48QszllryzVpk6 rrYy3A4Xt5ujyEQoRfFaZPtTWil1gApsimrBGcIY= Message-ID: <6b2c3d11-428a-2c69-ddf9-2b3306dacbce@oktetlabs.ru> Date: Wed, 1 Feb 2023 10:32:30 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v4 2/3] ethdev: add standby state for live migration Content-Language: en-US To: Thomas Monjalon , Rongwei Liu , Jerin Jacob Cc: dev@dpdk.org, matan@nvidia.com, viacheslavo@nvidia.com, orika@nvidia.com, stephen@networkplumber.org, rasland@nvidia.com, Ferruh Yigit , bruce.richardson@intel.com References: <20221221090017.3715030-2-rongweil@nvidia.com> <20230118154447.595231-3-rongweil@nvidia.com> <45277384.fMDQidcC6G@thomas> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <45277384.fMDQidcC6G@thomas> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 2/1/23 01:55, Thomas Monjalon wrote: > 31/01/2023 19:14, Jerin Jacob: >> On Wed, Jan 18, 2023 at 9:15 PM Rongwei Liu wrote: >>> >>> When a DPDK application must be upgraded, >>> the traffic downtime should be shortened as much as possible. >>> During the migration time, the old application may stay alive >>> while the new application is starting and being configured. >>> >>> In order to optimize the switch to the new application, >>> the old application may need to be aware of the presence >>> of the new application being prepared. >>> This is achieved with a new API allowing the user to change the >>> new application state to standby and active later. >>> >>> The added function is trying to apply the new state to all probed >>> ethdev ports. To make this API simple and easy to use, >>> the same flags have to be accepted by all devices. >>> >>> This is the scenario of operations in the old and new applications: >>> . device: already configured by the old application >>> . new: start as active >>> . new: probe the same device >> >> How to probe same device if is already bind to another application? >> vfio-pci wont allow this. > > I missed that part. > There is no way to share a VFIO device between 2 applications? As I understand multi-process shares an VFIO device between many application. As far as I remember it is just required to pass corresponding file descriptor to another application. Anyway I fully agree that the patch requires more documentation in doc/guides/ with the description of live migration theory of operations. >>> . new: set as standby >>> . new: configure the device >>> . device: has configurations from old and new applications >>> . old: clear its device configuration >>> . device: has only 1 configuration from new application >>> . new: set as active >>> . device: downtime for connecting all to the new application >>> . old: shutdown > > >