]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc: man: matchall: Update examples to include sample
authorYotam Gigi <yotamg@mellanox.com>
Sun, 5 Feb 2017 07:58:54 +0000 (09:58 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 6 Feb 2017 22:24:52 +0000 (14:24 -0800)
Add an example of packet sampling to the tc-matchall man page examples
section. The example uses the matchall classifier and the sample action to
create packet sampling on a port.

Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
man/man8/tc-matchall.8

index 5aa11dab905d091d266c89af71affd6565f34e9f..53b2194e023a1700e04a6356066b3c5603fd2d6d 100644 (file)
@@ -71,6 +71,16 @@ that replaces the root qdisc on device
 where the second command attaches a matchall filters on it that mirrors the
 packets to device eth2.
 
+To sample one of every 100 packets flowing into interface eth0 to psample group
+12:
+.RS
+.EX
+
+tc qdisc add dev eth0 handle ffff: ingress
+tc filter add dev eth0 parent ffff: matchall \\
+     action sample rate 100 group 12
+.EE
+.RE
 
 .EE
 .SH SEE ALSO