netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iproute2: tc.8: update UNITS section.
@ 2012-08-28  5:38 Li Wei
  2012-08-28 16:54 ` Ben Hutchings
  2012-08-29  6:41 ` [PATCH v2] " Li Wei
  0 siblings, 2 replies; 6+ messages in thread
From: Li Wei @ 2012-08-28  5:38 UTC (permalink / raw)
  To: shemminger; +Cc: netdev, Li Wei

- rename section UNITS to PARAMETERS.
- break section PARAMETERS down to four subsections to cover the
  common used parameter types(RATES, TIMES, SIZES, VALUES).
- add some explaination for IEC units in RATES.
- point out the max value we can set for RATES, TIMES and SIZES.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
---
 man/man8/tc.8 |  111 +++++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 85 insertions(+), 26 deletions(-)

diff --git a/man/man8/tc.8 b/man/man8/tc.8
index 98fbfcd..44d644a 100644
--- a/man/man8/tc.8
+++ b/man/man8/tc.8
@@ -257,19 +257,20 @@ qdiscs applies.
 FILTERS
 Filters have a three part ID, which is only needed when using a hashed
 filter hierarchy.
-.SH UNITS
-All parameters accept a floating point number, possibly followed by a unit.
-.P
-Bandwidths or rates can be specified in:
-.TP
-bps
-Bytes per second
+
+.SH PARAMETERS
+These following parameters are widely used in TC, for other parameters,
+see the man page for individual qdiscs.
+
 .TP
-kbps
-Kilobytes per second
+RATES
+Bandwidths or rates.
+These parameters accept a floating point number, possibly followed by
+a unit(both SI and IEC units supported).
+.RS
 .TP
-mbps
-Megabytes per second
+bit or a bare number
+Bits per second
 .TP
 kbit
 Kilobits per second
@@ -277,27 +278,41 @@ Kilobits per second
 mbit
 Megabits per second
 .TP
-bit or a bare number
-Bits per second
-.P
-Amounts of data can be specified in:
+gbit
+Gegabits per second
 .TP
-kb or k
-Kilobytes
+tbit
+Terabits per second
 .TP
-mb or m
-Megabytes
+bps
+Bytes per second
 .TP
-mbit
-Megabits
+kbps
+Kilobytes per second
 .TP
-kbit
-Kilobits
+mbps
+Megabytes per second
 .TP
-b or a bare number
-Bytes.
+gbps
+Gigabytes per second
+.TP
+tbps
+Terabytes per second
+
+.P
+To specified in IEC units, just replace the SI prefix(k-, m-, g-, t-) with
+IEC prefix(ki-, mi-, gi- and ti-) respectively.
+
 .P
-Lengths of time can be specified in:
+TC store rates as a __u32 integer in bps internally,
+so we can specify a max rate of UINT32_MAX bps.
+.RE
+
+.TP
+TIMES
+Length of time. Can be specified as a float pointing number 
+followed by an optional unit:
+.RS
 .TP
 s, sec or secs
 Whole seconds
@@ -308,6 +323,50 @@ Milliseconds
 us, usec, usecs or a bare number
 Microseconds.
 
+.P
+TC defined it's own time unit(equals to microsecond) and store time values
+as __u32 integer, thus we can specify a max time value of UINT32_MAX usecs.
+.RE
+
+.TP
+SIZES
+Amounts of data. Can be specified as a float pointing number 
+followed by an optional unit:
+.RS
+.TP
+b or a bare number
+Bytes.
+.TP
+kbit
+Kilobites
+.TP
+kb or k
+Kilobytes
+.TP
+mbit
+Megabits
+.TP
+mb or m
+Megabytes
+.TP
+gbit
+Gigabites
+.TP
+gb or g
+Gigabytes
+
+.P
+TC store sizes internally as __u32 integer in byte, so we can specify
+a max size of UINT32_MAX bytes.
+.RE
+
+.TP
+VALUES
+Other values without a unit.
+These parameters read as decimal by default, but you can
+indicate TC to read them as octal and hexadecimal by adding a '0'
+or '0x' prefix respectively.
+
 .SH TC COMMANDS
 The following commands are available for qdiscs, classes and filter:
 .TP
