From: Jacob Keller <jacob.e.keller@intel.com>
To: netdev@vger.kernel.org
Cc: Jiri Pirko <jiri@mellanox.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH 14/17] devlink: rename and expand devlink-trap-netdevsim.rst
Date: Thu, 9 Jan 2020 14:46:22 -0800 [thread overview]
Message-ID: <20200109224625.1470433-15-jacob.e.keller@intel.com> (raw)
In-Reply-To: <20200109224625.1470433-1-jacob.e.keller@intel.com>
Rename the trap-specific netdevimsim.rst file, and expand it to include
documentation of all the devlink features currently implemented by the
netdevsim driver code.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
---
.../devlink/devlink-trap-netdevsim.rst | 20 ------
.../networking/devlink/devlink-trap.rst | 2 +-
Documentation/networking/devlink/index.rst | 2 +-
.../networking/devlink/netdevsim.rst | 72 +++++++++++++++++++
drivers/net/netdevsim/dev.c | 2 +-
5 files changed, 75 insertions(+), 23 deletions(-)
delete mode 100644 Documentation/networking/devlink/devlink-trap-netdevsim.rst
create mode 100644 Documentation/networking/devlink/netdevsim.rst
diff --git a/Documentation/networking/devlink/devlink-trap-netdevsim.rst b/Documentation/networking/devlink/devlink-trap-netdevsim.rst
deleted file mode 100644
index b721c9415473..000000000000
--- a/Documentation/networking/devlink/devlink-trap-netdevsim.rst
+++ /dev/null
@@ -1,20 +0,0 @@
-.. SPDX-License-Identifier: GPL-2.0
-
-======================
-Devlink Trap netdevsim
-======================
-
-Driver-specific Traps
-=====================
-
-.. list-table:: List of Driver-specific Traps Registered by ``netdevsim``
- :widths: 5 5 90
-
- * - Name
- - Type
- - Description
- * - ``fid_miss``
- - ``exception``
- - When a packet enters the device it is classified to a filtering
- indentifier (FID) based on the ingress port and VLAN. This trap is used
- to trap packets for which a FID could not be found
diff --git a/Documentation/networking/devlink/devlink-trap.rst b/Documentation/networking/devlink/devlink-trap.rst
index 03311849bfb1..cbaa750de37d 100644
--- a/Documentation/networking/devlink/devlink-trap.rst
+++ b/Documentation/networking/devlink/devlink-trap.rst
@@ -233,7 +233,7 @@ help debug packet drops caused by these exceptions. The following list includes
links to the description of driver-specific traps registered by various device
drivers:
- * :doc:`devlink-trap-netdevsim`
+ * :doc:`netdevsim`
Generic Packet Trap Groups
==========================
diff --git a/Documentation/networking/devlink/index.rst b/Documentation/networking/devlink/index.rst
index ce0ee563d83a..2417d56e27cc 100644
--- a/Documentation/networking/devlink/index.rst
+++ b/Documentation/networking/devlink/index.rst
@@ -18,7 +18,6 @@ general.
devlink-params
devlink-region
devlink-trap
- devlink-trap-netdevsim
Driver-specific documentation
-----------------------------
@@ -35,6 +34,7 @@ parameters, info versions, and other features it supports.
mlx5
mlxsw
mv88e6xxx
+ netdevsim
nfp
qed
ti-cpsw-switch
diff --git a/Documentation/networking/devlink/netdevsim.rst b/Documentation/networking/devlink/netdevsim.rst
new file mode 100644
index 000000000000..2a266b7e7b38
--- /dev/null
+++ b/Documentation/networking/devlink/netdevsim.rst
@@ -0,0 +1,72 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=========================
+netdevsim devlink support
+=========================
+
+This document describes the ``devlink`` features supported by the
+``netdevsim`` device driver.
+
+Parameters
+==========
+
+.. list-table:: Generic parameters implemented
+
+ * - Name
+ - Mode
+ * - ``max_macs``
+ - driverinit
+
+The ``netdevsim`` driver also implements the following driver-specific
+parameters.
+
+.. list-table:: Driver-specific parameters implemented
+ :widths: 5 5 5 85
+
+ * - Name
+ - Type
+ - Mode
+ - Description
+ * - ``test1``
+ - Boolean
+ - driverinit
+ - Test parameter used to show how a driver-specific devlink parameter
+ can be implemented.
+
+The ``netdevsim`` driver supports reloading via ``DEVLINK_CMD_RELOAD``
+
+Regions
+=======
+
+The ``netdevsim`` driver exposes a ``dummy`` region as an example of how the
+devlink-region interfaces work. A snapshot is taken whenever the
+``take_snapshot`` debugfs file is written to.
+
+Resources
+=========
+
+The ``netdevsim`` driver exposes resources to control the number of FIB
+entries and FIB rule entries that the driver will allow.
+
+.. code:: shell
+
+ $ devlink resource set netdevsim/netdevsim0 path /IPv4/fib size 96
+ $ devlink resource set netdevsim/netdevsim0 path /IPv4/fib-rules size 16
+ $ devlink resource set netdevsim/netdevsim0 path /IPv6/fib size 64
+ $ devlink resource set netdevsim/netdevsim0 path /IPv6/fib-rules size 16
+ $ devlink dev reload netdevsim/netdevsim0
+
+Driver-specific Traps
+=====================
+
+.. list-table:: List of Driver-specific Traps Registered by ``netdevsim``
+ :widths: 5 5 90
+
+ * - Name
+ - Type
+ - Description
+ * - ``fid_miss``
+ - ``exception``
+ - When a packet enters the device it is classified to a filtering
+ indentifier (FID) based on the ingress port and VLAN. This trap is used
+ to trap packets for which a FID could not be found
diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c
index 2eb4ca564745..97922f9834a7 100644
--- a/drivers/net/netdevsim/dev.c
+++ b/drivers/net/netdevsim/dev.c
@@ -287,7 +287,7 @@ struct nsim_trap_data {
};
/* All driver-specific traps must be documented in
- * Documentation/networking/devlink/devlink-trap-netdevsim.rst
+ * Documentation/networking/devlink/netdevsim.rst
*/
enum {
NSIM_TRAP_ID_BASE = DEVLINK_TRAP_GENERIC_ID_MAX,
--
2.25.0.rc1
next prev parent reply other threads:[~2020-01-09 22:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-09 22:46 [PATCH 00/17] devlink documentation refactor Jacob Keller
2020-01-09 22:46 ` [PATCH 01/17] devlink: add macro for "fw.psid" Jacob Keller
2020-01-09 22:46 ` [PATCH 02/17] devlink: move devlink documentation to subfolder Jacob Keller
2020-01-09 22:46 ` [PATCH 03/17] devlink: convert devlink-health.txt to rst format Jacob Keller
2020-01-09 22:46 ` [PATCH 04/17] devlink: rename devlink-info-versions.rst and add a header Jacob Keller
2020-01-09 22:46 ` [PATCH 05/17] devlink: convert devlink-params.txt to reStructuredText Jacob Keller
2020-01-09 22:46 ` [PATCH 06/17] devlink: add documentation for generic devlink parameters Jacob Keller
2020-01-09 22:46 ` [PATCH 07/17] devlink: mention reloading in devlink-params.rst Jacob Keller
2020-01-09 22:46 ` [PATCH 08/17] devlink: convert driver-specific files to reStructuredText Jacob Keller
2020-01-09 22:46 ` [PATCH 09/17] devlink: document info versions for each driver Jacob Keller
2020-01-09 22:46 ` [PATCH 10/17] devlink: add parameter documentation for the mlx4 driver Jacob Keller
2020-01-09 22:46 ` [PATCH 11/17] devlink: add a driver-specific file for the qed driver Jacob Keller
2020-01-14 8:41 ` [EXT] " Michal Kalderon
2020-01-14 20:07 ` Jacob Keller
2020-01-09 22:46 ` [PATCH 12/17] devlink: add a file documenting devlink regions Jacob Keller
2020-01-09 22:46 ` [PATCH 13/17] devlink: add documentation for ionic device driver Jacob Keller
2020-01-09 22:57 ` Shannon Nelson
2020-01-09 22:46 ` Jacob Keller [this message]
2020-01-09 22:46 ` [PATCH 15/17] devlink: add a devlink-resource.rst documentation file Jacob Keller
2020-01-09 22:46 ` [PATCH 16/17] devlink: introduce devlink-dpipe.rst " Jacob Keller
2020-01-09 22:46 ` [PATCH 17/17] devlink: document region snapshot triggering from userspace Jacob Keller
2020-01-11 1:07 ` [PATCH 00/17] devlink documentation refactor David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200109224625.1470433-15-jacob.e.keller@intel.com \
--to=jacob.e.keller@intel.com \
--cc=jakub.kicinski@netronome.com \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).