Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1918350pxk; Sat, 3 Oct 2020 02:16:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz35MNMLDsVnvzFLE8NuPU/ZXp/O8seAWiOwX0kYzY7v8G0pZcCUNZg6z/7+E7blTNLg51S X-Received: by 2002:a17:906:8311:: with SMTP id j17mr1313933ejx.132.1601716579670; Sat, 03 Oct 2020 02:16:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601716579; cv=none; d=google.com; s=arc-20160816; b=uhcZLZ6JiwkkfATpbYYfwi8RGHaP0vtSY+urvwxxX6APQoOmTZjwoowElDwSBiUdpQ zDfCvyqU4TqanucwBLG0BQOrI1jXFFpRxFNn0vdJH4OMSkOpbhQNV6O4INbW7zjx/avz URxSbG41zA4qL0NRm2LKkL3AQQRfE5ghoxMtBMoSXV3f/m/ZheA9ZjBB7LCfpCREJ9nq OyEPc1tjpcwYrEBfY25t20dUGyeaVYMBRl9bBJCnyNeO/lZNRJtsSowNiSmFUYeRcw8y ucLBYreaR9OrZXejURsPxFG7XaibAfyPBbQeFnGHohqHNCpTNLw+++Z31v/+Afn7K5gk nkhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dE+mp6CvJ+Rm67MjVF3KVatmX9kZjm6IJMWnD9PC+yo=; b=SKuBrnNIwDNoJmSsI3ioGEHwAyCsJxEK3/xS2gzZVYo7ADkMVMM8Wk1FS81X6/1BAu E/SGXpIvuL33F2wh4g6z4Xf2YLi9a2Mo5fvruBK7gEKZP8Oq9nmOoY2LxvWRT2cImnSJ QKqtY1Mi5mTMbdhiMhkTA2Cz266er8mNmDbpR3vdUGX2nYCp2O0JyeSuT9xWAPz/PoDh koqq7pj98F/YV80+qR5kYZ5j1nVYxGBlDn5IBDmxWWY8NPoKgwyD17B8KLoRDvXo8TM6 GPvxADXeqcNR8/NR7wzrUNqIpAcJ25ouiLurC/rsaHwDpJfrtI5BxvhvKZA8LvwOhirs CqPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=pvVAMnUM; 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 dk22si2608466edb.258.2020.10.03.02.15.56; Sat, 03 Oct 2020 02:16:19 -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=pvVAMnUM; 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 S1725793AbgJCJOd (ORCPT + 99 others); Sat, 3 Oct 2020 05:14:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725763AbgJCJOd (ORCPT ); Sat, 3 Oct 2020 05:14:33 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A827C0613D0 for ; Sat, 3 Oct 2020 02:14:33 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id j2so4325745wrx.7 for ; Sat, 03 Oct 2020 02:14:33 -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=dE+mp6CvJ+Rm67MjVF3KVatmX9kZjm6IJMWnD9PC+yo=; b=pvVAMnUMKp2KDA/SvropcJLIVKfuhBCs0iTd6+Rg7CC2cEGn0M5BN6FF63WOnS3dzX Fj2gx0Xr+MyJ3thn/RzIWYRpHbUuG7AYfvhU3Zn9/X4rJs7xmHD2DvtgPQkATYEnZ0vh SLlykEhwsX9BYXEE9NJdhAapvQX7X5xJDC7SMevirOiQNrDQNAMGyq0xaxf/JcQwMlRG TXwUXsMeh7cTIifZDLA3aHm/1UnQP9yRaiL80tzINxbs9iEkUxUoKEqQ0zhyqa/YpG7w K7XD12I76DPTpge5m/FnunVJEvaITjyFco8Os1YW2QrJ9wI/Z0ysvyszoB8b4CF728Dc Aukg== 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=dE+mp6CvJ+Rm67MjVF3KVatmX9kZjm6IJMWnD9PC+yo=; b=aQNhqPpdDchG67OJdvaEJ68K806COV/TRjGGckUXc6U2eEvHVmrd/tilc5o28dtO4I R8kHOuBurLw2xgHfc85k4+KCxwqky9Q7CUKe+O0x1wdpjalTArYTpCLfDcp4XcYw6/Jd C57TlKaCLyBce2BlvXpoplPpzugM714Crr6NYQe251ftZ7w1W9ffYug+qVMYrI2ERWEN pqK45zDUXwbPd02tB+KYAsKIe1e0pbjGw45cbMBLc9+qsIMbCgY+YxESaiH1C5fJna4m mFA76ZWkQMZDdHS0S0SA4nlp/UYRaZlAojp90O6DBko6JQUvwHD1zBMfRTHFfTgFVPWD Hi1Q== X-Gm-Message-State: AOAM532PAVWyixLYRIHTZZhHq8rDGh9VQOYFLXhcohoQwkniF8EpyybF C1J9Z64UYdBKTv8od4aiDMsmOQHYQY3lta7x X-Received: by 2002:a5d:55c8:: with SMTP id i8mr7367543wrw.331.1601716471969; Sat, 03 Oct 2020 02:14:31 -0700 (PDT) Received: from localhost ([86.61.181.4]) by smtp.gmail.com with ESMTPSA id v128sm4483721wme.2.2020.10.03.02.14.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 02:14:31 -0700 (PDT) Date: Sat, 3 Oct 2020 11:14:30 +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 16/16] devlink: Add Documentation/networking/devlink/devlink-reload.rst Message-ID: <20201003091430.GG3159@nanopsycho.orion> References: <1601560759-11030-1-git-send-email-moshe@mellanox.com> <1601560759-11030-17-git-send-email-moshe@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1601560759-11030-17-git-send-email-moshe@mellanox.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thu, Oct 01, 2020 at 03:59:19PM CEST, moshe@mellanox.com wrote: >Add devlink reload rst documentation file. >Update index file to include it. > >Signed-off-by: Moshe Shemesh >--- >RFCv5 -> v1: >- Rename reload_action_limit_level to reload_limit >RFCv4 -> RFCv5: >- Rephrase namespace chnage section >- Rephrase note on actions performed >RFCv3 -> RFCv4: >- Remove reload action fw_activate_no_reset >- Add reload actions limit levels and document the no_reset limit level > constrains >RFCv2 -> RFCv3: >- Devlink reload returns the actions done >- Replace fw_live_patch action by fw_activate_no_reset >- Explain fw_activate meaning >RFCv1 -> RFCv2: >- 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 | 81 +++++++++++++++++++ > Documentation/networking/devlink/index.rst | 1 + > 2 files changed, 82 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..5abc5c2c75fd >--- /dev/null >+++ b/Documentation/networking/devlink/devlink-reload.rst >@@ -0,0 +1,81 @@ >+.. SPDX-License-Identifier: GPL-2.0 >+ >+============== >+Devlink Reload No reason for capital "R". >+============== >+ >+``devlink-reload`` provides mechanism to either reinit driver entities, >+applying ``devlink-params`` and ``devlink-resources`` new values or firmware >+activation depends on reload action selected. Could you perhaps split the sentense? It is hard to read. >+ >+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. If no limitation specified this action may involve >+ firmware reset. If no new image pending this action will reload current >+ firmware image. >+ >+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 returns the list of actions which were actrually performed. >+ >+Reload limits >+============= >+ >+By default reload actions are not limited and driver implementation may >+include reset or downtime as needed to perform the actions. >+ >+However, some drivers support action limits, which limit the action >+implementation to specific constrains. >+ >+.. list-table:: Possible reload limits >+ :widths: 5 90 >+ >+ * - Name >+ - Description >+ * - ``no_reset`` >+ - No reset allowed, no down time allowed, no link flap and no >+ configuration is lost. >+ >+Change namespace >+================ >+ >+The netns option allow user to be able to move devlink instances into "allows" >+namespaces during devlink reload operation. >+By default all devlink instances are created in init_net and stay there. >+ >+example usage >+------------- >+ >+.. code:: shell >+ >+ $ devlink dev reload help >+ $ devlink dev reload DEV [ netns { PID | NAME | ID } ] [ action { driver_reinit | fw_activate } ] [ limit 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 >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.18.2 >