[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1595847753-2234-14-git-send-email-moshe@mellanox.com>
Date: Mon, 27 Jul 2020 14:02:33 +0300
From: Moshe Shemesh <moshe@...lanox.com>
To: "David S. Miller" <davem@...emloft.net>,
Jiri Pirko <jiri@...lanox.com>,
Vasundhara Volam <vasundhara-v.volam@...adcom.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Moshe Shemesh <moshe@...lanox.com>
Subject: [PATCH net-next RFC 13/13] devlink: Add Documentation/networking/devlink/devlink-reload.rst
Add devlink reload rst documentation file.
Update index file to include it.
Signed-off-by: Moshe Shemesh <moshe@...lanox.com>
---
.../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
Powered by blists - more mailing lists