Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4745417pjb; Mon, 27 Jul 2020 04:11:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQKlr5UBRQROYaV7n6vhEIqlt1ZJ5wHMXEmy025l15Qhvr5fwm239AxxoRo1s33Ylt+xPW X-Received: by 2002:a17:906:7e4e:: with SMTP id z14mr5486465ejr.87.1595848267668; Mon, 27 Jul 2020 04:11:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595848267; cv=none; d=google.com; s=arc-20160816; b=BeouYHUKfW0UIBa4Ssfi0Ty5yV7y6DAdAxVi2C5kdULSXgGdk93+gXuuQFFgpLGEXO ljTibetyGNxZYR/nd7Wlubo+wv33PnAHuWErNxShm6KMFPJ1aPdIAMmRqQYjGJ5UObKE Zu6P5lijvIK/NgfW1mu5y/PfT9IaKo8+DrjQs7J/yW0R7v8YGuUAhVHHPLvH6TQ6RyKu f1nJSyqG2+sq4+MugDY8SQ0ybYzgRt0sTBNMnN/PAUzUV4tSW19FMBCjG1W8szcMcV44 RwFnCy8ZU+2CTYFlOyvy1YeiWpRKa1eo9Er1swQuX70PHrm+XyNgGnOcIp8Sg00P+Ka1 6loA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=SNO9gZY2EBjuja+33VS1mFslz0Yd/xmftNv1oFdZiWs=; b=czwN+pzu/MxGduCs4IMDeWrqAMGHgiy+zMSfFNiIt29Wr1YTDNt8lpNuCUB5lX7MRf T/HT4atZX6VgCJduLuV/MES6nl3Ti9oEzsQtBIx2yrYpUNQRy7WJXdwRv6Ge36hnqg5W /c60LsLLDIvISeJRbjwLI9wmiX1LAnCBsOUXm5Y2YJnlY00BKzMh0A5Xw6Or/Z+qHywt g6Di9beUC2QwWjR2APyG41XWs7WhgZg90nvJZ74P1c5jvLJD9f9nyIXznyY4ajpwdmfu GAyto/jQL0PAf5P4BedmMgeHDidZpTCjmgmX4V6ODm3TDYeeZSI6modBCEe3BpQdWOX3 e5Tw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bf5si3313564edb.155.2020.07.27.04.10.45; Mon, 27 Jul 2020 04:11:07 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728678AbgG0LHO (ORCPT + 99 others); Mon, 27 Jul 2020 07:07:14 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:40720 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728544AbgG0LGR (ORCPT ); Mon, 27 Jul 2020 07:06:17 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from moshe@mellanox.com) with SMTP; 27 Jul 2020 14:06:14 +0300 Received: from dev-l-vrt-135.mtl.labs.mlnx (dev-l-vrt-135.mtl.labs.mlnx [10.234.135.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 06RB6E8t022257; Mon, 27 Jul 2020 14:06:14 +0300 Received: from dev-l-vrt-135.mtl.labs.mlnx (localhost [127.0.0.1]) by dev-l-vrt-135.mtl.labs.mlnx (8.15.2/8.15.2/Debian-10) with ESMTP id 06RB6Ef6002408; Mon, 27 Jul 2020 14:06:14 +0300 Received: (from moshe@localhost) by dev-l-vrt-135.mtl.labs.mlnx (8.15.2/8.15.2/Submit) id 06RB6EJV002407; Mon, 27 Jul 2020 14:06:14 +0300 From: Moshe Shemesh To: "David S. Miller" , Jiri Pirko , Vasundhara Volam Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Moshe Shemesh Subject: [PATCH net-next RFC 13/13] devlink: Add Documentation/networking/devlink/devlink-reload.rst Date: Mon, 27 Jul 2020 14:02:33 +0300 Message-Id: <1595847753-2234-14-git-send-email-moshe@mellanox.com> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1595847753-2234-1-git-send-email-moshe@mellanox.com> References: <1595847753-2234-1-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 Add devlink reload rst documentation file. Update index file to include it. Signed-off-by: Moshe Shemesh --- .../networking/devlink/devlink-reload.rst | 56 +++++++++++++++++++ Documentation/networking/devlink/index.rst | 1 + 2 files changed, 57 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..092574229bab --- /dev/null +++ b/Documentation/networking/devlink/devlink-reload.rst @@ -0,0 +1,56 @@ +.. SPDX-License-Identifier: GPL-2.0 + +============== +Devlink Reload +============== + +``devlink-reload`` provides mechanism to reload either driver or firmware or both, +depends on reload level selected. +The driver reload is used to re-initiate driver's entities, including applying +new values to ``devlink`` entities which are used during driver load, such as +``devlink-params`` in configuration mode ``driverinit`` or ``devlink-resources``. +The firmware reload is used either to reset the firmware or upgrade the firmware +if new firmware is already stored and waiting to be activated. +Some driver's may support fw_live_patch which will do firmware upgrade, +applying changes without the need for reset. + +Reload levels +============= + +Reload may be set in different reload levels. + +.. list-table:: Possible reload levels + :widths: 5 90 + + * - Name + - Description + * - ``driver`` + - Driver entities re-instantiation only. + * - ``fw_reset`` + - Firmware reset and driver entities re-instantiation. Can be used for + firmware upgrade if new firmware is stored and driver supports such + firmware upgrade. + * - ``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 } ] [ level { driver | fw_reset | fw_live_patch } ] + + # Run reload command with driver's default level: + $ devlink dev reload pci/0000:82:00.0 + + # Run reload command with fw_reset level: + $ devlink dev reload pci/0000:82:00.0 level fw_reset 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