]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Documentation: Add description of netdevsim traps
authorIdo Schimmel <idosch@mellanox.com>
Sat, 17 Aug 2019 13:28:21 +0000 (16:28 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Aug 2019 19:40:09 +0000 (12:40 -0700)
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/devlink-trap-netdevsim.rst [new file with mode: 0644]
Documentation/networking/devlink-trap.rst
Documentation/networking/index.rst
drivers/net/netdevsim/dev.c

diff --git a/Documentation/networking/devlink-trap-netdevsim.rst b/Documentation/networking/devlink-trap-netdevsim.rst
new file mode 100644 (file)
index 0000000..b721c94
--- /dev/null
@@ -0,0 +1,20 @@
+.. 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
index dbc7a3e00fd83f0c2589ad1366bd03ffa3d6c2af..fe4f6e149623f385c9f71b6c3b752236dbf9aa62 100644 (file)
@@ -162,6 +162,17 @@ be added to the following table:
      - Traps packets that the device decided to drop because they could not be
        enqueued to a transmission queue which is full
 
+Driver-specific Packet Traps
+============================
+
+Device drivers can register driver-specific packet traps, but these must be
+clearly documented. Such traps can correspond to device-specific exceptions and
+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`
+
 Generic Packet Trap Groups
 ==========================
 
index 86a814e4d4507652bab2066ef1219df183b86017..37eabc17894cde7c7c132035411a00009c00420c 100644 (file)
@@ -15,6 +15,7 @@ Contents:
    dsa/index
    devlink-info-versions
    devlink-trap
+   devlink-trap-netdevsim
    ieee802154
    kapi
    z8530book
index d07bbf0ab627c7cb2c9aefeb6051e5f7a62caba8..c217049552f7be3e7cd46021a9d312a4e01a3e9d 100644 (file)
@@ -323,6 +323,9 @@ struct nsim_trap_data {
        spinlock_t trap_lock;   /* Protects trap_items_arr */
 };
 
+/* All driver-specific traps must be documented in
+ * Documentation/networking/devlink-trap-netdevsim.rst
+ */
 enum {
        NSIM_TRAP_ID_BASE = DEVLINK_TRAP_GENERIC_ID_MAX,
        NSIM_TRAP_ID_FID_MISS,