]>
Commit | Line | Data |
---|---|---|
190ecb23 JB |
1 | --- linux-3.12/include/uapi/linux/pkt_sched.h.orig 2013-11-04 21:29:43.794379979 +0100 |
2 | +++ linux-3.12/include/uapi/linux/pkt_sched.h 2013-11-04 21:32:50.007705499 +0100 | |
3 | @@ -25,6 +25,11 @@ | |
0c49a87a | 4 | |
963876a8 JB |
5 | #define TC_PRIO_MAX 15 |
6 | ||
7 | +#ifndef __KERNEL__ | |
0c49a87a | 8 | +#include <sys/time.h> |
963876a8 | 9 | +#endif |
0c49a87a | 10 | +#include <linux/if_ether.h> |
963876a8 JB |
11 | + |
12 | /* Generic queue statistics, available for all the elements. | |
13 | Particular schedulers may have also their private records. | |
14 | */ | |
190ecb23 JB |
15 | @@ -810,4 +815,97 @@ |
16 | __u32 throttled_flows; | |
17 | __u32 pad; | |
18 | }; | |
963876a8 | 19 | + |
22250af1 PS |
20 | +/* WRR section */ |
21 | + | |
963876a8 JB |
22 | +/* |
23 | + * A sub weight and of a class | |
24 | + * All numbers are represented as parts of (2^64-1). | |
25 | + */ | |
22250af1 | 26 | +struct tc_wrr_class_weight { |
963876a8 JB |
27 | + __u64 val; // Current value (0 is not valid) |
28 | + __u64 decr; // Value pr bytes (2^64-1 is not valid) | |
29 | + __u64 incr; // Value pr seconds (2^64-1 is not valid) | |
30 | + __u64 min; // Minimal value (0 is not valid) | |
31 | + __u64 max; // Minimal value (0 is not valid) | |
32 | + time_t tim; // The time where the above information was correct | |
22250af1 PS |
33 | +}; |
34 | + | |
963876a8 | 35 | +/* Packet send when modifying a class */ |
22250af1 | 36 | +struct tc_wrr_class_modf { |
963876a8 JB |
37 | + /* Not-valid values are ignored */ |
38 | + struct tc_wrr_class_weight weight1; | |
39 | + struct tc_wrr_class_weight weight2; | |
22250af1 PS |
40 | +}; |
41 | + | |
963876a8 | 42 | +/* Packet returned when quering a class */ |
22250af1 | 43 | +struct tc_wrr_class_stats { |
963876a8 JB |
44 | + char used; /* If this is false the information below is invalid */ |
45 | + struct tc_wrr_class_modf class_modf; | |
46 | + unsigned char addr[ETH_ALEN]; | |
47 | + char usemac; /* True if addr is a MAC address, else it is an IP address | |
48 | + (this value is only for convience, it is always the same | |
49 | + value as in the qdisc) */ | |
50 | + int heappos; /* Current heap position or 0 if not in heap */ | |
51 | + __u64 penal_ls; /* Penalty value in heap (ls) */ | |
52 | + __u64 penal_ms; /* Penalty value in heap (ms) */ | |
22250af1 PS |
53 | +}; |
54 | + | |
963876a8 | 55 | +/* Qdisc-wide penalty information (boolean values - 2 not valid) */ |
22250af1 | 56 | +struct tc_wrr_qdisc_weight { |
963876a8 JB |
57 | + signed char weight_mode; /* 0=No automatic change to weight |
58 | + 1=Decrease normally | |
59 | + 2=Also multiply with number of machines | |
60 | + 3=Instead multiply with priority divided | |
61 | + with priority of the other. | |
62 | + -1=no change */ | |
22250af1 PS |
63 | +}; |
64 | + | |
963876a8 | 65 | +/* Packet send when modifing a qdisc */ |
22250af1 | 66 | +struct tc_wrr_qdisc_modf { |
963876a8 JB |
67 | + /* Not-valid values are ignored */ |
68 | + struct tc_wrr_qdisc_weight weight1; | |
69 | + struct tc_wrr_qdisc_weight weight2; | |
22250af1 PS |
70 | +}; |
71 | + | |
963876a8 | 72 | +/* Packet send when creating a qdisc */ |
22250af1 | 73 | +struct tc_wrr_qdisc_crt { |
963876a8 JB |
74 | + struct tc_wrr_qdisc_modf qdisc_modf; |
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. */ | |
22250af1 PS |
83 | +}; |
84 | + | |
963876a8 | 85 | +/* Packet returned when quering a qdisc */ |
22250af1 | 86 | +struct tc_wrr_qdisc_stats { |
963876a8 JB |
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 */ | |
22250af1 PS |
94 | +}; |
95 | + | |
96 | +struct tc_wrr_qdisc_modf_std { | |
963876a8 JB |
97 | + char proxy; /* This indicates which of the tc_wrr_qdisc_modf structers this is. 0=This struct */ |
98 | + char change_class; /* Should we also change a class? */ | |
99 | + struct tc_wrr_qdisc_modf qdisc_modf; /* Only valid if change_class is false */ | |
100 | + unsigned char addr[ETH_ALEN]; /* Class to change (non-used bytes should be 0). Valid only of change_class is true */ | |
101 | + struct tc_wrr_class_modf class_modf; /* The change */ | |
22250af1 PS |
102 | +}; |
103 | + | |
963876a8 | 104 | +/* Used for proxyremapping */ |
22250af1 | 105 | +struct tc_wrr_qdisc_modf_proxy { |
963876a8 JB |
106 | + char proxy; /* This indicates which of the tc_wrr_qdisc_modf structers this is. 1=This struct */ |
107 | + char reset; /* This is 1 if the proxyremap information should be reset */ | |
108 | + int changec; /* changec is the number of elements in changes. */ | |
109 | + long changes[0]; /* This is an array of type ProxyRemapBlock */ | |
22250af1 PS |
110 | +}; |
111 | + | |
b4f81b20 | 112 | #endif |