[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190910154238.9155-8-bob.beckett@collabora.com>
Date: Tue, 10 Sep 2019 16:41:53 +0100
From: Robert Beckett <bob.beckett@...labora.com>
To: netdev@...r.kernel.org
Cc: Robert Beckett <bob.beckett@...labora.com>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>, devicetree@...r.kernel.org
Subject: [PATCH 7/7] dt-bindings: mv88e6xxx: add egress rate limiting
Document port egress rate limiting settings.
Add defines for specifying egress rate limiting mode.
Signed-off-by: Robert Beckett <bob.beckett@...labora.com>
---
.../devicetree/bindings/net/dsa/marvell.txt | 22 +++++++++++++++++++
include/dt-bindings/net/dsa-mv88e6xxx.h | 5 +++++
2 files changed, 27 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/dsa/marvell.txt b/Documentation/devicetree/bindings/net/dsa/marvell.txt
index 7de90929c3c9..d33c1958f420 100644
--- a/Documentation/devicetree/bindings/net/dsa/marvell.txt
+++ b/Documentation/devicetree/bindings/net/dsa/marvell.txt
@@ -62,6 +62,28 @@ Optional properties for ports:
MV88E6XXX_PORT_SCHED_STRICT_ALL - All queues use
strict priority, where queues drain in descending
queue number order.
+- egress-limit-mode=<n> : Set port egress rate limiting mode. Valid values are:
+ MV88E6XXX_PORT_EGRESS_COUNT_MODE_FRAMES - Count layer
+ 2 frames (assumed to be 64kb).
+ MV88E6XXX_PORT_EGRESS_COUNT_MODE_L1 - Count all layer
+ 1 bits
+ MV88E6XXX_PORT_EGRESS_COUNT_MODE_L2 - Count all layer
+ 2 bits
+ MV88E6XXX_PORT_EGRESS_COUNT_MODE_L3 - Count all layer
+ 3 bits
+ Must also specify egress-limit-count.
+- egress-limit-count=<n>: Set port egress rate limiting count. If
+ egress-limit-mode is FRAMES, this specifies the
+ maximum number of ethernet frames to allow to egress
+ from this port per second, otherwise it is number of
+ bits as counted based on the mode allowed to egress
+ from this port per second.
+ The HW has limitations which the driver adheres to:
+ between 64 Kbps to 1 Mbps in 16 Kbps increments
+ between 1 Mbps to 100 Mbps in 1Mbps increments
+ between 100 Mbps to 1 Gbps in 10 Mbps increments.
+ Other values will be rounded down the previous
+ increment.
Example:
diff --git a/include/dt-bindings/net/dsa-mv88e6xxx.h b/include/dt-bindings/net/dsa-mv88e6xxx.h
index 3f62003841ce..33ecd94f5e22 100644
--- a/include/dt-bindings/net/dsa-mv88e6xxx.h
+++ b/include/dt-bindings/net/dsa-mv88e6xxx.h
@@ -9,6 +9,11 @@
#ifndef _DT_BINDINGS_MV88E6XXX_H
#define _DT_BINDINGS_MV88E6XXX_H
+#define MV88E6XXX_PORT_EGRESS_COUNT_MODE_FRAMES 0
+#define MV88E6XXX_PORT_EGRESS_COUNT_MODE_L1 1
+#define MV88E6XXX_PORT_EGRESS_COUNT_MODE_L2 2
+#define MV88E6XXX_PORT_EGRESS_COUNT_MODE_L3 3
+
#define MV88E6XXX_PORT_SCHED_ROUND_ROBIN 0
#define MV88E6XXX_PORT_SCHED_STRICT_3 1
#define MV88E6XXX_PORT_SCHED_STRICT_3_2 2
--
2.18.0
Powered by blists - more mailing lists