Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp165270pxa; Mon, 10 Aug 2020 22:47:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhFrPiojpWJvnr6O2QlOV+LZ2w1QYEy4mQOxxY8Nu8CXLZ8oPrduEtz3p4aBtpHo/qG77T X-Received: by 2002:a05:6402:1643:: with SMTP id s3mr25389048edx.185.1597124870269; Mon, 10 Aug 2020 22:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597124870; cv=none; d=google.com; s=arc-20160816; b=QVsFphyfBeK69ug2zIOZl/x2a0scJwS+ZbWPIlhKYwEt+FYargCucQutrHCHHEdR9U +39Poqmh62J05X2qpGipKqRnc42+f6PnZdUvu2KXUS3q2E1fi3bfwnH/WvbizfCqxgsE mL+3nJ/Yvr8WhdKv+tTDmAV1Brs4Nntk4vkek7WvC4IohfKqiCaKosQ/Rx0hks/Cihfk NYEJBc5Xl9wcwOroeYFqfTpxI/35/rjyEESZQpWKWf8P1BOA6IOOkoWr4YBEssDv/mBk A6xcef+2kBSJA+WZg5+XmWxYq72CSWI5PhT/wa+LzXV58sNT89cyLQfG+L72CHUrLu0k gl4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=sdENeti3PjcBTV2MD8ryoLAaF0AsT7D1lB9LbxQtRAg=; b=l3wY6WYFg+SF0bnANg+RxKnsMweR3oecyKIx8Vaz84s3KJmdF3hgM2+F3GzgMRBdfs swAS3iFa8qYQMXBUMXolCIG0GIX4IO3uyKegi51/UcPGYaLuU1PfFaBSZFK1K+xf9ioJ 36whu9m6L4qcFOBlKCHc2hY9vJxtFCGU4LkAYksPQbw/KhTub4uc3XeV4tIsqM+viN33 W0n5+MRrtUbrnDi1QGpkV16fYGrJFx9Gckx+U28nlUw0AtDvLfyLzx4cX6oGqggttpqA LXfEibXHX9QxnYAbARb00vEGTCERt5dvyCyaPjhwKOglh9adybuItPQD2K7kA9JXYS/7 kl2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=oT9q0S9h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b23si11500405edy.72.2020.08.10.22.47.27; Mon, 10 Aug 2020 22:47:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=oT9q0S9h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728064AbgHKFqa (ORCPT + 99 others); Tue, 11 Aug 2020 01:46:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726680AbgHKFqa (ORCPT ); Tue, 11 Aug 2020 01:46:30 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9FFFC061756 for ; Mon, 10 Aug 2020 22:46:29 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id f1so10267453wro.2 for ; Mon, 10 Aug 2020 22:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=sdENeti3PjcBTV2MD8ryoLAaF0AsT7D1lB9LbxQtRAg=; b=oT9q0S9hkeGQCEViqUTO/mht8FkcwSNgauxXDAvs+4AU3J12fBYLq7Hi2HoVc0ANUE 3SK3tW9m2/dJC0d6EBMBkSFOuVW1qGJwvWXyOk/jSGaLfAnJVvSghDNDACjo2iCuh55J fdMlBsFxvRU4GPlOXItOqp/yIXiVqaTykH85hHMhzaPTXqgokQ23+hxsfsNPEjqgYhEu oo71jQaD9lHXtkwT2IF5XiV06BETzcb9aDajxklrT6s9obso4Gytm8yY0MWWly2ZN04P pZUJmTkhatms3NCggpEC3f7tdNiSffhY6EetbnIQqKs/QakmLb0w/d6U6JBt0hakZ5WB 0RgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=sdENeti3PjcBTV2MD8ryoLAaF0AsT7D1lB9LbxQtRAg=; b=CeEIml55L+w8Wy/QRHkTfxkDwOYZouaV62haS17qpdvaovDjzdNsEYd2vmms+fTgX+ SdPc48ApZ9nC7/tOoeJlNRUQW7rflZIRXOp+9t3jjWl680VfcCVRU5pmdbvxxjdsZ5fW 7ADliDo75ngyXO0mPAc1ebz38qqIJzUHS4sPzn5EnZ0EMZ88Ac12vUqw6OL9o+bWqnJp FooeSwvPyukQnhPMNMNXUQl1AHH2Wqp03Xo954OjjeQCDdWRvEem0gUM/LtP7TIq9RnC yWnk0TFMtWTqKsbRGk3t9ewdQjwqaSZwrmUw5FqhOc5+SPIR0JAKLmnDiYIp8WAQUI1T 5V9w== X-Gm-Message-State: AOAM533S885sqM6Aslm92osakTKzIaaYeqIi4GGspXya0+zfCJxMkFK9 9N0LX+s2CkcK4/bL18j/Mk3qzA== X-Received: by 2002:adf:dd01:: with SMTP id a1mr4837577wrm.301.1597124788355; Mon, 10 Aug 2020 22:46:28 -0700 (PDT) Received: from localhost ([86.61.181.4]) by smtp.gmail.com with ESMTPSA id y84sm3196275wmg.38.2020.08.10.22.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 22:46:27 -0700 (PDT) Date: Tue, 11 Aug 2020 07:46:26 +0200 From: Jiri Pirko To: Jakub Kicinski Cc: Moshe Shemesh , Jacob Keller , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , Jiri Pirko , Vasundhara Volam Subject: Re: [PATCH net-next RFC 01/13] devlink: Add reload level option to devlink reload command Message-ID: <20200811054626.GA24082@nanopsycho.orion> References: <20200730161101.48f42c5b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <0f2467fd-ee2e-1a51-f9c1-02f8a579d542@mellanox.com> <20200803141442.GB2290@nanopsycho> <20200803135703.16967635@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20200804100418.GA2210@nanopsycho> <20200804133946.7246514e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20200805110258.GA2169@nanopsycho> <20200806112530.0588b3ac@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <8b06ade2-dfbe-8894-0d6a-afe9c2f41b4e@mellanox.com> <20200810095305.0b9661ec@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200810095305.0b9661ec@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mon, Aug 10, 2020 at 06:53:05PM CEST, kuba@kernel.org wrote: >On Sun, 9 Aug 2020 16:21:29 +0300 Moshe Shemesh wrote: >> Okay, so devlink reload default for mlx5 will include also fw-activate >> to align with mlxsw default. >> >> Meaning drivers that supports fw-activate will add it to the default. > >No per-driver default. > >Maybe the difference between mlxsw and mlx5 can be simply explained by >the fact that mlxsw loads firmware from /lib/firmware on every probe >(more or less). > >It's only natural for a driver which loads FW from disk to load it on >driver reload. We don't load it on reaload... We just do reset witn activation. > >> The flow of devlink reload default on mlx5 will be: >> >> If there is FW image pending and live patch is suitable to apply, do >> live patch and driver re-initialization. >> >> If there is FW image pending but live patch doesn't fit do fw-reset and >> driver-initialization. >> >> If no FW image pending just do driver-initialization. > >This sounds too complicated. Don't try to guess what the user wants. > >> I still think I should on top of that add the level option to be >> selected by the user if he prefers a specific action, so the uAPI would be: >> >> devlink dev reload [ netns { PID | NAME | ID } ] [ level { fw-live-patch >> | driver-reinit |fw-activate } ] > >I'm all for the level/action. > >> But I am still missing something: fw-activate implies that it will >> activate a new FW image stored on flash, pending activation. What if the >> user wants to reset and reload the FW if no new FW pending ? Should we >> add --force option to fw-activate level ? > >Since reload does not check today if anything changed - i.e. if reload >is actually needed, neither should fw-activate, IMO. I'd expect the >"--force behavior" to be the default.