[v1,iproute2 2/2] iproute2: add gate action man page

From: Po Liu
Date: Tue Mar 24 2020 - 00:08:46 EST


Signed-off-by: Po Liu <Po.Liu@xxxxxxx>
---
man/man8/tc-gate.8 | 106 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 106 insertions(+)
create mode 100644 man/man8/tc-gate.8

diff --git a/man/man8/tc-gate.8 b/man/man8/tc-gate.8
new file mode 100644
index 0000000..2b2d101
--- /dev/null
+++ b/man/man8/tc-gate.8
@@ -0,0 +1,106 @@
+.TH GATE 8 "12 Mar 2020" "iproute2" "Linux"
+.SH NAME
+gate \- Stream Gate Action
+.SH SYNOPSIS
+.B tc " ... " action gate
+.ti +8
+.B [ base-time
+BASETIME ]
+.B [ clockid
+CLOCKID ]
+.ti +8
+.B sched-entry
+<gate state> <interval 1> <internal priority> <max octets>
+.ti +8
+.B sched-entry
+<gate state> <interval 2> <internal priority> <max octets>
+.ti +8
+.B sched-entry
+<gate state> <interval 3> <internal priority> <max octets>
+.ti +8
+.B ......
+.ti +8
+.B sched-entry
+<gate state> <interval N> <internal priority> <max octets>
+
+.SH DESCRIPTION
+GATE action would provide a gate list to control when traffic keep
+open/close state. when the gate open state, the flow could pass but
+not when gate state is close. The driver would repeat the gate list
+periodically. User also could assign a time point to start the gate
+list by the basetime parameter. if the basetime has passed current
+time, start time would calculate by the cycletime of the gate list.
+
+.SH PARAMETERS
+
+.TP
+base-time
+.br
+Specifies the instant in nanoseconds, defining the time when the schedule
+starts. If 'base-time' is a time in the past, the schedule will start at
+
+base-time + (N * cycle-time)
+
+where N is the smallest integer so the resulting time is greater than
+"now", and "cycle-time" is the sum of all the intervals of the entries
+in the schedule. Without base-time specified, will default to be 0.
+
+.TP
+clockid
+.br
+Specifies the clock to be used by qdisc's internal timer for measuring
+time and scheduling events. Not valid if using for offloading filter.
+For example, tc filter command with
+.B skip_sw parameter.
+
+.TP
+sched-entry
+.br
+There may multiple
+.B sched-entry
+parameters in a single schedule. Each one has the format:
+
+sched-entry <gate state> <interval> <internal priority> <max octets>
+
+.br
+<gate state> means gate states. 'OPEN' keep gate open, 'CLOSE' keep gate close.
+.br
+<interval> means how much nano seconds for this time slot.
+.br
+<internal priority> means internal priority value. Present of the
+internal receiving queue for this stream. "-1" means wildcard.
+.br
+<max octets> means how many octets size for this time slot. Dropped
+if overlimited. "-1" means wildcard.
+
+.SH EXAMPLES
+
+The following example shows tc filter frames source ip match to the
+192.168.0.20 will be passed at offset time 0 last 200000000ns and will
+be dropped at the offset time 200000000ns and last 100000000ns. Then
+run the gate periodically. The schedule will start at instant 200000000000
+using the reference CLOCK_TAI. The schedule is composed of three entries
+each of 300us duration.
+
+.EX
+# tc filter add dev eth0 parent ffff: protocol ip \\
+ flower skip_hw src_ip 192.168.0.20 \\
+ action gate index 2 clockid CLOCK_TAI \\
+ base-time 200000000000 \\
+ sched-entry OPEN 200000000 -1 -1 \\
+ sched-entry CLOSE 100000000 -1 -1
+
+.EE
+
+Following is an example to filter a stream source mac match to the
+10:00:80:00:00:00 will be dropped at any time.
+
+.EX
+#tc filter add dev eth0 parent ffff: protocol ip chain 14 \\
+ flower skip_sw dst_mac 10:00:80:00:00:00 \\
+ action gate index 12 sched-entry close 200000000 -1 -1
+
+.EE
+
+.SH AUTHORS
+Po Liu <Po.Liu@xxxxxxx>
--
2.17.1