[PATCH net-next V3 03/10] devlink: Add dump to resource documentation

Tariq Toukan posted 10 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH net-next V3 03/10] devlink: Add dump to resource documentation
Posted by Tariq Toukan 1 month, 1 week ago
From: Or Har-Toov <ohartoov@nvidia.com>

Add dump documentation for resource command.
Resource dump command allow viewing resources
for all devices as a list.

Signed-off-by: Or Har-Toov <ohartoov@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 .../networking/devlink/devlink-resource.rst   | 24 +++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/Documentation/networking/devlink/devlink-resource.rst b/Documentation/networking/devlink/devlink-resource.rst
index 3d5ae51e65a2..b4203c498bf2 100644
--- a/Documentation/networking/devlink/devlink-resource.rst
+++ b/Documentation/networking/devlink/devlink-resource.rst
@@ -40,11 +40,31 @@ device drivers and their description must be added to the following table:
 example usage
 -------------
 
-The resources exposed by the driver can be observed, for example:
+The resources exposed by the driver can be observed.
+
+To list resources for all devlink devices that have resources registered:
 
 .. code:: shell
 
-    $devlink resource show pci/0000:03:00.0
+    $ devlink resource show
+    pci/0000:03:00.0:
+      name kvd size 245760 unit entry
+        resources:
+          name linear size 98304 occ 0 unit entry size_min 0 size_max 147456 size_gran 128
+          name hash_double size 60416 unit entry size_min 32768 size_max 180224 size_gran 128
+          name hash_single size 87040 unit entry size_min 65536 size_max 212992 size_gran 128
+    pci/0000:04:00.0:
+      name kvd size 245760 unit entry
+        resources:
+          name linear size 98304 occ 0 unit entry size_min 0 size_max 147456 size_gran 128
+          name hash_double size 60416 unit entry size_min 32768 size_max 180224 size_gran 128
+          name hash_single size 87040 unit entry size_min 65536 size_max 212992 size_gran 128
+
+To show resources for a specific device:
+
+.. code:: shell
+
+    $ devlink resource show pci/0000:03:00.0
     pci/0000:03:00.0:
       name kvd size 245760 unit entry
         resources:
-- 
2.44.0