-- 
1.7.10.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] iproute2: tc.8: update UNITS section.
  2012-08-28  5:38 [PATCH] iproute2: tc.8: update UNITS section Li Wei
@ 2012-08-28 16:54 ` Ben Hutchings
  2012-08-29  0:49   ` Li Wei
  2012-08-29  6:41 ` [PATCH v2] " Li Wei
  1 sibling, 1 reply; 6+ messages in thread
From: Ben Hutchings @ 2012-08-28 16:54 UTC (permalink / raw)
  To: Li Wei; +Cc: shemminger, netdev

On Tue, 2012-08-28 at 13:38 +0800, Li Wei wrote:
> - rename section UNITS to PARAMETERS.
> - break section PARAMETERS down to four subsections to cover the
>   common used parameter types(RATES, TIMES, SIZES, VALUES).
> - add some explaination for IEC units in RATES.
> - point out the max value we can set for RATES, TIMES and SIZES.
> 
> Signed-off-by: Li Wei <lw@cn.fujitsu.com>
> ---
>  man/man8/tc.8 |  111 +++++++++++++++++++++++++++++++++++++++++++--------------
>  1 file changed, 85 insertions(+), 26 deletions(-)
> 
> diff --git a/man/man8/tc.8 b/man/man8/tc.8
> index 98fbfcd..44d644a 100644
> --- a/man/man8/tc.8
> +++ b/man/man8/tc.8
> @@ -257,19 +257,20 @@ qdiscs applies.
>  FILTERS
>  Filters have a three part ID, which is only needed when using a hashed
>  filter hierarchy.
> -.SH UNITS
> -All parameters accept a floating point number, possibly followed by a unit.
> -.P
> -Bandwidths or rates can be specified in:
> -.TP
> -bps
> -Bytes per second
> +
> +.SH PARAMETERS
> +These following parameters are widely used in TC, for other parameters,

'These' should be 'The'.
'for other parameters' should begin a new sentence.

> +see the man page for individual qdiscs.

'page' should be 'pages'.

> +
>  .TP
> -kbps
> -Kilobytes per second
> +RATES
> +Bandwidths or rates.
> +These parameters accept a floating point number, possibly followed by
> +a unit(both SI and IEC units supported).

Missing space before the open-parenthesis.

> +.RS
>  .TP
> -mbps
> -Megabytes per second
> +bit or a bare number
> +Bits per second
>  .TP
>  kbit
>  Kilobits per second
> @@ -277,27 +278,41 @@ Kilobits per second
>  mbit
>  Megabits per second
>  .TP
> -bit or a bare number
> -Bits per second
> -.P
> -Amounts of data can be specified in:
> +gbit
> +Gegabits per second

'Gigabits'

>  .TP
> -kb or k
> -Kilobytes
> +tbit
> +Terabits per second
>  .TP
> -mb or m
> -Megabytes
> +bps
> +Bytes per second
>  .TP
> -mbit
> -Megabits
> +kbps
> +Kilobytes per second
>  .TP
> -kbit
> -Kilobits
> +mbps
> +Megabytes per second
>  .TP
> -b or a bare number
> -Bytes.
> +gbps
> +Gigabytes per second
> +.TP
> +tbps
> +Terabytes per second
> +
> +.P
> +To specified in IEC units, just replace the SI prefix(k-, m-, g-, t-) with
> +IEC prefix(ki-, mi-, gi- and ti-) respectively.

'specified' should be 'specify'.
The word 'just' is not needed.

Missing spaces before the open-parentheses.

> +
>  .P
> -Lengths of time can be specified in:
> +TC store rates as a __u32 integer in bps internally,
> +so we can specify a max rate of UINT32_MAX bps.
> +.RE
> +
> +.TP
> +TIMES
> +Length of time. Can be specified as a float pointing number 

'float pointing' should be 'floating point' :-)

> +followed by an optional unit:
> +.RS
>  .TP
>  s, sec or secs
>  Whole seconds
> @@ -308,6 +323,50 @@ Milliseconds
>  us, usec, usecs or a bare number
>  Microseconds.
>  
> +.P
> +TC defined it's own time unit(equals to microsecond) and store time values

'it's' means 'it is'; here it should be 'its'.
'equals' should be 'equal'.
'store' should be 'stores'.

Missing space before the open parenthesis, again.

> +as __u32 integer, thus we can specify a max time value of UINT32_MAX usecs.

I don't think user documentation should use names like '__u32' and
'UINT32_MAX'.  Instead it should say '32-bit unsigned integer' and '4294
seconds'.

> +.RE
> +
> +.TP
> +SIZES
> +Amounts of data. Can be specified as a float pointing number 

'float pointing' should be 'floating point' again

> +followed by an optional unit:
> +.RS
> +.TP
> +b or a bare number
> +Bytes.
> +.TP
> +kbit
> +Kilobites

'kilobits'

> +.TP
> +kb or k
> +Kilobytes
> +.TP
> +mbit
> +Megabits
> +.TP
> +mb or m
> +Megabytes
> +.TP
> +gbit
> +Gigabites

'gigabits'

> +.TP
> +gb or g
> +Gigabytes
> +
> +.P
> +TC store sizes internally as __u32 integer in byte, so we can specify
> +a max size of UINT32_MAX bytes.

'store' should be 'stores'.
Same issue with the type and maximum names.

> +.RE
> +
> +.TP
> +VALUES
> +Other values without a unit.
> +These parameters read as decimal by default, but you can

'read' should be 'are read' or 'are interpreted'

Ben.

> +indicate TC to read them as octal and hexadecimal by adding a '0'
> +or '0x' prefix respectively.
> +
>  .SH TC COMMANDS
>  The following commands are available for qdiscs, classes and filter:
>  .TP

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iproute2: tc.8: update UNITS section.
  2012-08-28 16:54 ` Ben Hutchings
