naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone

Blame SOURCES/0165-tc-man-Add-man-entry-for-the-matchall-classifier.patch

4aca6e
From 5dccfc9ce00b980b81fea7204b5764544a895f0e Mon Sep 17 00:00:00 2001
4aca6e
From: Ivan Vecera <ivecera@redhat.com>
4aca6e
Date: Wed, 31 May 2017 15:43:43 +0200
4aca6e
Subject: [PATCH 165/169] tc: man: Add man entry for the matchall classifier.
4aca6e
4aca6e
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1435624
4aca6e
Upstream status: iproute2.git commit 0501294bca39a
4aca6e
4aca6e
commit 0501294bca39a19090dae302dc491684470b1a0d
4aca6e
Author: Yotam Gigi <yotamg@mellanox.com>
4aca6e
Date:   Wed Aug 31 09:28:27 2016 +0200
4aca6e
4aca6e
    tc: man: Add man entry for the matchall classifier.
4aca6e
4aca6e
    In addition to providing information about the mathcall filter and its
4aca6e
    configurations, the man entry contains examples for creating port
4aca6e
    mirorring entries.
4aca6e
4aca6e
    Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
4aca6e
    Signed-off-by: Jiri Pirko <jiri@mellanox.com>
4aca6e
4aca6e
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
4aca6e
---
4aca6e
 man/man8/Makefile      |  2 +-
4aca6e
 man/man8/tc-matchall.8 | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++
4aca6e
 man/man8/tc.8          |  5 ++++
4aca6e
 3 files changed, 82 insertions(+), 1 deletion(-)
4aca6e
 create mode 100644 man/man8/tc-matchall.8
4aca6e
4aca6e
diff --git a/man/man8/Makefile b/man/man8/Makefile
4aca6e
index 8d73f1ea..93b4cdc9 100644
4aca6e
--- a/man/man8/Makefile
4aca6e
+++ b/man/man8/Makefile
4aca6e
@@ -12,7 +12,7 @@ MAN8PAGES = $(TARGETS) ip.8 arpd.8 lnstat.8 routel.8 rtacct.8 rtmon.8 rtpr.8 ss.
4aca6e
 	ip-netns.8 ip-ntable.8 ip-rule.8 ip-tunnel.8 ip-xfrm.8 \
4aca6e
 	ip-tcp_metrics.8 ip-netconf.8 ip-token.8 \
4aca6e
 	tc-basic.8 tc-cgroup.8 tc-flow.8 tc-flower.8 tc-fw.8 tc-route.8 \
4aca6e
-	tc-tcindex.8 tc-u32.8 \
4aca6e
+	tc-tcindex.8 tc-u32.8 tc-matchall.8 \
4aca6e
 	tc-csum.8 tc-mirred.8 tc-nat.8 tc-pedit.8 tc-police.8 \
4aca6e
 	tc-simple.8 tc-skbedit.8 tc-xt.8
4aca6e
 
4aca6e
diff --git a/man/man8/tc-matchall.8 b/man/man8/tc-matchall.8
4aca6e
new file mode 100644
4aca6e
index 00000000..f9209226
4aca6e
--- /dev/null
4aca6e
+++ b/man/man8/tc-matchall.8
4aca6e
@@ -0,0 +1,76 @@
4aca6e
+.TH "Match-all classifier in tc" 8 "21 Oct 2015" "iproute2" "Linux"
4aca6e
+
4aca6e
+.SH NAME
4aca6e
+matchall \- traffic control filter that matches every packet
4aca6e
+.SH SYNOPSIS
4aca6e
+.in +8
4aca6e
+.ti -8
4aca6e
+.BR tc " " filter " ... " matchall " [ "
4aca6e
+.BR skip_sw " | " skip_hw
4aca6e
+.R " ] [ "
4aca6e
+.B action
4aca6e
+.IR ACTION_SPEC " ] [ "
4aca6e
+.B classid
4aca6e
+.IR CLASSID " ]"
4aca6e
+.SH DESCRIPTION
4aca6e
+The
4aca6e
+.B matchall
4aca6e
+filter allows to classify every packet that flows on the port and run a
4aca6e
+action on it.
4aca6e
+.SH OPTIONS
4aca6e
+.TP
4aca6e
+.BI action " ACTION_SPEC"
4aca6e
+Apply an action from the generic actions framework on matching packets.
4aca6e
+.TP
4aca6e
+.BI classid " CLASSID"
4aca6e
+Push matching packets into the class identified by
4aca6e
+.IR CLASSID .
4aca6e
+.TP
4aca6e
+.BI skip_sw
4aca6e
+Do not process filter by software. If hardware has no offload support for this
4aca6e
+filter, or TC offload is not enabled for the interface, operation will fail.
4aca6e
+.TP
4aca6e
+.BI skip_hw
4aca6e
+Do not process filter by hardware.
4aca6e
+.SH EXAMPLES
4aca6e
+To create ingress mirroring from port eth1 to port eth2:
4aca6e
+.RS
4aca6e
+.EX
4aca6e
+
4aca6e
+tc qdisc  add dev eth1 handle ffff: ingress
4aca6e
+tc filter add dev eth1 parent ffff:           \\
4aca6e
+        matchall skip_sw                      \\
4aca6e
+        action mirred egress mirror           \\
4aca6e
+        dev eth2
4aca6e
+.EE
4aca6e
+.RE
4aca6e
+
4aca6e
+The first command creats an ingress qdisc with handle
4aca6e
+.BR ffff:
4aca6e
+on device
4aca6e
+.BR eth1
4aca6e
+where the second command attaches a matchall filters on it that mirrors the
4aca6e
+packets to device eth2.
4aca6e
+
4aca6e
+To create egress mirroring from port eth1 to port eth2:
4aca6e
+.EX
4aca6e
+
4aca6e
+tc qdisc add dev eth1 handle 1: root prio
4aca6e
+tc filter add dev eth1 parent 1:               \\
4aca6e
+        matchall skip_sw                       \\
4aca6e
+        action mirred egress mirror            \\
4aca6e
+        dev eth2
4aca6e
+.EE
4aca6e
+.RE
4aca6e
+
4aca6e
+The first command creats an egress qdisc with handle
4aca6e
+.BR 1:
4aca6e
+that replaces the root qdisc on device
4aca6e
+.BR eth1
4aca6e
+where the second command attaches a matchall filters on it that mirrors the
4aca6e
+packets to device eth2.
4aca6e
+
4aca6e
+
4aca6e
+.EE
4aca6e
+.SH SEE ALSO
4aca6e
+.BR tc (8),
4aca6e
diff --git a/man/man8/tc.8 b/man/man8/tc.8
4aca6e
index ee3479eb..42121b0c 100644
4aca6e
--- a/man/man8/tc.8
4aca6e
+++ b/man/man8/tc.8
4aca6e
@@ -184,6 +184,11 @@ u32
4aca6e
 Generic filtering on arbitrary packet data, assisted by syntax to abstract common operations. See
4aca6e
 .BR tc-u32 (8)
4aca6e
 for details.
4aca6e
+.TP
4aca6e
+matchall
4aca6e
+Traffic control filter that matches every packet. See
4aca6e
+.BR tc-matchall (8)
4aca6e
+for details.
4aca6e
 
4aca6e
 .SH CLASSLESS QDISCS
4aca6e
 The classless qdiscs are:
4aca6e
-- 
4aca6e
2.13.0
4aca6e