netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Beckett <bob.beckett@collabora.com>
To: netdev@vger.kernel.org
Cc: Robert Beckett <bob.beckett@collabora.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org
Subject: [PATCH 7/7] dt-bindings: mv88e6xxx: add egress rate limiting
Date: Tue, 10 Sep 2019 16:41:53 +0100	[thread overview]
Message-ID: <20190910154238.9155-8-bob.beckett@collabora.com> (raw)
In-Reply-To: <20190910154238.9155-1-bob.beckett@collabora.com>

Document port egress rate limiting settings.
Add defines for specifying egress rate limiting mode.

Signed-off-by: Robert Beckett <bob.beckett@collabora.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


  parent reply	other threads:[~2019-09-10 15:45 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-10 15:41 [PATCH 0/7] net: dsa: mv88e6xxx: features to handle network storms Robert Beckett
2019-09-10 15:41 ` [PATCH 1/7] net/dsa: configure autoneg for CPU port Robert Beckett
2019-09-10 16:14   ` Vivien Didelot
2019-09-10 16:56   ` Florian Fainelli
2019-09-10 18:26   ` Andrew Lunn
2019-09-10 18:29     ` Florian Fainelli
2019-09-11  9:16       ` Robert Beckett
2019-09-11  9:54         ` Robert Beckett
2019-09-11 22:52         ` Andrew Lunn
2019-09-12 10:14           ` Robert Beckett
2019-09-12 10:43             ` Andrew Lunn
2019-09-11 11:43   ` kbuild test robot
2019-09-14  7:16   ` kbuild test robot
2019-09-10 15:41 ` [PATCH 2/7] net: dsa: mv88e6xxx: add ability to set default queue priorities per port Robert Beckett
2019-09-10 16:43   ` Vivien Didelot
2019-09-10 15:41 ` [PATCH 3/7] dt-bindings: " Robert Beckett
2019-09-10 16:42   ` Florian Fainelli
2019-09-10 16:49     ` Vivien Didelot
2019-09-10 20:46       ` Vladimir Oltean
2019-09-10 15:41 ` [PATCH 4/7] net: dsa: mv88e6xxx: add ability to set queue scheduling Robert Beckett
2019-09-10 17:18   ` Vivien Didelot
2019-09-10 15:41 ` [PATCH 5/7] dt-bindings: " Robert Beckett
2019-09-10 15:41 ` [PATCH 6/7] net: dsa: mv88e6xxx: add egress rate limiting Robert Beckett
2019-09-10 17:13   ` Vivien Didelot
2019-09-11 12:26   ` kbuild test robot
2019-09-10 15:41 ` Robert Beckett [this message]
2019-09-10 16:49 ` [PATCH 0/7] net: dsa: mv88e6xxx: features to handle network storms Florian Fainelli
2019-09-11  9:43   ` Robert Beckett
2019-09-11 11:21   ` Ido Schimmel
2019-09-11 11:49     ` Robert Beckett
2019-09-11 22:58       ` Andrew Lunn
2019-09-12  9:05         ` Ido Schimmel
2019-09-12  9:03       ` Ido Schimmel
2019-09-12  9:21         ` Andrew Lunn
2019-09-12 16:25         ` Florian Fainelli
2019-09-12 16:46           ` Robert Beckett
2019-09-12 17:41             ` Florian Fainelli
2019-09-13 12:47               ` Robert Beckett
2019-09-10 17:19 ` Vivien Didelot
2019-09-11  9:46   ` Robert Beckett
2019-09-11 15:31     ` Vivien Didelot
2019-09-11 23:01     ` Andrew Lunn

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=20190910154238.9155-8-bob.beckett@collabora.com \
    --to=bob.beckett@collabora.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=vivien.didelot@gmail.com \
    /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).