@ 2012-08-29  0:49   ` Li Wei
  0 siblings, 0 replies; 6+ messages in thread
From: Li Wei @ 2012-08-29  0:49 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: shemminger, netdev

On 08/29/2012 12:54 AM, Ben Hutchings wrote:
> On Tue, 2012-08-28 at 13:38 +0800, Li Wei wrote:
>> - rename section UNITS to PARAMETERS.
>> - break section PARAMETERS down to four subsections to cover the
>>   common used parameter types(RATES, TIMES, SIZES, VALUES).
>> - add some explaination for IEC units in RATES.
>> - point out the max value we can set for RATES, TIMES and SIZES.
>>
>> Signed-off-by: Li Wei <lw@cn.fujitsu.com>
>> ---
>>  man/man8/tc.8 |  111 +++++++++++++++++++++++++++++++++++++++++++--------------
>>  1 file changed, 85 insertions(+), 26 deletions(-)
>>
>> diff --git a/man/man8/tc.8 b/man/man8/tc.8
>> index 98fbfcd..44d644a 100644
>> --- a/man/man8/tc.8
>> +++ b/man/man8/tc.8
>> @@ -257,19 +257,20 @@ qdiscs applies.
>>  FILTERS
>>  Filters have a three part ID, which is only needed when using a hashed
>>  filter hierarchy.
>> -.SH UNITS
>> -All parameters accept a floating point number, possibly followed by a unit.
>> -.P
>> -Bandwidths or rates can be specified in:
>> -.TP
>> -bps
>> -Bytes per second
>> +
>> +.SH PARAMETERS
>> +These following parameters are widely used in TC, for other parameters,
> 
> 'These' should be 'The'.
> 'for other parameters' should begin a new sentence.
> 
>> +see the man page for individual qdiscs.
> 
> 'page' should be 'pages'.
> 
>> +
>>  .TP
>> -kbps
>> -Kilobytes per second
>> +RATES
>> +Bandwidths or rates.
>> +These parameters accept a floating point number, possibly followed by
>> +a unit(both SI and IEC units supported).
> 
> Missing space before the open-parenthesis.
> 
>> +.RS
>>  .TP
>> -mbps
>> -Megabytes per second
>> +bit or a bare number
>> +Bits per second
>>  .TP
>>  kbit
>>  Kilobits per second
>> @@ -277,27 +278,41 @@ Kilobits per second
>>  mbit
>>  Megabits per second
>>  .TP
>> -bit or a bare number
>> -Bits per second
>> -.P
>> -Amounts of data can be specified in:
>> +gbit
>> +Gegabits per second
> 
> 'Gigabits'
> 
>>  .TP
>> -kb or k
>> -Kilobytes
>> +tbit
>> +Terabits per second
>>  .TP
>> -mb or m
>> -Megabytes
>> +bps
>> +Bytes per second
>>  .TP
>> -mbit
>> -Megabits
>> +kbps
>> +Kilobytes per second
>>  .TP
>> -kbit
>> -Kilobits
>> +mbps
>> +Megabytes per second
>>  .TP
>> -b or a bare number
>> -Bytes.
>> +gbps
>> +Gigabytes per second
>> +.TP
>> +tbps
>> +Terabytes per second
>> +
>> +.P
>> +To specified in IEC units, just replace the SI prefix(k-, m-, g-, t-) with
>> +IEC prefix(ki-, mi-, gi- and ti-) respectively.
> 
> 'specified' should be 'specify'.
> The word 'just' is not needed.
> 
> Missing spaces before the open-parentheses.
> 
>> +
>>  .P
>> -Lengths of time can be specified in:
>> +TC store rates as a __u32 integer in bps internally,
>> +so we can specify a max rate of UINT32_MAX bps.
>> +.RE
>> +
>> +.TP
>> +TIMES
>> +Length of time. Can be specified as a float pointing number 
> 
> 'float pointing' should be 'floating point' :-)
> 
>> +followed by an optional unit:
>> +.RS
>>  .TP
>>  s, sec or secs
>>  Whole seconds
>> @@ -308,6 +323,50 @@ Milliseconds
>>  us, usec, usecs or a bare number
>>  Microseconds.
>>  
>> +.P
>> +TC defined it's own time unit(equals to microsecond) and store time values
> 
> 'it's' means 'it is'; here it should be 'its'.
> 'equals' should be 'equal'.
> 'store' should be 'stores'.
> 
> Missing space before the open parenthesis, again.
> 
>> +as __u32 integer, thus we can specify a max time value of UINT32_MAX usecs.
> 
> I don't think user documentation should use names like '__u32' and
> 'UINT32_MAX'.  Instead it should say '32-bit unsigned integer' and '4294
> seconds'.
> 
>> +.RE
>> +
>> +.TP
>> +SIZES
>> +Amounts of data. Can be specified as a float pointing number 
> 
> 'float pointing' should be 'floating point' again
> 
>> +followed by an optional unit:
>> +.RS
>> +.TP
>> +b or a bare number
>> +Bytes.
>> +.TP
>> +kbit
>> +Kilobites
> 
> 'kilobits'
> 
>> +.TP
>> +kb or k
>> +Kilobytes
>> +.TP
>> +mbit
>> +Megabits
>> +.TP
>> +mb or m
>> +Megabytes
>> +.TP
>> +gbit
>> +Gigabites
> 
> 'gigabits'
> 
>> +.TP
>> +gb or g
>> +Gigabytes
>> +
>> +.P
>> +TC store sizes internally as __u32 integer in byte, so we can specify
>> +a max size of UINT32_MAX bytes.
> 
> 'store' should be 'stores'.
> Same issue with the type and maximum names.
> 
>> +.RE
>> +
>> +.TP
>> +VALUES
>> +Other values without a unit.
>> +These parameters read as decimal by default, but you can
> 
> 'read' should be 'are read' or 'are interpreted'
> 
> Ben.

Sorry for my poor english, I'll modify and resend this patch.

Thanks Ben :)

> 
>> +indicate TC to read them as octal and hexadecimal by adding a '0'
>> +or '0x' prefix respectively.
>> +
>>  .SH TC COMMANDS
>>  The following commands are available for qdiscs, classes and filter:
>>  .TP
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] iproute2: tc.8: update UNITS section.
  2012-08-28  5:38 [PATCH] iproute2: tc.8: update UNITS section Li Wei
  2012-08-28 16:54 ` Ben Hutchings
