Skip to content

Commit e5cd5a5

Browse files
shemmingerdsahern
authored andcommitted
doc: remove trailing whitespace
Run whitespace scrubbing script to remove unnecessary trailing blanks at end of line and end of file. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David Ahern <dsahern@gmail.com>
1 parent 6065ddf commit e5cd5a5

7 files changed

+110
-113
lines changed

README.iproute2+tc

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ in rsvp/cbqinit.eth1.
4242

4343

4444
Terminology and advices about setting CBQ parameters may be found in Sally Floyd
45-
papers.
45+
papers.
4646

4747

4848
Pairs X:Y are class handles, X:0 are qdisc handles.

README.lnstat

+7-8
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ This tool is a generalized and more feature-complete replacement for the old
77

88
In addition to routing cache statistics, it supports any kind of statistics
99
the linux kernel exports via a file in /proc/net/stat. In a stock 2.6.9
10-
kernel, this is
11-
per-protocol neighbour cache statistics
10+
kernel, this is
11+
per-protocol neighbour cache statistics
1212
(ipv4, ipv6, atm)
1313
routing cache statistics
1414
(ipv4)
@@ -29,7 +29,7 @@ In order to get a list of supported statistics files, you can run
2929
lnstat -d
3030

3131
It will display something like
32-
32+
3333
/proc/net/stat/arp_cache:
3434
1: entries
3535
2: allocs
@@ -52,19 +52,19 @@ arp_cach|rt_cache|arp_cach|
5252

5353

5454
You can specify the interval (e.g. 10 seconds) by:
55-
55+
5656
lnstat -i 10
5757

5858
You can specify to only use one particular statistics file:
5959

6060
lnstat -f ip_conntrack
6161

62-
You can specify individual field widths
62+
You can specify individual field widths
6363

6464
lnstat -k arp_cache:entries,rt_cache:entries -w 20,8
6565

6666
You can specify not to print a header at all
67-
67+
6868
lnstat -s 0
6969

7070
You can specify to print a header only at start of the program
@@ -76,6 +76,5 @@ You can specify to print a header at start and every 20 lines:
7676
lnstat -s 20
7777

7878
You can specify the number of samples you want to take (e.g. 5):
79-
80-
lnstat -c 5
8179

80+
lnstat -c 5

doc/actions/actions-general

+49-50
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ What is it?
66
-----------
77

88
An extension to the filtering/classification architecture of Linux Traffic
9-
Control.
10-
Up to 2.6.8 the only action that could be "attached" to a filter was policing.
9+
Control.
10+
Up to 2.6.8 the only action that could be "attached" to a filter was policing.
1111
i.e you could say something like:
1212

1313
-----
@@ -17,7 +17,7 @@ tc filter add dev lo parent ffff: protocol ip prio 10 u32 match ip src \
1717

1818
which implies "if a packet is seen on the ingress of the lo device with
1919
a source IP address of 127.0.0.1/32 we give it a classification id of 1:1 and
20-
we execute a policing action which rate limits its bandwidth utilization
20+
we execute a policing action which rate limits its bandwidth utilization
2121
to 1.5Mbps".
2222

2323
The new extensions allow for more than just policing actions to be added.
@@ -29,9 +29,9 @@ syntax which will work fine. Of course to get the required effect you need
2929
both newer tc and kernel. If you are reading this you have the
3030
right tc ;->
3131

32-
A side effect is that we can now get stateless firewalling to work with tc.
32+
A side effect is that we can now get stateless firewalling to work with tc.
3333
Essentially this is now an alternative to iptables.
34-
I won't go into details of my dislike for iptables at times, but
34+
I won't go into details of my dislike for iptables at times, but
3535
scalability is one of the main issues; however, if you need stateful
3636
classification - use netfilter (for now).
3737

@@ -61,7 +61,7 @@ tc filter add dev lo parent 1:0 protocol ip prio 10 u32 \
6161
match ip src 127.0.0.1/32 flowid 1:1 \
6262
action police mtu 4000 rate 1500kbit burst 90k
6363

64-
" generic Actions" (gact) at the moment are:
64+
" generic Actions" (gact) at the moment are:
6565
{ drop, pass, reclassify, continue}
6666
(If you have others, no listed here give me a reason and we will add them)
6767
+drop says to drop the packet
@@ -93,43 +93,43 @@ decimal 12, then use flowid 1:c.
9393

9494
3) A feature i call pipe
9595
The motivation is derived from Unix pipe mechanism but applied to packets.
96-
Essentially take a matching packet and pass it through
96+
Essentially take a matching packet and pass it through
9797
action1 | action2 | action3 etc.
9898
You could do something similar to this with the tc policer and the "continue"
99-
operator but this rather restricts it to just the policer and requires
100-
multiple rules (and lookups, hence quiet inefficient);
99+
operator but this rather restricts it to just the policer and requires
100+
multiple rules (and lookups, hence quiet inefficient);
101101

