netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Stephen Hemminger <shemming@brocade.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>, netdev@vger.kernel.org
Subject: [iproute PATCH 5/8] man: tc-police.8: Emphasize on the two rate control mechanisms
Date: Wed, 16 Mar 2016 22:56:21 +0100	[thread overview]
Message-ID: <1458165384-900-6-git-send-email-phil@nwl.cc> (raw)
In-Reply-To: <1458165384-900-1-git-send-email-phil@nwl.cc>

As Jamal pointed out, there are two different approaches to bandwidth
measurement. Try to make this clear by separating them in synopsis and
also documenting the way to fine-tune avrate.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 man/man8/tc-police.8 | 29 +++++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/man/man8/tc-police.8 b/man/man8/tc-police.8
index 2b1537ec52875..5c5a632335dc9 100644
--- a/man/man8/tc-police.8
+++ b/man/man8/tc-police.8
@@ -12,13 +12,21 @@ police - policing action
 .IR BYTES [\fB/ BYTES "] ] ["
 .BI peakrate " RATE"
 ] [
-.BI avrate " RATE"
-] [
 .BI overhead " BYTES"
 ] [
 .BI linklayer " TYPE"
 ] [
-.BI conform-exceed " EXCEEDACT\fR[\fB/\fIEXCEEDACT\fR]"
+.IR CONTROL " ]"
+
+.ti -8
+.BR tc " ... " filter " ... [ " estimator
+.IR "SAMPLE AVERAGE " ]
+.BR "action police avrate"
+.IR RATE " [ " CONTROL " ]"
+
+.ti -8
+.IR CONTROL " :="
+.BI conform-exceed " EXCEEDACT\fR[\fB/\fIEXCEEDACT"
 
 .ti -8
 .IR EXCEEDACT " := { "
@@ -27,7 +35,14 @@ police - policing action
 The
 .B police
 action allows to limit bandwidth of traffic matched by the filter it is
-attached to.
+attached to. Basically there are two different algorithms available to measure
+the packet rate: The first one uses an internal dual token bucket and is
+configured using the
+.BR rate ", " burst ", " mtu ", " peakrate ", " overhead " and " linklayer
+parameters. The second one uses an in-kernel sampling mechanism. It can be
+fine-tuned using the
+.B estimator
+filter parameter.
 .SH OPTIONS
 .TP
 .BI rate " RATE"
@@ -73,6 +88,12 @@ cell sizes, for
 .B ethernet
 no action is taken.
 .TP
+.BI estimator " SAMPLE AVERAGE"
+Fine-tune the in-kernel packet rate estimator.
+.IR SAMPLE " and " AVERAGE
+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
-- 
2.7.2

  parent reply	other threads:[~2016-03-16 21:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 21:56 [iproute PATCH 0/8] Follow-up to my action man pages series Phil Sutter
2016-03-16 21:56 ` [iproute PATCH 1/8] doc/tc-filters.tex: Drop overly subjective paragraphs Phil Sutter
2016-03-16 21:56 ` [iproute PATCH 2/8] tc: connmark, pedit: Rename BRANCH to CONTROL Phil Sutter
2016-03-21 19:08   ` Stephen Hemminger
2016-03-16 21:56 ` [iproute PATCH 3/8] man: tc-csum.8: Add an example Phil Sutter
2016-03-16 21:56 ` [iproute PATCH 4/8] man: tc-mirred.8: Reword man page a bit, add generic mirror example Phil Sutter
2016-03-16 21:56 ` Phil Sutter [this message]
2016-03-16 21:56 ` [iproute PATCH 6/8] man: tc-skbedit.8: Elaborate a bit on TX queues Phil Sutter
2016-03-16 21:56 ` [iproute PATCH 7/8] tc/m_vlan.c: mention CONTROL option in help text Phil Sutter
2016-03-16 21:56 ` [iproute PATCH 8/8] man: tc-vlan.8: Describe CONTROL option Phil Sutter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458165384-900-6-git-send-email-phil@nwl.cc \
    --to=phil@nwl.cc \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemming@brocade.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).