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 D261F41BAB; Thu, 2 Feb 2023 11:23:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9D4A42D65; Thu, 2 Feb 2023 11:23:12 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2055.outbound.protection.outlook.com [40.107.243.55]) by mails.dpdk.org (Postfix) with ESMTP id C16AB40689 for ; Thu, 2 Feb 2023 11:23:10 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H64ED8CEkT0qlSeNAcJBjrk+XNMOhZXV+QcqlvriewAXPF9WWqKbWmoVOw3KIh0JQrU1eML4KhFZAmwSjf/gsNXmAmaJg8WxuAxwh50vdvIJVZ7NWbAtoQz+D+U3uLKY4CB4X+xqAnThJ8C8pHrytFx22ugzaCDmQEyWPiR9L9abUhImfCNpY5LJs6/8mcJfazlsRYtr7oCNcUh3f9TeD28K6H2z/o1yLB9RFZtkSHov6YSVF0tUzSazRLvb2N09xB1JzZNFzQVmtt+ljccyd28Fn9MoVwdYWPGXwOIuKxJoNl5JcFWkV3EljTpfn2WijgCi8aDrkcyQ4EYSZMiwlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+CwFUtZGtktpqIXdghcUaF+1ADKddQMxrC2QFjD+uHw=; b=BDI87JRQbKcdO/nAclTDnQNrcrgs78jz+46HRv9kkv5dJlNTbtAkpxZo7+5aMK93sVzqrIFiT9kWrvy29apEz4UIfYJ8rppo2Vws4YQzylEYxh1u28iVp2y2Q4c0IDApnScJ9fi3fEYOerHEwjjfAT8XYXEVT5PjcDG8gL+aITNksjtR3/g0pj7LIIbxKJ+jj/LeO44qfpk+ega0IjsIWbqazjBfxXBEsvDGgrq55iB/KXl8f+g0DHpugk/uvM2zKNwjCFqkfp4nxxTOGKL33Y+oXxvyQpVB1e9+DKdGV5+hFX7qms2pepIgC+AIN3zs47NRX0IlERKsSuh3faLKdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+CwFUtZGtktpqIXdghcUaF+1ADKddQMxrC2QFjD+uHw=; b=ciuQRy3LjQ4KND8otFX2u3LXnjzZgus2CXdcrJAz7ImNmCw6iLWN9vPfuBEPpsqcuU7YT+cXzgAGQ4kPyrOdOZOAxyXsyQAbxodQWKt/4jfYC8ViExpp2+9V0OMP/Fw6LATtZ+VO6+WrtIsPPt+1g9PCuH8PB4XgSHq/Z9GhQRPk321/jh7tMKg+7loEdWsql87n8QdQDMyxj85ufQaoOr3jlPmqXIoq2pgUgcE8yUs8TL1nk189Knt3b/sMOVkAijuDO8UP8g4615w1ftj9pQSLD2bGnC2fwRyKD//ODzv4Y31STQYGhvq61Oa67lypTLYvxnZ7V7fKyKAsAWJHpQ== Received: from BN9PR12MB5273.namprd12.prod.outlook.com (2603:10b6:408:11e::22) by BL1PR12MB5302.namprd12.prod.outlook.com (2603:10b6:208:31d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.28; Thu, 2 Feb 2023 10:23:08 +0000 Received: from BN9PR12MB5273.namprd12.prod.outlook.com ([fe80::2296:10b9:2661:d795]) by BN9PR12MB5273.namprd12.prod.outlook.com ([fe80::2296:10b9:2661:d795%5]) with mapi id 15.20.6064.027; Thu, 2 Feb 2023 10:23:08 +0000 From: Rongwei Liu To: "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Andrew Rybchenko , Jerin Jacob CC: "dev@dpdk.org" , Matan Azrad , Slava Ovsiienko , Ori Kam , "stephen@networkplumber.org" , Raslan Darawsheh , Ferruh Yigit , "bruce.richardson@intel.com" Subject: RE: [PATCH v4 2/3] ethdev: add standby state for live migration Thread-Topic: [PATCH v4 2/3] ethdev: add standby state for live migration Thread-Index: AQHZK1P0oIjzvPnGnUq55Tvnxgp8N6646QaAgABOiQCAAJB3AIAAEvqAgAAByoCAAayR8A== Date: Thu, 2 Feb 2023 10:23:08 +0000 Message-ID: References: <20221221090017.3715030-2-rongweil@nvidia.com> <6b2c3d11-428a-2c69-ddf9-2b3306dacbce@oktetlabs.ru> <13621401.RDIVbhacDa@thomas> In-Reply-To: <13621401.RDIVbhacDa@thomas> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN9PR12MB5273:EE_|BL1PR12MB5302:EE_ x-ms-office365-filtering-correlation-id: b1847700-d80c-4c32-df20-08db05077add x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IZ7S4hnWPUDfpccm4kH/0Ot3Uh8Wi0kZMhYK0Q2Cpul/HtQS1VNDs9T16lD6fEP/FjUA3D8MIiPXwdxFfyp66IVBBBWaZyGxL6Zq1CZnzwpc46hxEt3KlFh78k5vT2WoTvhZg8OJPoWcIUKW2KfXtzZG8RKHvMrnuBhgrTY46TxIjPIQhxQIwzgIvSd/i1KTDBKv71GKxuHcxu9iIz4Rw/L6WMFk4a3sQ5h1nTjY3PEN5K0H7/O0o1KiAdIiXZyLqdpbWRuz+EC0wbPnXZc8IpeWJbmcDrsRW9BhVmY2F1DML5VLtSC0NYI1OPBBJ8zW0gm7/MulQrTH32sqhhebyZAA2qEENMpn9cei2OKQNcuZGpQDy6ziAydqT1rBrymDXSs/nPxRwJyWaKNcf+JmrQZ7zYEg3HbHRNeYjwCe8Z6H2NvQ5OKdbOLW+EOKMPShYrBa/n9xloOiafj4V8jm7j3H46eNz7O9aAe1hUIYkY0Cu+jziZJEp6jjhKo6M3zwNWyrp20mFjpGIDr7pXjonUsYCqWCJGful0WV0Wtg6jZIusXcudseKzB21ohScTAxhuSczeXW3Var9hIP9Kim/UdvvWKPMut1tWrNeddUSfaqsyv/AZXX1j9ymPg0Fsrbu6W72sGrJ/T2p+q6XmxkVXp8jb1Lv76FidGsA4Pxzrq+3v6wThJs+Lz3Zu1wAMqHpNHOLisamDRz+g7w1ZXJGw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR12MB5273.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(376002)(366004)(39860400002)(346002)(136003)(396003)(451199018)(2906002)(478600001)(76116006)(33656002)(9686003)(6506007)(53546011)(26005)(186003)(71200400001)(38070700005)(7696005)(52536014)(8936002)(55016003)(86362001)(5660300002)(41300700001)(66446008)(64756008)(66556008)(83380400001)(8676002)(4326008)(66476007)(38100700002)(66946007)(122000001)(316002)(110136005)(54906003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?0DsDZ5AFMfxtCe37yPhRw1RoVfDAK5Ck9ChUG0sl4WJ5MvT3qgA8ixj+U8Aq?= =?us-ascii?Q?VUJspLHs+ZgdCMDH9gC9KVWb9aMhD4B6S8ExZBr9O3/Q4nKkW3PVQ9I1bEIU?= =?us-ascii?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Rxi6L6RM7U?= =?us-ascii?Q?HGU1xzfmE9gOPqjj2532k2Ct9KLhhijBuK6jt9GRuFjwpE/mGW8JCPf9Hdit?= =?us-ascii?Q?548v+PnnhyWXmZ/JiweJaCFQGuAgvljjMMPKeKUH8KXONHHM7/LDCfDrOC49?= =?us-ascii?Q?B/WLEi1ZBC05cy3oN723qLuq66CwrIbEh6LyXKr3vsEmkV74dTX9fSiXUkZR?= =?us-ascii?Q?hGpZEoexzXzeCAQ2WF4S9dMDIUY57nKrNMGj5kFhP44q3+31z1ugGYL9Nmia?= =?us-ascii?Q?mAxT5Y+1ElWkOXFn78thWUBbxzHO9cfmlx4qz56RhVw6XiL6y+WGxSCUWiT5?= =?us-ascii?Q?kI3+ms5wMd33NSx7zGwLDJ2m+HVuY3DepyToA8FPh+wC4NTyTjbLaeGb/SZH?= =?us-ascii?Q?4vUcH0LW0mlpZRSppshQAEMWNq3Ji967AtVWtiPu/Q12SsjQbhCdE7k3/Xfd?= =?us-ascii?Q?jqKgpCsFKG5mJThFx3166sSAKcbhpIAKX9qa0fYemj/1tPzJpPdLkOwRXGQ5?= =?us-ascii?Q?CdO/d8TNyL0rvf3UZlKA2q0MXaUrZm76zICNfZbi55IlpwUTeOWcqEdkjJEl?= =?us-ascii?Q?iA9bhqYJ/0uzasaM6io=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR12MB5273.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b1847700-d80c-4c32-df20-08db05077add X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Feb 2023 10:23:08.6703 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 7vC0Mg3dh7YvcWDG04EfHwxy4lTgHEj+f4Jz/2JDIVKC6EmGXIjMtWtSZroDKVxih/92IhQQkA6UrMzGkC41SQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5302 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 Hi Jerin and Thomas BR Rongwei > -----Original Message----- > From: Thomas Monjalon > Sent: Wednesday, February 1, 2023 16:47 > To: Andrew Rybchenko ; Jerin Jacob > > Cc: Rongwei Liu ; dev@dpdk.org; Matan Azrad > ; Slava Ovsiienko ; Ori Kam > ; stephen@networkplumber.org; Raslan Darawsheh > ; Ferruh Yigit ; > bruce.richardson@intel.com > Subject: Re: [PATCH v4 2/3] ethdev: add standby state for live migration >=20 > External email: Use caution opening links or attachments >=20 >=20 > 01/02/2023 09:40, Jerin Jacob: > > On Wed, Feb 1, 2023 at 1:02 PM Andrew Rybchenko > > wrote: > > > > > > 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 application= s: > > > >>> . 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. Thanks for the comments. I missed this part when designed this feature. Per my test, vfio-pci doesn't support two primary applications using the sa= me handle(/dev/vfio/***). We will move this back to mlx5 specific.=20 > > > > I think, Here, it is two different primary application. >=20 > Yes it is 2 primary applications. >=20 > > Even if it is primary-secondary kind of case, bus or pci driver layer > > needs fixup, Currently, if we add allow list same PCI device on > > primary and secondary, the second app start will fail. >=20 > Can we imagine passing a VFIO handle to the new application? >=20 >=20