]> git.pld-linux.org Git - packages/linux-libc-headers.git/blame - linux-libc-headers-wrr.patch
- rel 5
[packages/linux-libc-headers.git] / linux-libc-headers-wrr.patch
CommitLineData
f834ce57
JB
1--- linux-libc-headers-2.6.9.1/include/linux/pkt_sched.h.orig 2004-11-07 21:03:14.924678496 +0100
2+++ linux-libc-headers-2.6.9.1/include/linux/pkt_sched.h 2004-11-07 21:04:53.666667432 +0100
0c49a87a
AM
3@@ -2,7 +2,8 @@
4 #define __LINUX_PKT_SCHED_H
5
6 #include <asm/types.h>
7-
8+#include <sys/time.h>
9+#include <linux/if_ether.h>
10
11 /* Logical priority bands not depending on specific packet scheduler.
12 Every scheduler will map them to real traffic classes, if it has
f834ce57
JB
13@@ -444,4 +445,113 @@
14
15 #define NETEM_DIST_SCALE 8192
16
22250af1
PS
17+/* WRR section */
18+
22250af1
PS
19+// A sub weight and of a class
20+// All numbers are represented as parts of (2^64-1).
21+struct tc_wrr_class_weight {
22+ __u64 val; // Current value (0 is not valid)
23+ __u64 decr; // Value pr bytes (2^64-1 is not valid)
24+ __u64 incr; // Value pr seconds (2^64-1 is not valid)
25+ __u64 min; // Minimal value (0 is not valid)
26+ __u64 max; // Minimal value (0 is not valid)
27+
28+ // The time where the above information was correct:
29+ time_t tim;
30+};
31+
32+// Pakcet send when modifying a class:
33+struct tc_wrr_class_modf {
34+ // Not-valid values are ignored.
35+ struct tc_wrr_class_weight weight1;
36+ struct tc_wrr_class_weight weight2;
37+};
38+
39+// Packet returned when quering a class:
40+struct tc_wrr_class_stats {
41+ char used; // If this is false the information below is invalid
42+
43+ struct tc_wrr_class_modf class_modf;
44+
45+ unsigned char addr[ETH_ALEN];
46+ char usemac; // True if addr is a MAC address, else it is an IP address
47+ // (this value is only for convience, it is always the same
48+ // value as in the qdisc)
49+ int heappos; // Current heap position or 0 if not in heap
50+ __u64 penal_ls; // Penalty value in heap (ls)
51+ __u64 penal_ms; // Penalty value in heap (ms)
52+};
53+
54+// Qdisc-wide penalty information (boolean values - 2 not valid)
55+struct tc_wrr_qdisc_weight {
56+ char weight_mode; // 0=No automatic change to weight
57+ // 1=Decrease normally
58+ // 2=Also multiply with number of machines
59+ // 3=Instead multiply with priority divided
60+ // with priority of the other.
61+ // -1=no change
62+};
63+
64+// Packet send when modifing a qdisc:
65+struct tc_wrr_qdisc_modf {
66+ // Not-valid values are ignored:
67+ struct tc_wrr_qdisc_weight weight1;
68+ struct tc_wrr_qdisc_weight weight2;
69+};
70+
71+// Packet send when creating a qdisc:
72+struct tc_wrr_qdisc_crt {
73+ struct tc_wrr_qdisc_modf qdisc_modf;
74+
75+ char srcaddr; // 1=lookup source, 0=lookup destination
76+ char usemac; // 1=Classify on MAC addresses, 0=classify on IP
77+ char usemasq; // 1=Classify based on masqgrading - only valid
78+ // if usemac is zero
79+ int bands_max; // Maximal number of bands (i.e.: classes)
80+ int proxy_maxconn; // If differnt from 0 then we support proxy remapping
81+ // of packets. And this is the number of maximal
82+ // concurrent proxy connections.
83+};
84+
85+// Packet returned when quering a qdisc:
86+struct tc_wrr_qdisc_stats {
87+ struct tc_wrr_qdisc_crt qdisc_crt;
88+ int proxy_curconn;
89+ int nodes_in_heap; // Current number of bands wanting to send something
90+ int bands_cur; // Current number of bands used (i.e.: MAC/IP addresses seen)
91+ int bands_reused; // Number of times this band has been reused.
92+ int packets_requed; // Number of times packets have been requeued.
93+ __u64 priosum; // Sum of priorities in heap where 1 is 2^32
94+};
95+
96+struct tc_wrr_qdisc_modf_std {
97+ // This indicates which of the tc_wrr_qdisc_modf structers this is:
98+ char proxy; // 0=This struct
99+
100+ // Should we also change a class?
101+ char change_class;
102+
103+ // Only valid if change_class is false
104+ struct tc_wrr_qdisc_modf qdisc_modf;
105+
106+ // Only valid if change_class is true:
107+ unsigned char addr[ETH_ALEN]; // Class to change (non-used bytes should be 0)
108+ struct tc_wrr_class_modf class_modf; // The change
109+};
110+
111+// Used for proxyrempping:
112+struct tc_wrr_qdisc_modf_proxy {
113+ // This indicates which of the tc_wrr_qdisc_modf structers this is:
114+ char proxy; // 1=This struct
115+
116+ // This is 1 if the proxyremap information should be reset
117+ char reset;
118+
119+ // changec is the number of elements in changes.
120+ int changec;
121+
122+ // This is an array of type ProxyRemapBlock:
123+ long changes[0];
124+};
125+
b4f81b20 126 #endif
This page took 0.043426 seconds and 4 git commands to generate.