|
|
049c96 |
From efa905c6b20db4486e9ee6ab991ecfcd7a04ce63 Mon Sep 17 00:00:00 2001
|
|
|
049c96 |
From: Phil Sutter <psutter@redhat.com>
|
|
|
049c96 |
Date: Fri, 11 Mar 2016 15:38:15 +0100
|
|
|
049c96 |
Subject: [PATCH] whitespace cleanup
|
|
|
049c96 |
|
|
|
049c96 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1315930
|
|
|
049c96 |
Upstream Status: iproute2.git commit 3d0b7439dfac9
|
|
|
049c96 |
Conflicts: Just picking changes to tc/m_simple.c
|
|
|
049c96 |
|
|
|
049c96 |
commit 3d0b7439dfac96d93386295a4c961b89bd3d8463
|
|
|
049c96 |
Author: Stephen Hemminger <shemming@brocade.com>
|
|
|
049c96 |
Date: Sat Dec 20 15:47:17 2014 -0800
|
|
|
049c96 |
|
|
|
049c96 |
whitespace cleanup
|
|
|
049c96 |
|
|
|
049c96 |
Remove all trailing whitespace and space before tabs.
|
|
|
049c96 |
---
|
|
|
049c96 |
tc/m_simple.c | 38 +++++++++++++++++++-------------------
|
|
|
049c96 |
1 file changed, 19 insertions(+), 19 deletions(-)
|
|
|
049c96 |
|
|
|
049c96 |
diff --git a/tc/m_simple.c b/tc/m_simple.c
|
|
|
049c96 |
index b61aca7..866552f 100644
|
|
|
049c96 |
--- a/tc/m_simple.c
|
|
|
049c96 |
+++ b/tc/m_simple.c
|
|
|
049c96 |
@@ -9,7 +9,7 @@
|
|
|
049c96 |
* Authors: J Hadi Salim <jhs@mojatatu.com>
|
|
|
049c96 |
*
|
|
|
049c96 |
* Pedagogical example. Adds a string that will be printed every time
|
|
|
049c96 |
- * the simple instance is hit.
|
|
|
049c96 |
+ * the simple instance is hit.
|
|
|
049c96 |
* Use this as a skeleton action and keep modifying it to meet your needs.
|
|
|
049c96 |
* Look at linux/tc_act/tc_defact.h for the different components ids and
|
|
|
049c96 |
* definitions used in this actions
|
|
|
049c96 |
@@ -26,20 +26,20 @@
|
|
|
049c96 |
*
|
|
|
049c96 |
hadi@noma1:$ tc qdisc add dev eth0 ingress
|
|
|
049c96 |
hadi@noma1:$tc filter add dev eth0 parent ffff: protocol ip prio 5 \
|
|
|
049c96 |
- u32 match ip protocol 1 0xff flowid 1:1 action simple "Incoming ICMP"
|
|
|
049c96 |
-
|
|
|
049c96 |
+ u32 match ip protocol 1 0xff flowid 1:1 action simple "Incoming ICMP"
|
|
|
049c96 |
+
|
|
|
049c96 |
hadi@noma1:$ sudo tc -s filter ls dev eth0 parent ffff:
|
|
|
049c96 |
- filter protocol ip pref 5 u32
|
|
|
049c96 |
- filter protocol ip pref 5 u32 fh 800: ht divisor 1
|
|
|
049c96 |
- filter protocol ip pref 5 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1
|
|
|
049c96 |
+ filter protocol ip pref 5 u32
|
|
|
049c96 |
+ filter protocol ip pref 5 u32 fh 800: ht divisor 1
|
|
|
049c96 |
+ filter protocol ip pref 5 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1
|
|
|
049c96 |
match 00010000/00ff0000 at 8
|
|
|
049c96 |
- action order 1: Simple <Incoming ICMP>
|
|
|
049c96 |
- index 4 ref 1 bind 1 installed 29 sec used 29 sec
|
|
|
049c96 |
- Action statistics:
|
|
|
049c96 |
- Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
|
|
|
049c96 |
- backlog 0b 0p requeues 0
|
|
|
049c96 |
-
|
|
|
049c96 |
-
|
|
|
049c96 |
+ action order 1: Simple <Incoming ICMP>
|
|
|
049c96 |
+ index 4 ref 1 bind 1 installed 29 sec used 29 sec
|
|
|
049c96 |
+ Action statistics:
|
|
|
049c96 |
+ Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
|
|
|
049c96 |
+ backlog 0b 0p requeues 0
|
|
|
049c96 |
+
|
|
|
049c96 |
+
|
|
|
049c96 |
hadi@noma1$ ping -c 1 www.google.ca
|
|
|
049c96 |
PING www.google.ca (74.125.225.120) 56(84) bytes of data.
|
|
|
049c96 |
64 bytes from ord08s08-in-f24.1e100.net (74.125.225.120): icmp_req=1 ttl=53 time=31.3 ms
|
|
|
049c96 |
@@ -52,15 +52,15 @@
|
|
|
049c96 |
[135354.473951] simple: Incoming ICMP_1
|
|
|
049c96 |
|
|
|
049c96 |
hadi@noma1$ sudo tc/tc -s filter ls dev eth0 parent ffff:
|
|
|
049c96 |
- filter protocol ip pref 5 u32
|
|
|
049c96 |
- filter protocol ip pref 5 u32 fh 800: ht divisor 1
|
|
|
049c96 |
- filter protocol ip pref 5 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1
|
|
|
049c96 |
+ filter protocol ip pref 5 u32
|
|
|
049c96 |
+ filter protocol ip pref 5 u32 fh 800: ht divisor 1
|
|
|
049c96 |
+ filter protocol ip pref 5 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1
|
|
|
049c96 |
match 00010000/00ff0000 at 8
|
|
|
049c96 |
action order 1: Simple <Incoming ICMP>
|
|
|
049c96 |
index 4 ref 1 bind 1 installed 206 sec used 67 sec
|
|
|
049c96 |
Action statistics:
|
|
|
049c96 |
- Sent 84 bytes 1 pkt (dropped 0, overlimits 0 requeues 0)
|
|
|
049c96 |
- backlog 0b 0p requeues 0
|
|
|
049c96 |
+ Sent 84 bytes 1 pkt (dropped 0, overlimits 0 requeues 0)
|
|
|
049c96 |
+ backlog 0b 0p requeues 0
|
|
|
049c96 |
*/
|
|
|
049c96 |
|
|
|
049c96 |
#include <stdio.h>
|
|
|
049c96 |
@@ -82,7 +82,7 @@
|
|
|
049c96 |
static void explain(void)
|
|
|
049c96 |
{
|
|
|
049c96 |
fprintf(stderr, "Usage: ... simple STRING\n"
|
|
|
049c96 |
- "STRING being an arbitrary string\n"
|
|
|
049c96 |
+ "STRING being an arbitrary string\n"
|
|
|
049c96 |
"example: \"simple blah\"\n");
|
|
|
049c96 |
}
|
|
|
049c96 |
|
|
|
049c96 |
--
|
|
|
049c96 |
1.8.3.1
|
|
|
049c96 |
|