Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3003242pxa; Tue, 18 Aug 2020 04:08:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMW5UEZQIRukogCw+G/+9/4i4I5Q+IvHHS/3JFkUA/BLLiCmnDJbkS13COMneTCBzBWh2T X-Received: by 2002:a17:906:6801:: with SMTP id k1mr19650885ejr.492.1597748937887; Tue, 18 Aug 2020 04:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597748937; cv=none; d=google.com; s=arc-20160816; b=CRuVNfGRNtdAgA6MkZT8mtBt9vQE+QbARwXmFmUXXck/tFaub2OaJSGLzS/hjQ+m3x gpvMBVdUtEa0NrT5OWNFPXwRqDJq+UCCHInqLYdYB4XrmHcSW3CqO1qeLKRDkRMmYbKh +rDeKya/LvAMZqEo6CJeHooygDYXMqUIHh8PCVVf81f80FaOrsaG+UPa8b40RGIKAQ97 l0qRHGf9lTVz79QmQGJma3pHBetc1r8vATnNa/cTrRNC0gBSWL+TfA+TGiiuezU8MQMi RpvsF0unQaZmjZeR4sQmJoPZVTeeRs7jS3lJKlhSUIigoSRgmtT/8dmXy5Oq4dzhwyMh poKA== 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=drdVPSYgqMc7dqGMBgLAeet5Si+cNYzh0V7KAWM73y4=; b=YPYUePmKN3sWRS57ft4F7tt5TMQa7rzE7GKSut8mvC0I8V7HMXxKP8tQNS7QyZqE60 eY5zydhB7z4uxgW/8ZcDGl+k0p4Aej9oFY+Ol9T59tNCdD5D85ZRmg6TtPenq4ld1SOW YfhYDDlGQKDNy7POqJQUFbPKmmjuxU02IOoWKc2FlHy1PwuPoely/hLbAJRcJvacgM+u WdFiQWebuVDabBdRRDSMYDTRmRSXClnnu/VL3UluO/rBmW6uUCE6jrFiC2TuZ8BSYLZK J9uAkz+jCuH051x3JLqD9UsStk5VUPdDhD53R6uvXD40OB/gMaqwx6KJx2A07KPH+hkf Ae9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=HbnpJ5QN; 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 t18si13108321ejd.694.2020.08.18.04.08.34; Tue, 18 Aug 2020 04:08:57 -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=HbnpJ5QN; 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 S1726645AbgHRLHx (ORCPT + 99 others); Tue, 18 Aug 2020 07:07:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726273AbgHRLHn (ORCPT ); Tue, 18 Aug 2020 07:07:43 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A86FC061389 for ; Tue, 18 Aug 2020 04:07:43 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id 88so17867665wrh.3 for ; Tue, 18 Aug 2020 04:07:43 -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=drdVPSYgqMc7dqGMBgLAeet5Si+cNYzh0V7KAWM73y4=; b=HbnpJ5QNoEXhYruLjRRBC3XSjw1narQot9FBjqwrfyfJOd7RbgzX0VasnZdNCDoWeV gLhK/sAiwxiehQ71zp6iPywxGgBdD/qQb6NJkt00/PeHH1vGHPd5EtZHY+5VFJzBRFP/ ZFIK9iMao5tEkWVUPxh+t6vFlIhKs0baoLd+pSKdl5PVbi6k1G4r7A1RZ3VEzaP4TCqD 0rX7x/8pmBFoLwsyaH8AvLudI0FYnuRHRRkxzDhga7fLqyv0KgFKO+l8yfZkEZyhhdr+ o5d04kpj8IOBpHvPVj5fKxojGOymyLBgh6ZpBOd3zF0hOjjcGVPifMFCW8hwv0K0lnUp JHIw== 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=drdVPSYgqMc7dqGMBgLAeet5Si+cNYzh0V7KAWM73y4=; b=BH+qGqt5XoO/GmubifjUKmUKhNJTvlbdBOd6smTaM8FpfD9wYiGmJEODo1jVvUKv3F 0D4IK1aBKdz9hoHea9WMSx7caFlWQ//tvROmIN89a3xIdFDBoabJvYS0uX4K+JWYLnt3 cWwLPP9NTd6zEYA4sLGJzulGfo/RMue2QJ7znbkCAeQ9bYOynLgUg3lQLgG/DAvA2U4Q sCmBjPepSOU3tSYnP+E9W+ibS0kni6Gc1tH/z3vQ2A+zBjjmgJOGfW67oV64BfAvTWKc QkVSjNGG7PeHc7Xhc4T+Z/URDraN/oZWrcqd6mBJQn5o/QSFSwYInnWvFSuEkWufPTGU 9TNg== X-Gm-Message-State: AOAM5310xSqGMrvg4e04GjU6EBa62sabOghUbayQytt+z8ChIv1vcMq1 kuT7THUIWMt+Ug6w/hRD4mZtEOSBrgT0Is9W X-Received: by 2002:adf:ed85:: with SMTP id c5mr19775656wro.307.1597748861915; Tue, 18 Aug 2020 04:07:41 -0700 (PDT) Received: from localhost ([86.61.181.4]) by smtp.gmail.com with ESMTPSA id d14sm35403359wre.44.2020.08.18.04.07.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2020 04:07:41 -0700 (PDT) Date: Tue, 18 Aug 2020 13:07:40 +0200 From: Jiri Pirko To: Moshe Shemesh Cc: Moshe Shemesh , "David S. Miller" , Jakub Kicinski , Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next RFC v2 13/13] devlink: Add Documentation/networking/devlink/devlink-reload.rst Message-ID: <20200818110740.GC2627@nanopsycho> References: <1597657072-3130-1-git-send-email-moshe@mellanox.com> <1597657072-3130-14-git-send-email-moshe@mellanox.com> <20200817163933.GB2627@nanopsycho> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tue, Aug 18, 2020 at 11:14:16AM CEST, moshe@nvidia.com wrote: > >On 8/17/2020 7:39 PM, Jiri Pirko wrote: >> Mon, Aug 17, 2020 at 11:37:52AM CEST, moshe@mellanox.com wrote: >> > Add devlink reload rst documentation file. >> > Update index file to include it. >> > >> > Signed-off-by: Moshe Shemesh >> > --- >> > - Instead of reload levels driver,fw_reset,fw_live_patch have reload >> > actions driver_reinit,fw_activate,fw_live_patch >> > --- >> > .../networking/devlink/devlink-reload.rst | 54 +++++++++++++++++++ >> > Documentation/networking/devlink/index.rst | 1 + >> > 2 files changed, 55 insertions(+) >> > create mode 100644 Documentation/networking/devlink/devlink-reload.rst >> > >> > diff --git a/Documentation/networking/devlink/devlink-reload.rst b/Documentation/networking/devlink/devlink-reload.rst >> > new file mode 100644 >> > index 000000000000..9846ea727f3b >> > --- /dev/null >> > +++ b/Documentation/networking/devlink/devlink-reload.rst >> > @@ -0,0 +1,54 @@ >> > +.. SPDX-License-Identifier: GPL-2.0 >> > + >> > +============== >> > +Devlink Reload >> > +============== >> > + >> > +``devlink-reload`` provides mechanism to either reload driver entities, >> > +applying ``devlink-params`` and ``devlink-resources`` new values or firmware >> > +activation depends on reload action selected. >> > + >> > +Reload actions >> > +============= >> > + >> > +User may select a reload action. >> > +By default ``driver_reinit`` action is done. >> > + >> > +.. list-table:: Possible reload actions >> > + :widths: 5 90 >> > + >> > + * - Name >> > + - Description >> > + * - ``driver-reinit`` >> > + - Driver entities re-initialization, including applying >> > + new values to devlink entities which are used during driver >> > + load such as ``devlink-params`` in configuration mode >> > + ``driverinit`` or ``devlink-resources`` >> > + * - ``fw_activate`` >> > + - Firmware activate. Can be used for firmware reload or firmware >> > + upgrade if new firmware is stored and driver supports such >> > + firmware upgrade. >> Does this do the same as "driver-reinit" + fw activation? If yes, it >> should be written here. If no, it should be written here as well. >> > >No, The only thing required here is the action of firmware activation. If a >driver needs to do reload to make that happen and do reinit that's ok, but >not required. What does the "FW activation" mean? I believe that this needs explicit documentation here. > >> > + * - ``fw_live_patch`` >> > + - Firmware live patch, applies firmware changes without reset. >> > + >> > +Change namespace >> > +================ >> > + >> > +All devlink instances are created in init_net and stay there for a >> > +lifetime. Allow user to be able to move devlink instances into >> > +namespaces during devlink reload operation. That ensures proper >> > +re-instantiation of driver objects, including netdevices. >> > + >> > +example usage >> > +------------- >> > + >> > +.. code:: shell >> > + >> > + $ devlink dev reload help >> > + $ devlink dev reload DEV [ netns { PID | NAME | ID } ] [ action { fw_live_patch | driver_reinit | fw_activate } ] >> > + >> > + # Run reload command for devlink driver entities re-initialization: >> > + $ devlink dev reload pci/0000:82:00.0 action driver_reinit >> > + >> > + # Run reload command to activate firmware: >> > + $ devlink dev reload pci/0000:82:00.0 action fw_activate >> > diff --git a/Documentation/networking/devlink/index.rst b/Documentation/networking/devlink/index.rst >> > index 7684ae5c4a4a..d82874760ae2 100644 >> > --- a/Documentation/networking/devlink/index.rst >> > +++ b/Documentation/networking/devlink/index.rst >> > @@ -20,6 +20,7 @@ general. >> > devlink-params >> > devlink-region >> > devlink-resource >> > + devlink-reload >> > devlink-trap >> > >> > Driver-specific documentation >> > -- >> > 2.17.1 >> >