102-
as an example -- and please note that this is just an example _not_ The
102+
as an example -- and please note that this is just an example _not_ The
103103
Word Youve Been Waiting For (yes i have had problems giving examples
104104
which ended becoming dogma in documents and people modifying them a little
105-
to look clever);
105+
to look clever);
106106

107-
i selected the metering rates to be small so that i can show better how
107+
i selected the metering rates to be small so that i can show better how
108108
things work.
109-
110-
The script below does the following:
111-
- an incoming packet from 10.0.0.21 is first given a firewall mark of 1.
112109

113-
- It is then metered to make sure it does not exceed its allocated rate of
110+
The script below does the following:
111+
- an incoming packet from 10.0.0.21 is first given a firewall mark of 1.
112+
113+
- It is then metered to make sure it does not exceed its allocated rate of
114114
1Kbps. If it doesn't exceed rate, this is where we terminate action execution.
115115

116-
- If it does exceed its rate, its "color" changes to a mark of 2 and it is
116+
- If it does exceed its rate, its "color" changes to a mark of 2 and it is
117117
then passed through a second meter.
118118

119-
-The second meter is shared across all flows on that device [i am surpised
120-
that this seems to be not a well know feature of the policer; Bert was telling
119+
-The second meter is shared across all flows on that device [i am surpised
120+
that this seems to be not a well know feature of the policer; Bert was telling
121121
me that someone was writing a qdisc just to do sharing across multiple devices;
122122
it must be the summer heat again; weve had someone doing that every year around
123-
summer -- the key to sharing is to use a operator "index" in your policer
124-
rules (example "index 20"). All your rules have to use the same index to
123+
summer -- the key to sharing is to use a operator "index" in your policer
124+
rules (example "index 20"). All your rules have to use the same index to
125125
share.]
126-
126+
127127
-If the second meter is exceeded the color of the flow changes further to 3.
128128

129129
-We then pass the packet to another meter which is shared across all devices
130130
in the system. If this meter is exceeded we drop the packet.
131131

132-
Note the mark can be used further up the system to do things like policy
132+
Note the mark can be used further up the system to do things like policy
133133
or more interesting things on the egress.
134134

135135
------------------ cut here -------------------------------
@@ -161,31 +161,31 @@ action ipt -j mark --set-mark 3 \
161161
# and then attempt to borrow from a meter used by all devices in the
162162
# system. Should this be exceeded, drop the packet on the floor.
163163
action police index 20 mtu 5000 rate 1kbit burst 90k drop
164-
---------------------------------
164+
---------------------------------
165165

166-
Now lets see the actions installed with
166+
Now lets see the actions installed with
167167
"tc filter show parent ffff: dev eth0"
168168

169169
-------- output -----------
170170
jroot# tc filter show parent ffff: dev eth0
171-
filter protocol ip pref 1 u32
172-
filter protocol ip pref 1 u32 fh 800: ht divisor 1
173-
filter protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:15
171+
filter protocol ip pref 1 u32
172+
filter protocol ip pref 1 u32 fh 800: ht divisor 1
173+
filter protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:15
174174

175-
action order 1: tablename: mangle hook: NF_IP_PRE_ROUTING
175+
action order 1: tablename: mangle hook: NF_IP_PRE_ROUTING
176176
target MARK set 0x1 index 2
177177

178-
action order 2: police 1 action pipe rate 1Kbit burst 9Kb mtu 2Kb
178+
action order 2: police 1 action pipe rate 1Kbit burst 9Kb mtu 2Kb
179179

180-
action order 3: tablename: mangle hook: NF_IP_PRE_ROUTING
180+
action order 3: tablename: mangle hook: NF_IP_PRE_ROUTING
181181
target MARK set 0x2 index 1
182182

183-
action order 4: police 30 action pipe rate 1Kbit burst 10Kb mtu 5000b
183+
action order 4: police 30 action pipe rate 1Kbit burst 10Kb mtu 5000b
184184

185-
action order 5: tablename: mangle hook: NF_IP_PRE_ROUTING
185+
action order 5: tablename: mangle hook: NF_IP_PRE_ROUTING
186186
target MARK set 0x3 index 3
187187

188-
action order 6: police 20 action drop rate 1Kbit burst 90Kb mtu 5000b
188+
action order 6: police 20 action drop rate 1Kbit burst 90Kb mtu 5000b
189189

190190
match 0a000015/ffffffff at 12
191191
-------------------------------
@@ -209,31 +209,31 @@ Now lets take a look at the stats with "tc -s filter show parent ffff: dev eth0"
209209

210210
--------------
211211
jroot# tc -s filter show parent ffff: dev eth0
212-
filter protocol ip pref 1 u32
213-
filter protocol ip pref 1 u32 fh 800: ht divisor 1
212+
filter protocol ip pref 1 u32
213+
filter protocol ip pref 1 u32 fh 800: ht divisor 1
214214
filter protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1
215-
5
215+
5
216216

217-
action order 1: tablename: mangle hook: NF_IP_PRE_ROUTING
217+
action order 1: tablename: mangle hook: NF_IP_PRE_ROUTING
218218
target MARK set 0x1 index 2
219-
Sent 188832 bytes 2248 pkts (dropped 0, overlimits 0)
219+
Sent 188832 bytes 2248 pkts (dropped 0, overlimits 0)
220220

221-
action order 2: police 1 action pipe rate 1Kbit burst 9Kb mtu 2Kb
222-
Sent 188832 bytes 2248 pkts (dropped 0, overlimits 2122)
221+
action order 2: police 1 action pipe rate 1Kbit burst 9Kb mtu 2Kb
222+
Sent 188832 bytes 2248 pkts (dropped 0, overlimits 2122)
223223

224-
action order 3: tablename: mangle hook: NF_IP_PRE_ROUTING
224+
action order 3: tablename: mangle hook: NF_IP_PRE_ROUTING
225225
target MARK set 0x2 index 1
226-
Sent 178248 bytes 2122 pkts (dropped 0, overlimits 0)
226+
Sent 178248 bytes 2122 pkts (dropped 0, overlimits 0)
227227

228-
action order 4: police 30 action pipe rate 1Kbit burst 10Kb mtu 5000b
229-
Sent 178248 bytes 2122 pkts (dropped 0, overlimits 1945)
228+
action order 4: police 30 action pipe rate 1Kbit burst 10Kb mtu 5000b
229+
Sent 178248 bytes 2122 pkts (dropped 0, overlimits 1945)
230230

231-
action order 5: tablename: mangle hook: NF_IP_PRE_ROUTING
231+
action order 5: tablename: mangle hook: NF_IP_PRE_ROUTING
232232
target MARK set 0x3 index 3
233-
Sent 163380 bytes 1945 pkts (dropped 0, overlimits 0)
233+
Sent 163380 bytes 1945 pkts (dropped 0, overlimits 0)
234234

235-
action order 6: police 20 action drop rate 1Kbit burst 90Kb mtu 5000b
236-
Sent 163380 bytes 1945 pkts (dropped 0, overlimits 437)
235+
action order 6: police 20 action drop rate 1Kbit burst 90Kb mtu 5000b
236+
Sent 163380 bytes 1945 pkts (dropped 0, overlimits 437)
237237

238238
match 0a000015/ffffffff at 12
239239
-------------------------------
@@ -254,4 +254,3 @@ At the moment the focus has been on getting the architecture in place.
254254
Expect new things in the spurious time i have to work on this
255255
(particularly around end of year when i have typically get time off
256256
from work).
257-

doc/actions/gact-usage

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

22
gact <ACTION> [RAND] [INDEX]
33

4-
Where:
5-
ACTION := reclassify | drop | continue | pass | ok
4+
Where:
5+
ACTION := reclassify | drop | continue | pass | ok
66
RAND := random <RANDTYPE> <ACTION> <VAL>
77
RANDTYPE := netrand | determ
88
VAL : = value not exceeding 10000
99
INDEX := index value used
10-
10+
1111
ACTION semantics
1212
- pass and ok are equivalent to accept
1313
- continue allows to restart classification lookup
@@ -42,14 +42,14 @@ filter u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:16 (rule hit 32 suc
4242
random type none pass val 0
4343
index 1 ref 1 bind 1 installed 59 sec used 35 sec
4444
Sent 1680 bytes 20 pkts (dropped 20, overlimits 0 )
45-
45+
4646
----
4747

4848
# example 2
4949
#allow 1 out 10 randomly using the netrand generator
5050
tc filter add dev eth0 parent ffff: protocol ip prio 6 u32 match ip src \
5151
10.0.0.9/32 flowid 1:16 action drop random netrand ok 10
52-
52+
5353
ping -c 20 10.0.0.9
5454

5555
----
@@ -59,14 +59,14 @@ filter protocol ip pref 6 u32 filter protocol ip pref 6 u32 fh 800: ht divisor 1
5959
random type netrand pass val 10
6060
index 5 ref 1 bind 1 installed 49 sec used 25 sec
6161
Sent 1680 bytes 20 pkts (dropped 16, overlimits 0 )
62-
62+
6363
--------
6464
#alternative: deterministically accept every second packet
6565
tc filter add dev eth0 parent ffff: protocol ip prio 6 u32 match ip src \
6666
10.0.0.9/32 flowid 1:16 action drop random determ ok 2
67-
67+
6868
ping -c 20 10.0.0.9
69-
69+
7070
tc -s filter show parent ffff: dev eth0
7171
-----
7272
filter protocol ip pref 6 u32 filter protocol ip pref 6 u32 fh 800: ht divisor 1filter protocol ip pref 6 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:16 (rule hit 20 success 20)
@@ -76,4 +76,3 @@ filter protocol ip pref 6 u32 filter protocol ip pref 6 u32 fh 800: ht divisor 1
7676
index 4 ref 1 bind 1 installed 118 sec used 82 sec
7777
Sent 1680 bytes 20 pkts (dropped 10, overlimits 0 )
7878
-----
79-

0 commit comments

Comments
 (0)