@ 2012-08-29  6:41 ` Li Wei
       [not found]   ` <20120829111956.77d504ce@s6510.linuxnetplumber.net>
  1 sibling, 1 reply; 6+ messages in thread
From: Li Wei @ 2012-08-29  6:41 UTC (permalink / raw)
  To: shemminger; +Cc: bhutchings, netdev, Li Wei

- rename section UNITS to PARAMETERS.
- break section PARAMETERS down to four subsections to cover the
  common used parameter types(RATES, TIMES, SIZES, VALUES).
- add some explaination for IEC units in RATES.
- point out the max value we can set for RATES, TIMES and SIZES.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
---
Changes from v1:
- fix some syntax and spelling errors. Thanks Ben!

 man/man8/tc.8 |  112 +++++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 86 insertions(+), 26 deletions(-)

diff --git a/man/man8/tc.8 b/man/man8/tc.8
index 98fbfcd..f81d46f 100644
--- a/man/man8/tc.8
+++ b/man/man8/tc.8
@@ -257,19 +257,20 @@ qdiscs applies.
 FILTERS
 Filters have a three part ID, which is only needed when using a hashed
 filter hierarchy.
-.SH UNITS
-All parameters accept a floating point number, possibly followed by a unit.
-.P
-Bandwidths or rates can be specified in:
-.TP
-bps
-Bytes per second
+
+.SH PARAMETERS
+The following parameters are widely used in TC. For other parameters,
+see the man pages for individual qdiscs.
+
 .TP
