lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 20 Jun 2022 18:26:47 +0300
From:   Dima Chumak <dchumak@...dia.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     Jiri Pirko <jiri@...dia.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>, <netdev@...r.kernel.org>,
        Dima Chumak <dchumak@...dia.com>
Subject: [PATCH net-next 5/5] Documentation: devlink rate objects limit_type

Add devlink rate limit_type attribute information in devlink port
documentation.
Add devlink rate 'limit_type police' attributes in netdevsim devlink
documentation.

Signed-off-by: Dima Chumak <dchumak@...dia.com>
---
 .../networking/devlink/devlink-port.rst       | 44 +++++++++++++++++--
 .../networking/devlink/netdevsim.rst          |  3 +-
 2 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/Documentation/networking/devlink/devlink-port.rst b/Documentation/networking/devlink/devlink-port.rst
index 7627b1da01f2..c2cd97a4ec4f 100644
--- a/Documentation/networking/devlink/devlink-port.rst
+++ b/Documentation/networking/devlink/devlink-port.rst
@@ -184,20 +184,58 @@ This is done through rate objects, which can be one of the two types:
 
 API allows to configure following rate object's parameters:
 
+``limit_type``
+  Type of rate limiting performed by a rate object. Supported types are
+  ``shaping`` and ``police``. Shaping type is a form of back pressure mechanism
+  that can delay traffic until there is a capacity, available at the lower
+  level, to process it. Police type is a simple packet counting and immediate
+  dropping of those packets that exceed the threshold. Some of the parameters
+  may be specific only to one of the limit types.
+
 ``tx_share``
   Minimum TX rate value shared among all other rate objects, or rate objects
-  that parts of the parent group, if it is a part of the same group.
+  that parts of the parent group, if it is a part of the same group. Specific to
+  ``shaping`` limit type.
 
 ``tx_max``
   Maximum TX rate value.
 
+``tx_burst``
+  Size of a bucket that's used to buffer spikes when traffic exceeds ``tx_max``
+  limit. Specific to ``police`` limit type.
+
+``rx_max``
+  Maximum RX rate value.
+
+``rx_burst``
+  Size of a bucket that's used to buffer spikes when traffic exceeds ``rx_max``
+  limit. Specific to ``police`` limit type.
+
+``tx_pkts``
+  Maximum TX rate in packets per second.
+
+``tx_pkts_burst``
+  Size of a bucket that's used to buffer spikes when traffic exceeds ``tx_pkts``
+  limit. Specific to ``police`` limit type.
+
+``rx_pkts``
+  Maximum RX rate in packets per second.
+
+``rx_pkts_burst``
+  Size of a bucket that's used to buffer spikes when traffic exceeds ``rx_pkts``
+  limit. Specific to ``police`` limit type.
+
 ``parent``
   Parent node name. Parent node rate limits are considered as additional limits
   to all node children limits. ``tx_max`` is an upper limit for children.
-  ``tx_share`` is a total bandwidth distributed among children.
+  ``tx_share`` is a total bandwidth distributed among children. It's important
+  that ``limit_type`` of a child object and the parent node should match. In
+  other words, it's only possible to group rate objects of the same
+  ``limit_type``.
 
 Driver implementations are allowed to support both or either rate object types
-and setting methods of their parameters.
+and setting methods of their parameters. The same holds for limit types, a
+driver implementation may support all or only some of them.
 
 Terms and Definitions
 =====================
diff --git a/Documentation/networking/devlink/netdevsim.rst b/Documentation/networking/devlink/netdevsim.rst
index 8a292fb5aaea..32d3171ff281 100644
--- a/Documentation/networking/devlink/netdevsim.rst
+++ b/Documentation/networking/devlink/netdevsim.rst
@@ -64,7 +64,8 @@ The ``netdevsim`` driver supports rate objects management, which includes:
 
 - registerging/unregistering leaf rate objects per VF devlink port;
 - creation/deletion node rate objects;
-- setting tx_share and tx_max rate values for any rate object type;
+- setting limit_type, tx_share, tx_max, tx_burst, rx_max, rx_burst, tx_pkts,
+  tx_pkts_burst, rx_pkts and rx_pkts_burst rate values for any rate object type;
 - setting parent node for any rate object type.
 
 Rate nodes and it's parameters are exposed in ``netdevsim`` debugfs in RO mode.
-- 
2.36.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