|
|
d8fb9e |
From 716aa9141156b5284679b40545e20c7164957bf3 Mon Sep 17 00:00:00 2001
|
|
|
d8fb9e |
From: Andrea Claudi <aclaudi@redhat.com>
|
|
|
d8fb9e |
Date: Tue, 21 Apr 2020 14:32:49 +0200
|
|
|
d8fb9e |
Subject: [PATCH] man: Add initial manpage for tc-cbs(8)
|
|
|
d8fb9e |
|
|
|
d8fb9e |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1557461
|
|
|
d8fb9e |
Upstream Status: iproute2.git commit d65298892062e
|
|
|
d8fb9e |
|
|
|
d8fb9e |
commit d65298892062e8757e94d36f23fe3ea835ff66dc
|
|
|
d8fb9e |
Author: Vinicius Costa Gomes <vinicius.gomes@intel.com>
|
|
|
d8fb9e |
Date: Thu Oct 26 10:17:49 2017 -0700
|
|
|
d8fb9e |
|
|
|
d8fb9e |
man: Add initial manpage for tc-cbs(8)
|
|
|
d8fb9e |
|
|
|
d8fb9e |
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
|
|
|
d8fb9e |
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
|
|
d8fb9e |
---
|
|
|
d8fb9e |
man/man8/tc-cbs.8 | 112 ++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
d8fb9e |
1 file changed, 112 insertions(+)
|
|
|
d8fb9e |
create mode 100644 man/man8/tc-cbs.8
|
|
|
d8fb9e |
|
|
|
d8fb9e |
diff --git a/man/man8/tc-cbs.8 b/man/man8/tc-cbs.8
|
|
|
d8fb9e |
new file mode 100644
|
|
|
d8fb9e |
index 0000000000000..97e00c84ded16
|
|
|
d8fb9e |
--- /dev/null
|
|
|
d8fb9e |
+++ b/man/man8/tc-cbs.8
|
|
|
d8fb9e |
@@ -0,0 +1,112 @@
|
|
|
d8fb9e |
+.TH CBS 8 "18 Sept 2017" "iproute2" "Linux"
|
|
|
d8fb9e |
+.SH NAME
|
|
|
d8fb9e |
+CBS \- Credit Based Shaper (CBS) Qdisc
|
|
|
d8fb9e |
+.SH SYNOPSIS
|
|
|
d8fb9e |
+.B tc qdisc ... dev
|
|
|
d8fb9e |
+dev
|
|
|
d8fb9e |
+.B parent
|
|
|
d8fb9e |
+classid
|
|
|
d8fb9e |
+.B [ handle
|
|
|
d8fb9e |
+major:
|
|
|
d8fb9e |
+.B ] cbs idleslope
|
|
|
d8fb9e |
+idleslope
|
|
|
d8fb9e |
+.B sendslope
|
|
|
d8fb9e |
+sendslope
|
|
|
d8fb9e |
+.B hicredit
|
|
|
d8fb9e |
+hicredit
|
|
|
d8fb9e |
+.B locredit
|
|
|
d8fb9e |
+locredit
|
|
|
d8fb9e |
+.B [ offload
|
|
|
d8fb9e |
+0|1
|
|
|
d8fb9e |
+.B ]
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+.SH DESCRIPTION
|
|
|
d8fb9e |
+The CBS (Credit Based Shaper) qdisc implements the shaping algorithm
|
|
|
d8fb9e |
+defined by the IEEE 802.1Q-2014 Section 8.6.8.2, which applies a well
|
|
|
d8fb9e |
+defined rate limiting method to the traffic.
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+This queueing discipline is intended to be used by TSN (Time Sensitive
|
|
|
d8fb9e |
+Networking) applications, the CBS parameters are derived directly by
|
|
|
d8fb9e |
+what is described by the Annex L of the IEEE 802.1Q-2014
|
|
|
d8fb9e |
+Sepcification. The algorithm and how it affects the latency are
|
|
|
d8fb9e |
+detailed there.
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+CBS is meant to be installed under another qdisc that maps packet
|
|
|
d8fb9e |
+flows to traffic classes, one example is
|
|
|
d8fb9e |
+.BR mqprio(8).
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+.SH PARAMETERS
|
|
|
d8fb9e |
+.TP
|
|
|
d8fb9e |
+idleslope
|
|
|
d8fb9e |
+Idleslope is the rate of credits that is accumulated (in kilobits per
|
|
|
d8fb9e |
+second) when there is at least one packet waiting for transmission.
|
|
|
d8fb9e |
+Packets are transmitted when the current value of credits is equal or
|
|
|
d8fb9e |
+greater than zero. When there is no packet to be transmitted the
|
|
|
d8fb9e |
+amount of credits is set to zero. This is the main tunable of the CBS
|
|
|
d8fb9e |
+algorithm.
|
|
|
d8fb9e |
+.TP
|
|
|
d8fb9e |
+sendslope
|
|
|
d8fb9e |
+Sendslope is the rate of credits that is depleted (it should be a
|
|
|
d8fb9e |
+negative number of kilobits per second) when a transmission is
|
|
|
d8fb9e |
+ocurring. It can be calculated as follows, (IEEE 802.1Q-2014 Section
|
|
|
d8fb9e |
+8.6.8.2 item g):
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+sendslope = idleslope - port_transmit_rate
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+.TP
|
|
|
d8fb9e |
+hicredit
|
|
|
d8fb9e |
+Hicredit defines the maximum amount of credits (in bytes) that can be
|
|
|
d8fb9e |
+accumulated. Hicredit depends on the characteristics of interfering
|
|
|
d8fb9e |
+traffic, 'max_interference_size' is the maximum size of any burst of
|
|
|
d8fb9e |
+traffic that can delay the transmission of a frame that is available
|
|
|
d8fb9e |
+for transmission for this traffic class, (IEEE 802.1Q-2014 Annex L,
|
|
|
d8fb9e |
+Equation L-3):
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+hicredit = max_interference_size * (idleslope / port_transmit_rate)
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+.TP
|
|
|
d8fb9e |
+locredit
|
|
|
d8fb9e |
+Locredit is the minimum amount of credits that can be reached. It is a
|
|
|
d8fb9e |
+function of the traffic flowing through this qdisc (IEEE 802.1Q-2014
|
|
|
d8fb9e |
+Annex L, Equation L-2):
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+locredit = max_frame_size * (sendslope / port_transmit_rate)
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+.TP
|
|
|
d8fb9e |
+offload
|
|
|
d8fb9e |
+When
|
|
|
d8fb9e |
+.B offload
|
|
|
d8fb9e |
+is 1,
|
|
|
d8fb9e |
+.BR cbs(8)
|
|
|
d8fb9e |
+will try to configure the network interface so the CBS algorithm runs
|
|
|
d8fb9e |
+in the controller. The default is 0.
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+.SH EXAMPLES
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+CBS is used to enforce a Quality of Service by limiting the data rate
|
|
|
d8fb9e |
+of a traffic class, to separate packets into traffic classes the user
|
|
|
d8fb9e |
+may choose
|
|
|
d8fb9e |
+.BR mqprio(8),
|
|
|
d8fb9e |
+and configure it like this:
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+.EX
|
|
|
d8fb9e |
+# tc qdisc add dev eth0 handle 100: parent root mqprio num_tc 3 \\
|
|
|
d8fb9e |
+ map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \\
|
|
|
d8fb9e |
+ queues 1@0 1@1 2@2 \\
|
|
|
d8fb9e |
+ hw 0
|
|
|
d8fb9e |
+.EE
|
|
|
d8fb9e |
+.P
|
|
|
d8fb9e |
+To replace the current queuing disciple by CBS in the current queueing
|
|
|
d8fb9e |
+discipline connected to traffic class number 0, issue:
|
|
|
d8fb9e |
+.P
|
|
|
d8fb9e |
+.EX
|
|
|
d8fb9e |
+# tc qdisc replace dev eth0 parent 100:4 cbs \\
|
|
|
d8fb9e |
+ locredit -1470 hicredit 30 sendslope -980000 idleslope 20000
|
|
|
d8fb9e |
+.EE
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+These values are obtained from the following parameters, idleslope is
|
|
|
d8fb9e |
+20mbit/s, the transmission rate is 1Gbit/s and the maximum interfering
|
|
|
d8fb9e |
+frame size is 1500 bytes.
|
|
|
d8fb9e |
+
|
|
|
d8fb9e |
+.SH AUTHORS
|
|
|
d8fb9e |
+Vinicius Costa Gomes <vinicius.gomes@intel.com>
|
|
|
d8fb9e |
--
|
|
|
d8fb9e |
2.25.3
|
|
|
d8fb9e |
|