Blame SOURCES/0003-tc-simple-Fix-documentation.patch

36cfb7
From 3d016b2ca5862b3f47da5b28aca43bd96d5c3c49 Mon Sep 17 00:00:00 2001
36cfb7
From: Phil Sutter <psutter@redhat.com>
36cfb7
Date: Fri, 11 Aug 2017 11:13:26 +0200
36cfb7
Subject: [PATCH] tc-simple: Fix documentation
36cfb7
36cfb7
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1477523
36cfb7
Upstream Status: iproute2.git commit e2a055dd23f0e
36cfb7
36cfb7
commit e2a055dd23f0e7527a987c24687cb6b0b86f0cde
36cfb7
Author: Phil Sutter <phil@nwl.cc>
36cfb7
Date:   Thu Aug 3 17:00:51 2017 +0200
36cfb7
36cfb7
    tc-simple: Fix documentation
36cfb7
36cfb7
    - CONTROL has to come last, otherwise 'index' applies to gact and not
36cfb7
      simple itself.
36cfb7
    - Man page wasn't updated to reflect syntax changes.
36cfb7
36cfb7
    Signed-off-by: Phil Sutter <phil@nwl.cc>
36cfb7
---
36cfb7
 man/man8/tc-simple.8 | 29 ++++++++++++++++++++++++++---
36cfb7
 tc/m_simple.c        |  4 ++--
36cfb7
 2 files changed, 28 insertions(+), 5 deletions(-)
36cfb7
36cfb7
diff --git a/man/man8/tc-simple.8 b/man/man8/tc-simple.8
e138d9
index 2206dc3b88614..7363ab563e189 100644
36cfb7
--- a/man/man8/tc-simple.8
36cfb7
+++ b/man/man8/tc-simple.8
36cfb7
@@ -6,15 +6,37 @@ simple - basic example action
36cfb7
 .in +8
36cfb7
 .ti -8
36cfb7
 .BR tc " ... " "action simple"
36cfb7
-.I STRING
36cfb7
+[
36cfb7
+.BI sdata " STRING"
36cfb7
+] [
36cfb7
+.BI index " INDEX"
36cfb7
+] [
36cfb7
+.I CONTROL
36cfb7
+]
36cfb7
+
36cfb7
+.ti -8
36cfb7
+.IR CONTROL " := {"
36cfb7
+.BR reclassify " | " pipe " | " drop " | " continue " | " ok " }"
36cfb7
+
36cfb7
 .SH DESCRIPTION
36cfb7
 This is a pedagogical example rather than an actually useful action. Upon every access, it prints the given
36cfb7
 .I STRING
36cfb7
 which may be of arbitrary length.
36cfb7
 .SH OPTIONS
36cfb7
 .TP
36cfb7
-.I STRING
36cfb7
+.BI sdata " STRING"
36cfb7
 The actual string to print.
36cfb7
+.TP
36cfb7
+.BI index " INDEX"
36cfb7
+Optional action index value.
36cfb7
+.TP
36cfb7
+.I CONTROL
36cfb7
+Indicate how
36cfb7
+.B tc
36cfb7
+should proceed after executing the action. For a description of the possible
36cfb7
+.I CONTROL
36cfb7
+values, see
36cfb7
+.BR tc-actions (8).
36cfb7
 .SH EXAMPLES
36cfb7
 The following example makes the kernel yell "Incoming ICMP!" every time it sees
36cfb7
 an incoming ICMP on eth0. Steps are:
36cfb7
@@ -36,7 +58,7 @@ display stats again and observe increment by 1
36cfb7
 .EX
36cfb7
   hadi@noma1:$ tc qdisc add dev eth0 ingress
36cfb7
   hadi@noma1:$tc filter add dev eth0 parent ffff: protocol ip prio 5 \\
36cfb7
-	 u32 match ip protocol 1 0xff flowid 1:1 action simple "Incoming ICMP"
36cfb7
+	 u32 match ip protocol 1 0xff flowid 1:1 action simple sdata "Incoming ICMP"
36cfb7
 
36cfb7
   hadi@noma1:$ sudo tc -s filter ls  dev eth0 parent ffff:
36cfb7
    filter protocol ip pref 5 u32
36cfb7
@@ -74,3 +96,4 @@ display stats again and observe increment by 1
36cfb7
 .EE
36cfb7
 .SH SEE ALSO
36cfb7
 .BR tc (8)
36cfb7
+.BR tc-actions (8)
36cfb7
diff --git a/tc/m_simple.c b/tc/m_simple.c
e138d9
index 3a8bd916d3bfb..ab633849f7b45 100644
36cfb7
--- a/tc/m_simple.c
36cfb7
+++ b/tc/m_simple.c
36cfb7
@@ -81,10 +81,10 @@
36cfb7
 #endif
36cfb7
 static void explain(void)
36cfb7
 {
36cfb7
-	fprintf(stderr, "Usage:... simple [sdata STRING] [CONTROL] [index INDEX]\n");
36cfb7
+	fprintf(stderr, "Usage:... simple [sdata STRING] [index INDEX] [CONTROL]\n");
36cfb7
 	fprintf(stderr, "\tSTRING being an arbitrary string\n"
36cfb7
-		"\tCONTROL := reclassify|pipe|drop|continue|ok\n"
36cfb7
 		"\tINDEX := optional index value used\n");
36cfb7
+		"\tCONTROL := reclassify|pipe|drop|continue|ok\n"
36cfb7
 }
36cfb7
 
36cfb7
 static void usage(void)
36cfb7
-- 
e138d9
2.21.0
36cfb7