From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F8DAC433E2 for ; Mon, 14 Sep 2020 12:00:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C113E206E9 for ; Mon, 14 Sep 2020 12:00:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20150623.gappssmtp.com header.i=@resnulli-us.20150623.gappssmtp.com header.b="cEieP5ue" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726119AbgINMA0 (ORCPT ); Mon, 14 Sep 2020 08:00:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726084AbgINLnW (ORCPT ); Mon, 14 Sep 2020 07:43:22 -0400 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2440DC06178B for ; Mon, 14 Sep 2020 04:43:21 -0700 (PDT) Received: by mail-ej1-x642.google.com with SMTP id u21so22777114eja.2 for ; Mon, 14 Sep 2020 04:43:21 -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=EorQ4+lFRDMIIwVJVubxPfngkVD7wpy5XnFzjtyaCII=; b=cEieP5uetVjdC8PZd4Ru1iB2Nef0yKOKkYyYizT9bwmkXEKdO1cikfrP2sOkOdB1Zr FI9vYfQCfX2c5Uo50C8lRbiXEZ7CqDZHxhlB9bKTryX2nl8+/SdZFnl2pjIKnUM6RtLH jXwToEOnBNkB287LKU+8TDjrR/6wbnqmhRQSc1b7X1+7bqk538Seh3CLJAqfe/8xw8b2 B35lux0oUategBjqPcr6i6fItIMfrH8kRacS94/1OTXVxS9iWoO5zBo0nLG2dExxY4vg cECI9qFEDArN3E1INVmuU/4vTVLHQXLILSA9TVVGLI+XkGC5/TUkZ8gE3frGh2jwMwkw yC1w== 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=EorQ4+lFRDMIIwVJVubxPfngkVD7wpy5XnFzjtyaCII=; b=fHQN6aHfr2WiRvdc1+0xGdCg/K4DgMqq1SZ3EpdQYgKVaxsMI7CQnDHF5v4a/4ksm/ KMCht5P6J3UA3kvpq57RvixqVyrXOFh6E9KVSWKjiR0r1jWzrd3DO3dqqyFNERNre+S+ JpYnrRB4Evs0LPLu4yq1t8Y8X+db/1mpc5FgOrJXzs/kHfmdRYKh8KUXisa1pVzhlNy+ WVdV8lNBqL4B95fgeMPldiB6Az2/OBwJo7mqHGoYOL9vVX3cLmZkFS4PJFr/aJvPwyk2 SDiu/5ij+6X8T0n/1Q3uma1CXOakVhV3HnamsYZGnBseqsbikG4fYoX/hSiLTrN+RExs 9oIw== X-Gm-Message-State: AOAM530hWKQlUEHiPu7YsDZaVaUryECVvpcFH3j2TonOgHuwKr+DHI/k WKG+N6+u5TrMQIYdqgcU4dYEOQ== X-Google-Smtp-Source: ABdhPJzVBIkjmcXzKOZKv9MKgpLPw6zIkoxrrF0qu90ZuuZOdF8ccgxoqEDEBgyOFojfgFJim8eJdQ== X-Received: by 2002:a17:907:685:: with SMTP id wn5mr6516776ejb.285.1600083799791; Mon, 14 Sep 2020 04:43:19 -0700 (PDT) Received: from localhost ([86.61.181.4]) by smtp.gmail.com with ESMTPSA id z23sm7542624eja.29.2020.09.14.04.43.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 04:43:19 -0700 (PDT) Date: Mon, 14 Sep 2020 13:43:18 +0200 From: Jiri Pirko To: Moshe Shemesh Cc: "David S. Miller" , Jakub Kicinski , Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next RFC v4 15/15] devlink: Add Documentation/networking/devlink/devlink-reload.rst Message-ID: <20200914114318.GD2236@nanopsycho.orion> References: <1600063682-17313-1-git-send-email-moshe@mellanox.com> <1600063682-17313-16-git-send-email-moshe@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1600063682-17313-16-git-send-email-moshe@mellanox.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mon, Sep 14, 2020 at 08:08:02AM CEST, moshe@mellanox.com wrote: >Add devlink reload rst documentation file. >Update index file to include it. > >Signed-off-by: Moshe Shemesh >--- >v3 -> v4: >- Remove reload action fw_activate_no_reset >- Add reload actions limit levels and document the no_reset limit level > constrains >v2 -> v3: >- Devlink reload returns the actions done >- Replace fw_live_patch action by fw_activate_no_reset >- Explain fw_activate meaning >v1 -> v2: >- 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 | 80 +++++++++++++++++++ > Documentation/networking/devlink/index.rst | 1 + > 2 files changed, 81 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..6ac9dddd2208 >--- /dev/null >+++ b/Documentation/networking/devlink/devlink-reload.rst >@@ -0,0 +1,80 @@ >+.. 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 selected. >+ >+.. list-table:: Possible reload actions >+ :widths: 5 90 >+ >+ * - Name >+ - Description >+ * - ``driver-reinit`` >+ - Devlink 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. Activates new firmware if such image is stored and >+ pending activation. This action involves firmware reset, if no new image >+ pending this action will reload current firmware image. >+ >+Note that when required to do firmware activation some drivers may need >+to reload the driver. On the other hand some drivers may need to reset s/reload/reinit" ? >+the firmware to reinitialize the driver entities. Therefore, the devlink >+reload command returns the actions which were actually performed. I would perhaps say something more generic like: Note that even though user asks for a specific action, the driver implementation might require to perform another action alongside with it. For example, some driver do not support driver reinitialization being performed without fw activation. Therefore, the devlink reload command return the list of actions which were actrually performed. >+ >+Reload action limit levels >+========================== >+ >+By default reload actions are not limited and Driver implementation may Why capital "D"? >+include reset or downtime as needed to perform the actions. >+ >+However, some drivers support action limit levels, which limits the action >+implementation to specific constrains. >+ >+.. list-table:: Possible reload action limit levels >+ :widths: 5 90 >+ >+ * - Name >+ - Description >+ * - ``no_reset`` >+ - No reset allowed, no down time allowed, no link flap and no >+ configuration is lost. >+ >+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. This sounds like a commit message :) Could you please re-phrase a bit? >+ >+example usage >+------------- >+ >+.. code:: shell >+ >+ $ devlink dev reload help >+ $ devlink dev reload DEV [ netns { PID | NAME | ID } ] [ action { driver_reinit | fw_activate } ] [limit_level no_reset] >+ >+ # Run reload command for devlink driver entities re-initialization: >+ $ devlink dev reload pci/0000:82:00.0 action driver_reinit >+ reload_actions_performed: >+ driver_reinit >+ >+ # Run reload command to activate firmware: >+ # Note that mlx5 driver reloads the driver while activating firmware >+ $ devlink dev reload pci/0000:82:00.0 action fw_activate >+ reload_actions_performed: >+ driver_reinit fw_activate This looks fine to me. >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 >