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 9447141B91; Tue, 31 Jan 2023 19:14:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6DA6D40684; Tue, 31 Jan 2023 19:14:49 +0100 (CET) Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) by mails.dpdk.org (Postfix) with ESMTP id 254EE4067B for ; Tue, 31 Jan 2023 19:14:48 +0100 (CET) Received: by mail-vs1-f47.google.com with SMTP id h19so15213334vsv.13 for ; Tue, 31 Jan 2023 10:14:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AJMh7u+zKGPfyUQ92LSGLUm3/57hvKiIatGTBPaBjQc=; b=mmKOFUp8DavAgjvxsFn72e1NBOUkUBfQj0fm3AChjvlLeOLjRh0Hr2oPAHfY982NjO ihBZC7KU5n5LIWvaQZVIkEwr6w/447sHOxj1AHopw4pRWg2wyAb7zwBjFrHNWvvP3ERf 58wtmG/QX2eK4xxjgMKblB70X3M+kKZPDpJv7vuYzaGs2LIKX0qW2IPzRgt9Su0Af0/e XCvUE2RzegcpJutFCDvOrQ+kVnEGHOAxoTfIF4eE3YJK09mmC8PgUs3Ts+XxFangeAfH F/mLYdDv9aTkzxOTT6tCxAoQFe7LzR90UyJ2YRifPRWTdZ5xWAJ4pTCSFGE5EQvasb77 DCng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=AJMh7u+zKGPfyUQ92LSGLUm3/57hvKiIatGTBPaBjQc=; b=aPJdoZPOLY96Zj5IHa2owjRzJ9v6/Lc7Mik23YE/AZBfA1DwPnbAGdr7X9lx5/I6Wi RumXCc2Jph3XVofWHIlTNMgewhiL2yFIzAmhBSvV4ZUaMQHD+ZOKx2qL9aR2qLpeQ77w CY2wUcQDfjh3zQDIc3QVU9692JUBMGtQa9mCOz12oIDfvQzCebav73MMsSLN8JoQDVWq 6d2w/gU4mHTN2KxOgCN25ccfI2LVlfcnJM7z3QR1edIIehm1fre5LKK5Na7XZidlb6nt FmFuIlk1Yki8KMSxA1DHkwEgT41qG6bhVZPXZg+Gbe9SeXF96lJ2Beuon8xMTK8+YnLZ 0d5g== X-Gm-Message-State: AO0yUKXFq3/NbDWLSN5l0+B6Ccz5XUBEWBBlqwKqhb4CT0jnpF2ZRx7E 0DPmehOffFTGptp7oE6qbGiXPU72vhESu5DVTxs= X-Google-Smtp-Source: AK7set92R2rDJf5BWOeXKrIzFYp5iI10CaSs2mDdnn0+lvAfb6u61+yn/IDQ9MyFVPFIMK4wFnckuXeTW/i/7jIveNM= X-Received: by 2002:a67:b60a:0:b0:3fe:3011:1976 with SMTP id d10-20020a67b60a000000b003fe30111976mr446895vsm.52.1675188887486; Tue, 31 Jan 2023 10:14:47 -0800 (PST) MIME-Version: 1.0 References: <20221221090017.3715030-2-rongweil@nvidia.com> <20230118154447.595231-1-rongweil@nvidia.com> <20230118154447.595231-3-rongweil@nvidia.com> In-Reply-To: <20230118154447.595231-3-rongweil@nvidia.com> From: Jerin Jacob Date: Tue, 31 Jan 2023 23:44:21 +0530 Message-ID: Subject: Re: [PATCH v4 2/3] ethdev: add standby state for live migration To: Rongwei Liu Cc: dev@dpdk.org, matan@nvidia.com, viacheslavo@nvidia.com, orika@nvidia.com, thomas@monjalon.net, stephen@networkplumber.org, rasland@nvidia.com, Ferruh Yigit , Andrew Rybchenko Content-Type: text/plain; charset="UTF-8" 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 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. Good to see any implementation and example application to exercise this APIs > . 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 > > The active role means network handling configurations are programmed > to the HW immediately, and no behavior changed. This is the default state. > The standby role means configurations are queued in the HW. > If there is no application with active role, > any configuration is effective immediately. > > Signed-off-by: Rongwei Liu