-kbps
-Kilobytes per second
+RATES
+Bandwidths or rates.
+These parameters accept a floating point number, possibly followed by
+a unit (both SI and IEC units supported).
+.RS
 .TP
-mbps
-Megabytes per second
+bit or a bare number
+Bits per second
 .TP
 kbit
 Kilobits per second
@@ -277,27 +278,41 @@ Kilobits per second
 mbit
 Megabits per second
 .TP
-bit or a bare number
-Bits per second
-.P
-Amounts of data can be specified in:
+gbit
+Gigabits per second
 .TP
-kb or k
-Kilobytes
+tbit
+Terabits per second
 .TP
-mb or m
-Megabytes
+bps
+Bytes per second
 .TP
-mbit
-Megabits
+kbps
+Kilobytes per second
 .TP
-kbit
-Kilobits
+mbps
+Megabytes per second
 .TP
-b or a bare number
-Bytes.
+gbps
+Gigabytes per second
+.TP
+tbps
+Terabytes per second
+
+.P
+To specify in IEC units, replace the SI prefix (k-, m-, g-, t-) with
+IEC prefix (ki-, mi-, gi- and ti-) respectively.
+
 .P
-Lengths of time can be specified in:
+TC store rates as a 32-bit unsigned integer in bps internally,
+so we can specify a max rate of 4294967295 bps.
+.RE
+
+.TP
+TIMES
+Length of time. Can be specified as a floating point number 
+followed by an optional unit:
+.RS
 .TP
 s, sec or secs
 Whole seconds
