[iproute2 1/3] police: add extra space to improve police result printing

Subsystems: the rest

3 messages, 1 author, 2016-08-28 · open the first message on its own page

[iproute2 1/3] police: add extra space to improve police result printing

From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: 2016-08-28 12:53:19

From: Roman Mashak <redacted>

Signed-off-by: Roman Mashak <redacted>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 tc/m_police.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/m_police.c b/tc/m_police.c
index f0b179f..d7fa8f6 100644
--- a/tc/m_police.c
+++ b/tc/m_police.c
@@ -322,7 +322,7 @@ int print_police(struct action_util *a, FILE *f, struct rtattr *arg)
 	if (tb[TCA_POLICE_RESULT]) {
 		__u32 action = rta_getattr_u32(tb[TCA_POLICE_RESULT]);
 
-		fprintf(f, "/%s", action_n2a(action));
+		fprintf(f, "/%s ", action_n2a(action));
 	} else
 		fprintf(f, " ");
 
-- 
1.9.1

[iproute2 2/3] police: improve usage message

From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: 2016-08-28 12:59:10

From: Roman Mashak <redacted>

Signed-off-by: Roman Mashak <redacted>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 tc/m_police.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tc/m_police.c b/tc/m_police.c
index d7fa8f6..226e20e 100644
--- a/tc/m_police.c
+++ b/tc/m_police.c
@@ -36,11 +36,12 @@ static void usage(void)
 {
 	fprintf(stderr, "Usage: ... police rate BPS burst BYTES[/BYTES] [ mtu BYTES[/BYTES] ]\n");
 	fprintf(stderr, "                [ peakrate BPS ] [ avrate BPS ] [ overhead BYTES ]\n");
-	fprintf(stderr, "                [ linklayer TYPE ] [ ACTIONTERM ]\n");
+	fprintf(stderr, "                [ linklayer TYPE ] [ CONTROL ]\n");
 
-	fprintf(stderr, "New Syntax ACTIONTERM := conform-exceed <EXCEEDACT>[/NOTEXCEEDACT]\n");
-	fprintf(stderr, "Where: *EXCEEDACT := pipe | ok | reclassify | drop | continue\n");
-	fprintf(stderr, "Where:  pipe is only valid for new syntax\n");
+	fprintf(stderr, "Where: CONTROL := conform-exceed <EXCEEDACT>[/NOTEXCEEDACT]\n");
+	fprintf(stderr, "                  Define how to handle packets which exceed (<EXCEEDACT>)\n");
+	fprintf(stderr, "                  or conform (<NOTEXCEEDACT>) the configured bandwidth limit.\n");
+	fprintf(stderr, "       EXCEEDACT/NOTEXCEEDACT := { pipe | ok | reclassify | drop | continue }\n");
 	exit(-1);
 }
 
-- 
1.9.1

[iproute2 3/3] police: bug fix man page

From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: 2016-08-28 12:59:12

From: Roman Mashak <redacted>

Signed-off-by: Roman Mashak <redacted>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 man/man8/tc-police.8 | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/man/man8/tc-police.8 b/man/man8/tc-police.8
index 5c5a632..620c288 100644
--- a/man/man8/tc-police.8
+++ b/man/man8/tc-police.8
@@ -26,10 +26,10 @@ police - policing action
 
 .ti -8
 .IR CONTROL " :="
-.BI conform-exceed " EXCEEDACT\fR[\fB/\fIEXCEEDACT"
+.BI conform-exceed " EXCEEDACT\fR[\fB/\fINOTEXCEEDACT"
 
 .ti -8
-.IR EXCEEDACT " := { "
+.IR EXCEEDACT/NOTEXCEEDACT " := { "
 .BR pipe " | " ok " | " reclassify " | " drop " | " continue " }"
 .SH DESCRIPTION
 The
@@ -94,11 +94,9 @@ Fine-tune the in-kernel packet rate estimator.
 are time values and control the frequency in which samples are taken and over
 what timespan an average is built.
 .TP
-.BI conform-exceed " EXCEEDACT\fR[\fB/\fIEXCEEDACT\fR]"
-Define how to handle packets which exceed (and, if the second
-.I EXCEEDACT
-is given, also those who don't), the configured bandwidth limit. Possible values
-are:
+.BI conform-exceed " EXCEEDACT\fR[\fB/\fINOTEXCEEDACT\fR]"
+Define how to handle packets which exceed or conform the
+configured bandwidth limit. Possible values are:
 .RS
 .IP continue
 Don't do anything, just continue with the next action in line.
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help