@@ -308,6 +323,51 @@ Milliseconds
 us, usec, usecs or a bare number
 Microseconds.
 
+.P
+TC defined its own time unit (equal to microsecond) and stores
+time values as 32-bit unsigned integer, thus we can specify a max time value
+of 4294967295 usecs.
+.RE
+
+.TP
+SIZES
+Amounts of data. Can be specified as a floating point number 
+followed by an optional unit:
+.RS
+.TP
+b or a bare number
+Bytes.
+.TP
+kbit
+Kilobits
+.TP
+kb or k
+Kilobytes
+.TP
+mbit
+Megabits
+.TP
+mb or m
+Megabytes
+.TP
+gbit
+Gigabits
+.TP
+gb or g
+Gigabytes
+
+.P
+TC stores sizes internally as 32-bit unsigned integer in byte,
+so we can specify a max size of 4294967295 bytes.
+.RE
+
+.TP
+VALUES
+Other values without a unit.
+These parameters are interpreted as decimal by default, but you can
+indicate TC to interpret them as octal and hexadecimal by adding a '0'
+or '0x' prefix respectively.
+
 .SH TC COMMANDS
 The following commands are available for qdiscs, classes and filter:
 .TP
-- 
1.7.10.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] iproute2: tc.8: update UNITS section.
       [not found]   ` <20120829111956.77d504ce@s6510.linuxnetplumber.net>
@ 2012-09-10  1:28     ` Li Wei
  2012-09-10 16:35       ` Stephen Hemminger
  0 siblings, 1 reply; 6+ messages in thread
From: Li Wei @ 2012-09-10  1:28 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

On 08/30/2012 02:19 AM, Stephen Hemminger wrote:
> On Wed, 29 Aug 2012 14:41:56 +0800
> Li Wei <lw@cn.fujitsu.com> wrote:
> 
>> - rename section UNITS to PARAMETERS.
>> - break section PARAMETERS down to four subsections to cover the
>>   common used parameter types(RATES, TIMES, SIZES, VALUES).
>> - add some explaination for IEC units in RATES.
>> - point out the max value we can set for RATES, TIMES and SIZES.
>>
>> Signed-off-by: Li Wei <lw@cn.fujitsu.com>
> 
> Plan to merge this when I get back next week.

ping ...

> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] iproute2: tc.8: update UNITS section.
  2012-09-10  1:28     ` Li Wei
@ 2012-09-10 16:35       ` Stephen Hemminger
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2012-09-10 16:35 UTC (permalink / raw)
  To: Li Wei; +Cc: netdev

On Mon, 10 Sep 2012 09:28:50 +0800
Li Wei <lw@cn.fujitsu.com> wrote:

> On 08/30/2012 02:19 AM, Stephen Hemminger wrote:
> > On Wed, 29 Aug 2012 14:41:56 +0800
> > Li Wei <lw@cn.fujitsu.com> wrote:
> > 
> >> - rename section UNITS to PARAMETERS.
> >> - break section PARAMETERS down to four subsections to cover the
> >>   common used parameter types(RATES, TIMES, SIZES, VALUES).
> >> - add some explaination for IEC units in RATES.
> >> - point out the max value we can set for RATES, TIMES and SIZES.
> >>
> >> Signed-off-by: Li Wei <lw@cn.fujitsu.com>
> > 
> > Plan to merge this when I get back next week.
> 
> ping ...
> 
> > 
> > 

Pushed it out this morning.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-10 16:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-28  5:38 [PATCH] iproute2: tc.8: update UNITS section Li Wei
2012-08-28 16:54 ` Ben Hutchings
2012-08-29  0:49   ` Li Wei
2012-08-29  6:41 ` [PATCH v2] " Li Wei
     [not found]   ` <20120829111956.77d504ce@s6510.linuxnetplumber.net>
2012-09-10  1:28     ` Li Wei
2012-09-10 16:35       ` Stephen Hemminger

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).